index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Hauser <andy-archlinux@splashground.de> | 2007-06-04 22:06:11 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-06-11 07:53:30 -0400 |
commit | c1b6a6d616727280ab412ea06d15853b8c1f386a (patch) | |
tree | fef273e78aa10ef16bb40bc167287f4155f3bc0a /scripts | |
parent | 2746a6319a1e4c890073325e46b06516ca3d102d (diff) |
-rw-r--r-- | scripts/makepkg.in | 21 |
diff --git a/scripts/makepkg.in b/scripts/makepkg.in index 3ac904e9..0de7fd81 100644 --- a/scripts/makepkg.in +++ b/scripts/makepkg.in @@ -53,6 +53,7 @@ RMDEPS=0 REPKG=0 LOGGING=0 SOURCEONLY=0 +IGNOREARCH=0 PACMAN_OPTS= @@ -933,6 +934,7 @@ usage() { printf "$(gettext "Usage: %s [options]")\n" "$0" echo echo "$(gettext "Options:")" + printf "$(gettext " -A, --ignorearch Ignore incomplete arch field in %s")\n" "$BUILDSCRIPT" echo "$(gettext " -b, --builddeps Build missing dependencies from source")" echo "$(gettext " -c, --clean Clean up work files after build")" echo "$(gettext " -C, --cleancache Clean up source files from the cache")" @@ -1021,6 +1023,7 @@ while [ "$#" -ne "0" ]; do --builddeps) DEP_SRC=1 ;; --nodeps) NODEPS=1 ;; --noextract) NOEXTRACT=1 ;; + --ignorearch) IGNOREARCH=1 ;; --install) INSTALL=1 ;; --force) FORCE=1 ;; --nobuild) NOBUILD=1 ;; @@ -1049,8 +1052,9 @@ while [ "$#" -ne "0" ]; do exit 1 #E_INVALID_OPTION ;; -*) - while getopts "bcCdefFghiLmop:rRsSV-" opt; do + while getopts "AbcCdefFghiLmop:rRsSV-" opt; do case $opt in + A) IGNOREARCH=1 ;; b) DEP_SRC=1 ;; c) CLEANUP=1 ;; C) CLEANCACHE=1 ;; @@ -1210,11 +1214,18 @@ if [ $(echo "$pkgrel" | grep '-') ]; then error "$(gettext "%s is not allowed to contain hyphens.")" "pkgrel" exit 1 fi + if ! in_array $CARCH ${arch[@]}; then - error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgname" "$CARCH" - plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT" - plain "$(gettext "such as arch=('%s').")" "$CARCH" - exit 1 + if "$IGNOREARCH" = "0" ]; then + error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgname" "$CARCH" + plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT" + plain "$(gettext "such as arch=('%s').")" "$CARCH" + exit 1 + else + warning "$(gettext "%s is not available for the '%s' architecture.")" "$pkgname" "$CARCH" + plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT" + plain "$(gettext "such as arch=('%s').")" "$CARCH" + fi fi if [ "$install" -a ! -f "$install" ]; then |