Added libxslt-1.1.24 template.
[pkgfs.git] / helper-templates / unzip-extraction.sh
blob13146d74e8f860296a5d20e63ea4ae404f77c7dd
2 # This helper is used in templates using extract_sufx=".zip".
3 # This checks if unzip is installed and installs it if it's not
4 # and sets the unzip_cmd/extract_cmd variables appropiately.
6 # If unzip is already installed just return immediately.
8 if [ ! -x "$PKGFS_MASTERDIR/bin/unzip" ]; then
9 unzip_version="5.52"
11 # Save pkgname before installing unzip.
12 save_pkgname=$pkgname
14 check_installed_pkg unzip $unzip_version
15 if [ $? -ne 0 ]; then
16 echo "=> \`\`$pkgยดยด package requires unzip for extraction."
18 # Install dependencies required by unzip.
20 install_builddeps_required_pkg unzip-$unzip_version
22 # Install the unzip package now.
24 install_pkg unzip
26 # Continue with previous template that called us.
28 reset_tmpl_vars
29 setup_tmpl $save_pkgname
32 unset save_pkgname
33 unset unzip_version
36 unzip_cmd=$PKGFS_MASTERDIR/bin/unzip
37 extract_cmd="$unzip_cmd -x $dfile -d $PKGFS_BUILDDIR"