Merge pull request #9789 from wangp/gtk-immodules

xbps-triggers: conform to new gtk-immodules cache locations.
This commit is contained in:
Toyam Cox 2017-12-06 01:59:39 -05:00 committed by GitHub
commit bd30e8e4ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 13 deletions

View file

@ -17,7 +17,7 @@ UPDATE="$5"
export PATH="$PATH:/usr/local/bin"
immodules_bin=usr/bin/gtk-query-immodules-2.0
immodules_db=etc/gtk-2.0/gtk.immodules
immodules_cache=usr/lib/gtk-2.0/2.10.0/immodules.cache
case "$ACTION" in
targets)
@ -25,17 +25,18 @@ targets)
;;
run)
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then
[ -f ${immodules_db} ] && rm -f ${immodules_db}
[ -f ${immodules_cache} ] && rm -f ${immodules_cache}
break
fi
case "$TARGET" in
post-*)
if [ -f etc/gtk-2.0/gtk.immodules ]; then
echo "Removing obsolete conf file: etc/gtk-2.0/gtk.immodules"
rm -f etc/gtk-2.0/gtk.immodules
fi
if [ -x ${immodules_bin} ]; then
echo "Updating GTK's immodules database..."
if [ ! -d $(dirname $immodules_db) ]; then
install -d $(dirname $immodules_db)
fi
${immodules_bin} > ${immodules_db}
echo "Updating GTK+ immodules cache..."
${immodules_bin} --update-cache
fi
;;
esac

View file

@ -17,7 +17,7 @@ UPDATE="$5"
export PATH="$PATH:/usr/local/bin"
immodules_bin=usr/bin/gtk-query-immodules-3.0
immodules_db=etc/gtk-3.0/gtk.immodules
immodules_cache=usr/lib/gtk-3.0/3.0.0/immodules.cache
case "$ACTION" in
targets)
@ -25,14 +25,18 @@ targets)
;;
run)
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+3" ]; then
[ -f ${immodules_db} ] && rm -f ${immodules_db}
[ -f ${immodules_cache} ] && rm -f ${immodules_cache}
break
fi
case "$TARGET" in
post-*)
if [ -f etc/gtk-3.0/gtk.immodules ]; then
echo "Removing obsolete conf file: etc/gtk-3.0/gtk.immodules"
rm -f etc/gtk-3.0/gtk.immodules
fi
if [ -x ${immodules_bin} ]; then
echo "Updating GTK+'s immodules database..."
${immodules_bin} > ${immodules_db}
echo "Updating GTK+3 immodules cache..."
${immodules_bin} --update-cache
fi
;;
esac

View file

@ -1,7 +1,7 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.102
revision=3
version=0.103
revision=1
noarch=yes
bootstrap=yes
short_desc="The XBPS triggers for Void Linux"