--- /usr/bin/makepkg 2006-02-02 18:40:57.000000000 -0500 +++ ./makepkg 2006-10-15 16:22:56.000000000 -0400 @@ -42,6 +42,7 @@ NOEXTRACT=0 NOSTRIP=0 RMDEPS=0 +SKIPBUILD=0 PACMAN_OPTS= @@ -241,6 +242,7 @@ echo " -h, --help This help" echo " -i, --install Install package after successful build" echo " -j Set MAKEFLAGS to \"-j\" before building" + echo ' -k, --skip-build Skip the build phase; simply repackage the contents of $startdir/pkg' echo " -m, --nocolor Disable colorized output messages" echo " -n, --nostrip Do not strip binaries/libraries" echo " -o, --nobuild Download and extract files only" @@ -282,6 +284,7 @@ --nocolor) USE_COLOR="n" ;; --genmd5) GENMD5=1 ;; --rmdeps) RMDEPS=1 ;; + --skip-build) SKIPBUILD=1;; --help) usage exit 0 @@ -291,7 +294,7 @@ exit 1 ;; -*) - while getopts "bBcCdefghij:mnop:rsSw:-" opt; do + while getopts "bBcCdefghij:kmnop:rsSw:-" opt; do case $opt in b) DEP_SRC=1 ;; B) NOCCACHE=1 ;; @@ -307,6 +310,7 @@ ;; i) INSTALL=1 ;; j) export MAKEFLAGS="-j$OPTARG" ;; + k) SKIPBUILD=1;; m) USE_COLOR="n" ;; n) NOSTRIP=1 ;; o) NOBUILD=1 ;; @@ -481,7 +485,7 @@ fi msg " Downloading $file" $FTPAGENT $netfile 2>&1 - if [ ! -f $file ]; then + if [ ! -f $file -o $? -gt 0 ]; then error "Failed to download $file" msg "Aborting..." exit 1 @@ -633,11 +637,13 @@ fi # build -msg "Starting build()..." -build 2>&1 -if [ $? -gt 0 ]; then - error "Build Failed. Aborting..." - exit 2 +if [ "$SKIPBUILD" = "0" ]; then + msg "Starting build()..." + build 2>&1 + if [ $? -gt 0 ]; then + error "Build Failed. Aborting..." + exit 2 + fi fi if [ ! "`check_option KEEPDOCS`" -a "$KEEPDOCS" = "0" ]; then