Add support for arch='any'

Signed-off-by: Roman Kyrylych <roman@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Roman Kyrylych 2007-10-31 18:41:17 +02:00 committed by Dan McGee
parent 0ea43089e1
commit 4a5e7b6bd1
3 changed files with 10 additions and 0 deletions

View File

@ -129,6 +129,9 @@ for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
unset pkgname pkgver pkgrel options
source $file || die "$(gettext "failed to parse parse %s")" $file
if [ "$arch" = 'any' ]; then
CARCH='any'
fi
if [ "$pkgdir" != "" ]; then
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
else

View File

@ -1300,6 +1300,10 @@ if [ $(echo "$pkgrel" | grep '-') ]; then
exit 1
fi
if [ "$arch" = 'any' ]; then
CARCH='any'
fi
if ! in_array $CARCH ${arch[@]}; then
if [ "$IGNOREARCH" = "0" ]; then
error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgname" "$CARCH"

View File

@ -127,6 +127,9 @@ if [ "$action" = "upd" ]; then # INSERT / UPDATE
unset pkgname pkgver pkgrel options
source $option || die "$(gettext "failed to parse %s")" $option
if [ "$arch" = 'any' ]; then
CARCH='any'
fi
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
if [ ! -f "$pkgfile" ]; then