void-packages/helper-templates/gtk-update-immodules.sh
Juan RP 9078783ed1 Added three new helpers to be used by packages requiring GTK+ and
by pango itself.

To be able to run those helpers once the package has been stowned
properly, another variable available for templates has been added:
"postinstall_helpers".

This accepts a list of template helper names, e.g:

postinstall_helpers="gtk-update-gdkpixbufloaders.sh gtk-update-immodules.sh".

Also rather than setting extract_cmd itself in pkgfs.sh when
extract_sufx=".zip", set it in the helper itself.

--HG--
extra : convert_revision : 0f55c35f201daf6ff2e6d18cc808d0a34d8f4ddf
2008-10-03 17:19:37 +02:00

18 lines
545 B
Bash
Executable file

#
# This helper updates GTK's gtk.immodules modules file every time
# a template requests this process.
#
gtk_version="2.0"
gtk_query_immodules_cmd=$PKGFS_MASTERDIR/bin/gtk-query-immodules-$gtk_version
gtk_immodules_db=$PKGFS_SYSCONFDIR/gtk-$gtk_version/gtk.immodules
if [ -x $gtk_query_immodules_cmd -a -w $gtk_immodules_db ]; then
$gtk_query_immodules_cmd > $gtk_immodules_db
[ "$?" -eq 0 ] && \
echo "=> Updated GTK+ $(basename $gtk_immodules_db) modules file."
fi
unset gtk_version
unset gtk_query_immodules_cmd
unset gtk_immodules_db