DEBUG=""
NOURLS=""
NOCVS=""
+ALLWAYS_CVSUP="yes"
CVSROOT=${CVSROOT:-""}
LOGFILE=""
CHMOD="yes"
+RPMOPTS=""
PATCHES=""
SOURCES=""
PACKAGE_VERSION=""
PACKAGE_NAME=""
+DEF_NICE_LEVEL=0
+
if [ -f ~/etc/builderrc ]; then
. ~/etc/builderrc
elif [ -f ~/.builderrc ]; then
[-d <cvsroot>] [--cvsroot <cvsroot>] [-g] [--get] [-h] [--help]
[-l <logfile>] [-m] [--mr-proper] [--logtofile <logfile>] [-q] [--quiet]
[-r <cvstag>] [--cvstag <cvstag>] [-u] [--no-urls] [-v] [--verbose]
- <package>.spec
+ [--opts <rpm opts>] <package>.spec
-D, --debug - enable script debugging mode,
-V, --version - output builder version
all work resources,
-nc, --no-cvs - don't download from CVS, if source URL is given,
-nu, --no-urls - don't try to download from FTP/HTTP location,
+ --opts - additional options for rpm
-q, --quiet - be quiet,
-r, --cvstag - build package using resources from specified CVS
tag,
OPTIONS="$OPTIONS -A"
fi
for i in $SOURCES $PATCHES $ICONS; do
+ if [ ! -f `nourl $i` ] || [ $ALLWAYS_CVSUP = "yes" ]
+ then
if
echo $i | grep -vE '(http|ftp|https|cvs)://' |\
grep -qE '\.(gz|bz2)$'
fi
if [ -z "$NOCVS" ]||\
- [ `echo $i | grep -vE '(ftp|http|https|cvs)://'` ]
+ [ `echo $i | grep -vE '(ftp|http|https)://'` ]
then
cvs $OPTIONS `nourl $i`
fi
if [ ! -f "`nourl $i`" ]; then
Exit_error err_no_source_in_repo;
fi
+ fi
done
if [ "$CHMOD" = "yes" ]; then
build-source )
BUILD_SWITCH="-bs --nodeps" ;;
esac
- rpm $BUILD_SWITCH -v $QUIET $CLEAN $SPECFILE
+ nice -n ${DEF_NICE_LEVEL} rpm $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $SPECFILE
if [ "$?" -ne "0" ]; then
Exit_error err_build_fail;
COMMAND="usage"; shift ;;
-l | --logtofile )
shift; LOGFILE="${1}"; shift ;;
+ -ni| --nice )
+ shift; DEF_NICE_LEVEL=${1}; shift ;;
-m | --mr-proper )
COMMAND="mr-proper"; shift ;;
-nc | --no-cvs )
NOCVS="yes"; shift ;;
-nu | --no-urls )
NOURLS="yes"; shift ;;
+ --opts )
+ shift; RPMOPTS="${1}"; shift ;;
-q | --quiet )
QUIET="--quiet"; shift ;;
-r | --cvstag )