added pre and post instalation scripts for multipackage
authormwasilew <miloszw@gmail.com>
Tue, 1 May 2007 17:35:06 +0000 (17:35 +0000)
committermwasilew <miloszw@gmail.com>
Tue, 1 May 2007 17:35:06 +0000 (17:35 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@122 5bde0345-f819-0410-ac75-e5045f9217cc

debian/whitestork.postinst [new file with mode: 0755]
debian/whitestork.prerm [new file with mode: 0755]
debian/whitestorkgui.postinst [new file with mode: 0755]
debian/whitestorkplugins.postinst [new file with mode: 0755]

diff --git a/debian/whitestork.postinst b/debian/whitestork.postinst
new file mode 100755 (executable)
index 0000000..6fb9e91
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+echo -e "Postinstalling actions..." 
+
+if [ "$1" != "upgrade" ]
+then
+# End automatically added section
+echo -e "Creating 'bookmarks' dictionary" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/bookmarks/path "/usr/lib/WhiteStork/ws_bookmark.so"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/name "Bookmarks"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/path "/usr/share/WhiteStork/dictionaries/bookmarks"'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/active false'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/optimized true'
+
+echo -e "Changing privilages" 
+chmod -R 0777 /usr/share/WhiteStork/dictionaries
+
+fi
diff --git a/debian/whitestork.prerm b/debian/whitestork.prerm
new file mode 100755 (executable)
index 0000000..6279e7f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+echo -e "Preremoving actions..."
+
+#su $USER -c 'rm -rf /usr/share/WhiteStork'
+
+if [ "$1" != "upgrade" ]
+then
+       echo -e -n "Removing gconf configuration..\n"
+       su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/WhiteStork/Dictionaries'
+       su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/WhiteStork/Engines'
+fi
+
+# End automatically added section
diff --git a/debian/whitestorkgui.postinst b/debian/whitestorkgui.postinst
new file mode 100755 (executable)
index 0000000..be9d3b1
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+echo -e "Postinstalling actions..." 
+
+if [ "$1" != "upgrade" ]
+then
+# End automatically added section
+echo -e "Selecting menu location" 
+maemo-select-menu-location whitestork.desktop
+
+fi
diff --git a/debian/whitestorkplugins.postinst b/debian/whitestorkplugins.postinst
new file mode 100755 (executable)
index 0000000..53d5027
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+echo -e "Postinstalling actions..." 
+
+if [ "$1" != "upgrade" ]
+then
+# End automatically added section
+echo -e "Creating 'elements' dictionary" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements"'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/optimized true'
+echo -e "Creating 'American - English dictionary' dictionary" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en"'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true'
+su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/optimized false'
+
+echo -e "Adding gconf entries for search engines" 
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/xdxf/path "/usr/lib/WhiteStork/engine_xdxf.so"'
+su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/stardict/path "/usr/lib/WhiteStork/engine_stardict.so"'
+
+fi