* updating debian package files
authorstranger <dariusz.wiechecki@gmail.com>
Wed, 21 Nov 2007 09:55:53 +0000 (09:55 +0000)
committerstranger <dariusz.wiechecki@gmail.com>
Wed, 21 Nov 2007 09:55:53 +0000 (09:55 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@207 5bde0345-f819-0410-ac75-e5045f9217cc

debian/mdictionary.dirs [new file with mode: 0644]
debian/mdictionary.install [new file with mode: 0644]
debian/mdictionary.postinst [new file with mode: 0644]
debian/mdictionary.prerm [new file with mode: 0644]
debian/mdictionary.substvars [new file with mode: 0644]

diff --git a/debian/mdictionary.dirs b/debian/mdictionary.dirs
new file mode 100644 (file)
index 0000000..7ef9c5c
--- /dev/null
@@ -0,0 +1,3 @@
+usr/share/mdictionary/dictionaries
+usr/share/mdictionary/dictionaries/bookmarks
+usr/lib/mdictionary
\ No newline at end of file
diff --git a/debian/mdictionary.install b/debian/mdictionary.install
new file mode 100644 (file)
index 0000000..e295ae0
--- /dev/null
@@ -0,0 +1,18 @@
+bin/mdictionaryManager /usr/bin/
+bin/engine_bookmarks.so usr/lib/mdictionary/
+data/other/mdictionaryManager.service usr/share/dbus-1/services/
+data/dictionaries/elements/dict.cache usr/share/mdictionary/dictionaries/elements/ 
+data/dictionaries/elements/dict.xdxf usr/share/mdictionary/dictionaries/elements/
+data/dictionaries/us-en/dict.xdxf usr/share/mdictionary/dictionaries/us-en/
+data/bookmarks/bdb/* usr/share/mdictionary/dictionaries/bookmarks/
+bin/mdictionary /usr/bin/
+data/icons/mdictionary_icon.png usr/share/pixmaps/
+data/icons/mdictionary.png usr/share/pixmaps/
+data/icons/ws_top.png usr/share/pixmaps/
+data/icons/ws_tra.png usr/share/pixmaps/
+data/other/mdictionaryGui.service usr/share/dbus-1/services/
+data/other/mdictionary.desktop usr/share/applications/hildon/
+data/locale/out/* usr/share/locale/
+bin/engine_stardict.so usr/lib/mdictionary/
+bin/engine_xdxf.so usr/lib/mdictionary/
+data/icons/engine_xdxf_icon.png usr/share/pixmaps/
\ No newline at end of file
diff --git a/debian/mdictionary.postinst b/debian/mdictionary.postinst
new file mode 100644 (file)
index 0000000..28cdaed
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+if [ "$1" != "upgrade" ]
+then
+# End automatically added section
+echo -e "Selecting menu location" 
+maemo-select-menu-location mdictionary.desktop
+# End automatically added section
+echo -e "Creating 'Polish - English Sample Dictionary' dictionary" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/name "Polish-English_Sample_Dictionary"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/path "/usr/share/mdictionary/dictionaries/StarDictSampleDict"'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/active true'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/optimized false'
+echo -e "Creating 'English - Polish Sample Dictionary' dictionary" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/name "English-Polish_Sample_Dictionary"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/path "/usr/share/mdictionary/dictionaries/XDXFSampleDict"'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/active true'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/optimized false'
+
+echo -e "Adding gconf entries for search engines" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/engines/xdxf/path "/usr/lib/mdictionary/engine_xdxf.so"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/engines/stardict/path "/usr/lib/mdictionary/engine_stardict.so"'
+
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/engines/bookmarks/path "/usr/lib/mdictionary/engine_bookmarks.so"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/bookmarks/name "Bookmarks"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/bookmarks/path "/usr/share/mdictionary/dictionaries/bookmarks"'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/bookmarks/active false'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/bookmarks/optimized true'
+
+echo -e "Changing privilages" 
+chmod -R 0777 /usr/share/mdictionary/dictionaries
+
+if [ -f /usr/share/applications/uri-action-defaults.list ]
+then
+   if [ -z $(grep mdict=hildon-mdictionary.desktop /usr/share/applications/uri-action-defaults.list) ]
+   then
+      echo -e "Adding mdict URI action - uri-action-defaults.list"
+      echo -en "mdict=hildon-mdictionary.desktop" >> /usr/share/applications/uri-action-defaults.list
+   else
+      echo -en "\n\nThere is an entry about mdictionary in uri-action already ... \n\n"
+   fi
+   if [ -z `grep 'mdict=hildon-mdictionary.desktop' /usr/share/applications/schemeinfo.cache` ]
+   then
+      echo -e "Adding mdict URI action - schemeinfo.cache"
+      echo -en "mdict=hildon-mdictionary.desktop" >> /usr/share/applications/schemeinfo.cache
+   else
+      echo -en "\n\nThere is an entry about mdictionary in schemeinfo already ... \n\n"
+   fi
+
+fi
+
+fi
diff --git a/debian/mdictionary.prerm b/debian/mdictionary.prerm
new file mode 100644 (file)
index 0000000..8d91037
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# End automatically added section
+
+if [ "$1" != "upgrade" ]
+then
+       echo -e -n "Removing gconf configuration..\n"
+       su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/mdictionary/dictionaries'
+       su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/mdictionary/engines'
+
+   if [ -f /usr/share/applications/uri-action-defaults.list ]
+   then
+      if [ ! -z `grep 'mdict=hildon-mdictionary.desktop' /usr/share/applications/uri-action-defaults.list` ]
+      then
+         echo -e "Removing mdict URI action - uri-action-defaults.list"
+         grep -v 'mdict=hildon-mdictionary.desktop' /usr/share/applications/uri-action-defaults.list > /tmp/wsrm.temp
+         cat /tmp/wsrm.temp > /usr/share/applications/uri-action-defaults.list
+      fi
+
+      if [ ! -z `grep 'mdict=hildon-mdictionary.desktop' /usr/share/applications/schemeinfo.cache` ]
+      then
+         echo -e "Removing mdict URI action - schemeinfo.cache"
+         grep -v 'mdict=hildon-mdictionary.desktop' /usr/share/applications/schemeinfo.cache > /tmp/wsrm.temp
+         cat /tmp/wsrm.temp > /usr/share/applications/schemeinfo.cache
+         rm -fr /tmp/wsrm.temp
+      fi
+   fi
+fi
+
+
+
+
diff --git a/debian/mdictionary.substvars b/debian/mdictionary.substvars
new file mode 100644 (file)
index 0000000..ab71839
--- /dev/null
@@ -0,0 +1 @@
+shlibs:Depends=gtkhtml0, hildon-fm1 (>= 1.14), hildon-libs0 (>= 0.14.11-1), libart-2.0-2 (>= 2.3.16), libatk1.0-0 (>= 1.9.0), libbz2-1.0, libc6 (>= 2.3.5-1), libdb1, libdbus-1-2 (>= 0.61), libdbus-glib-1-2 (>= 0.61), libexpat1 (>= 1.95.8), libgconf2-6 (>= 2.6.4.15), libglib2.0-0 (>= 2.8.6-1osso1), libgtk2.0-0 (>= 2:2.6.10-1.osso8), libosso-gnomevfs2-0, libosso1 (>= 1.20-1), libpango1.0-0 (>= 1.8.1), zlib1g (>= 1:1.2.1)