void-packages/helper-templates/unzip-extraction.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

28 lines
772 B
Bash
Executable file

#
# 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/extract_cmd variables appropiately.
#
unzip_version="5.52"
# Save pkgname before installing unzip.
save_pkgname=$pkgname
# If unzip is already installed just return immediately.
check_installed_tmpl unzip-$unzip_version
if [ "$?" -ne 0 ]; then
echo "=> unzip not installed, will install it."
install_tmpl unzip-$unzip_version
#
# Continue with previous template that called us.
#
reset_tmpl_vars
run_file $PKGFS_TEMPLATESDIR/$save_pkgname.tmpl
check_tmpl_vars $save_pkgname
fi
unset save_pkgname
unset unzip_version
unzip_cmd=$PKGFS_MASTERDIR/bin/unzip
extract_cmd="$unzip_cmd -x $dfile -d $PKGFS_BUILDDIR"