summarylogtreecommitdiffstats
path: root/pybliographer.install
diff options
context:
space:
mode:
Diffstat (limited to 'pybliographer.install')
-rw-r--r--pybliographer.install51
1 files changed, 51 insertions, 0 deletions
diff --git a/pybliographer.install b/pybliographer.install
new file mode 100644
index 000000000000..47d66526ba9b
--- /dev/null
+++ b/pybliographer.install
@@ -0,0 +1,51 @@
+pkgname=pybliographer
+
+post_install() {
+ schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`)
+ scrolls=(`pacman -Ql $pkgname | grep 'share/omf/.*\.omf$' | awk '{ print $2 }'`)
+
+ export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+ for schema in "${schemas[@]}" ; do
+ usr/bin/gconftool-2 --makefile-install-rule "$schema" >/dev/null 2>&1
+ done
+
+ for scroll in "${scrolls[@]}" ; do
+ scrollkeeper-install -q -p var/lib/scrollkeeper "$scroll"
+ done
+
+ kill -s HUP `pidof /usr/bin/gconfd-2` > /dev/null 2>&1
+ update-desktop-database -q
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`)
+ scrolls=(`pacman -Ql $pkgname | grep 'share/omf/.*\.omf$' | awk '{ print $2 }'`)
+
+ export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+ for schema in "${schemas[@]}" ; do
+ usr/bin/gconftool-2 --makefile-uninstall-rule "$schema" >/dev/null 2>&1
+ done
+
+ for scroll in "${scrolls[@]}" ; do
+ scrollkeeper-uninstall -q -p var/lib/scrollkeeper "$scroll"
+ done
+
+ kill -s HUP `pidof /usr/bin/gconfd-2` >/dev/null 2>&1
+}
+
+post_remove() {
+ update-desktop-database -q
+}
+
+op=$1
+shift
+
+$op $*