Major changes to support multiple distfiles in templates.

Each template now needs to use $distfiles that accepts the full
URL to download the distfile and old $extract_sufx is now merged
on it, but this must be separated by the '@' character. Example:

distfiles="http://www.foo.org/blah-6.2@.tar.gz
http://www.foo.org/blob-1.0@.tar.bz2"

If distfiles contains multiple files defined, $wrksrc is now
mandatory.

--HG--
extra : convert_revision : 1c3fa35f148af8323ce3cbcf5732104960de6bc4
This commit is contained in:
Juan RP
2008-10-14 07:52:29 +02:00
parent cdf77cd1ad
commit b52d064544
168 changed files with 508 additions and 466 deletions

View File

@@ -1,10 +1,20 @@
#
# 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.
# This checks if unzip is installed and installs it if it's not.
#
# If unzip is already installed just return immediately.
extract_unzip()
{
local file="$1"
local dest="$2"
[ ! -f $file ] && exit 1
$XBPS_MASTERDIR/bin/unzip -q -x $file -d $dest
return $?
}
if [ ! -x "$XBPS_MASTERDIR/bin/unzip" ]; then
unzip_version="5.52"
@@ -13,7 +23,7 @@ if [ ! -x "$XBPS_MASTERDIR/bin/unzip" ]; then
check_installed_pkg unzip $unzip_version
if [ $? -ne 0 ]; then
echo "=> \`\`$pkg<EFBFBD><EFBFBD> package requires unzip for extraction."
echo "=> \`\`$save_pkgname<EFBFBD><EFBFBD> package requires unzip for extraction."
#
# Install dependencies required by unzip.
#
@@ -32,6 +42,3 @@ if [ ! -x "$XBPS_MASTERDIR/bin/unzip" ]; then
unset save_pkgname
unset unzip_version
fi
unzip_cmd=$XBPS_MASTERDIR/bin/unzip
extract_cmd="$unzip_cmd -x $dfile -d $XBPS_BUILDDIR"