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
This commit is contained in:
17
helper-templates/gtk-update-gdkpixbufloaders.sh
Executable file
17
helper-templates/gtk-update-gdkpixbufloaders.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# This helper updates GTK's gdk-pixbug.loaders modules file every time
|
||||
# a template requests this process.
|
||||
#
|
||||
gtk_version="2.0"
|
||||
gdk_pixbuf_query_cmd=$PKGFS_MASTERDIR/bin/gdk-pixbuf-query-loaders
|
||||
gdk_pixbuf_db=$PKGFS_SYSCONFDIR/gtk-$gtk_version/gdk-pixbuf.loaders
|
||||
|
||||
if [ -x $gdk_pixbuf_query_cmd -a -w $gdk_pixbuf_db ]; then
|
||||
$gdk_pixbuf_query_cmd > $gdk_pixbuf_db
|
||||
[ "$?" -eq 0 ] && \
|
||||
echo "=> Updated GTK+ $(basename $gdk_pixbuf_db) modules file."
|
||||
fi
|
||||
|
||||
unset gtk_version
|
||||
unset gdk_pixbuf_query_cmd
|
||||
unset gdk_pixbuf_dbfile
|
||||
17
helper-templates/gtk-update-immodules.sh
Executable file
17
helper-templates/gtk-update-immodules.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# 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
|
||||
16
helper-templates/pango-update-modules.sh
Executable file
16
helper-templates/pango-update-modules.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# This helper updates the pango modules file when the pango package
|
||||
# has been properly installed and stowned.
|
||||
#
|
||||
|
||||
pango_query_modules_cmd=$PKGFS_MASTERDIR/bin/pango-querymodules
|
||||
pango_query_modules_db=$PKGFS_SYSCONFDIR/pango/pango.modules
|
||||
|
||||
if [ -x $pango_query_modules_cmd -a -w $pango_query_modules_db ]; then
|
||||
$pango_query_modules_cmd > $pango_query_modules_db
|
||||
[ "$?" -eq 0 ] && \
|
||||
echo "=> Updated Pango's $pango_query_modules_db modules file."
|
||||
fi
|
||||
|
||||
unset pango_query_modules_cmd
|
||||
unset pango_query_modules_db
|
||||
4
helper-templates/unzip-extraction.sh
Normal file → Executable file
4
helper-templates/unzip-extraction.sh
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This helper is used in templates using extract_sufx=".zip".
|
||||
# This checks if unzip is installed and installs it if it's not
|
||||
# and sets the unzip_cmd variable appropiately.
|
||||
# and sets the unzip_cmd/extract_cmd variables appropiately.
|
||||
#
|
||||
unzip_version="5.52"
|
||||
|
||||
@@ -23,4 +23,6 @@ fi
|
||||
|
||||
unset save_pkgname
|
||||
unset unzip_version
|
||||
|
||||
unzip_cmd=$PKGFS_MASTERDIR/bin/unzip
|
||||
extract_cmd="$unzip_cmd -x $dfile -d $PKGFS_BUILDDIR"
|
||||
|
||||
Reference in New Issue
Block a user