xbps-base-files: add three new triggers for gtk+. Bump to 0.11.

--HG--
extra : convert_revision : cd0a71d2b032dd56da02516d2befa00bc4d026f9
This commit is contained in:
Juan RP 2009-04-18 15:07:51 +02:00
parent 4ae31a0f77
commit bbb89a8be2
7 changed files with 112 additions and 49 deletions

35
triggers/gtk-icon-cache Normal file
View file

@ -0,0 +1,35 @@
#!/bin/sh
#
# Updates GTK+ icon cache file with gtk-update-icon-cache(1).
#
# Arguments: $1 = action [run/targets]
# $2 = target [post-install/post-remove]
# $3 = pkgname
# $4 = version
#
trigger="gtk-icon-cache"
iconcache_bin=./usr/bin/gtk-update-icon-cache
iconcache_dir=./usr/share/icons/hicolor
case "$1" in
targets)
echo "post-install post-remove"
;;
run)
echo "Running $trigger trigger..."
case "$2" in
post-*)
if [ -x ${iconcache_bin} ]; then
echo "Updating GTK's icon cache themes..."
${iconcache_bin} -f -t ${iconcache_dir}
fi
;;
esac
;;
*)
exit 1
;;
esac
exit 0

38
triggers/gtk-immodules Normal file
View file

@ -0,0 +1,38 @@
#!/bin/sh
#
# Updates GTK+ IM modules file with gtk-query-immodules-2.0(1).
#
# Arguments: $1 = action [run/targets]
# $2 = target [post-install/post-remove]
# $3 = pkgname
# $4 = version
#
trigger="gtk-immodules"
immodules_bin=./usr/bin/gtk-query-immodules-2.0
immodules_db=./etc/gtk-2.0/gtk.immodules
case "$1" in
targets)
echo "post-install post-remove"
;;
run)
echo "Running $trigger trigger..."
case "$2" in
post-*)
if [ -f ${immodules_db} ]; then
rm -f ${immodules_db}
fi
if [ -x ${immodules_bin} ]; then
echo "Updating GTK's immodules database..."
${immodules_bin} > ${immodules_db}
fi
;;
esac
;;
*)
exit 1
;;
esac
exit 0

View file

@ -0,0 +1,38 @@
#!/bin/sh
#
# Updates GTK+ gdk pixbuf loaders file with gdk-pixbuf-queryloaders(1).
#
# Arguments: $1 = action [run/targets]
# $2 = target [post-install/post-remove]
# $3 = pkgname
# $4 = version
#
trigger="gtk-pixbuf-loaders"
pixbuf_bin=./usr/bin/gdk-pixbuf-queryloaders
pixbuf_loaders=./etc/gtk-2.0/gdk-pixbuf.loaders
case "$1" in
targets)
echo "post-install post-remove"
;;
run)
echo "Running $trigger trigger..."
case "$2" in
post-*)
if [ -f ${pixbuf_loaders} ]; then
rm -f ${pixbuf_loaders}
fi
if [ -x ${pixbuf_bin} ]; then
echo "Updating GTK's pixbuf loaders database..."
${pixbuf_bin} > ${pixbuf_loaders}
fi
;;
esac
;;
*)
exit 1
;;
esac
exit 0