#! /bin/sh /usr/share/dpatch/dpatch-run
## search-dir.dpatch by Soputtra San <ekenno@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Search for the modules and data in /usr/share/khmerconverter

@DPATCH@
diff -urNad khmerconverter-1.4~/khmerconverter.py khmerconverter-1.4/khmerconverter.py
--- khmerconverter-1.4~/khmerconverter.py	2007-09-11 16:12:07.000000000 +1000
+++ khmerconverter-1.4/khmerconverter.py	2007-09-11 16:14:14.000000000 +1000
@@ -20,10 +20,12 @@
 # This program creates a Plain Text, OpenOffice.org Writer (odt), or HTML file
 # in Khmer Unicode/Legacy format from Legacy/Unicode input file respectively.
 
+import sys
+sys.path.insert(0,'/usr/share/khmerconverter')
+
 from optparse import OptionParser
 from modules import FontDataXML
-import __version__
-import sys
+from modules import __version__
 import os
 
 if (sys.argv[0].endswith('py')):
diff -urNad khmerconverter-1.4~/modules/FontDataXML.py khmerconverter-1.4/modules/FontDataXML.py
--- khmerconverter-1.4~/modules/FontDataXML.py	2007-09-11 15:46:46.000000000 +1000
+++ khmerconverter-1.4/modules/FontDataXML.py	2007-09-11 16:15:19.000000000 +1000
@@ -183,7 +183,10 @@
             try:
                 datasource = open('modules/' + filename)
             except IOError:
-                raise IOError('Cannot open ' + filename + ' for reading!')
+                try:
+			datasource = open('/usr/share/khmerconverter/' + filename)
+		except IOError:
+			raise IOError('Cannot open ' + filename + ' for reading!')
 
         FontData.dom = parse(datasource)
         FontData.fontNames = dict()
