5 Build package utility from PLD CVS repository
6 V 0.1 (C) 1999 Tomasz K³oczko".
8 PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
26 Usage: builder [-V] [--version] [-a] [--as_anon] [-b] [--build]
27 [-d <cvsroot>] [--cvsroot <cvsroot>] [-g] [--get] [-h] [--help]
28 [-l <logfile>] [--logtofile <logfile>] [-q] [--quiet]
29 [-v] [--verbose] <package>.spec
31 -V, --version - output builder version
32 -a, --as_anon - get files via pserver as cvs@cvs.pld.org.pl,
33 -b, --build - get all files from CVS repo and build
34 package from <package>.spec,
35 -d, --cvsroot - setup \$CVSROOT,
36 -g, --get - get <package>.spec and all relayted files from
38 -h, --help - this message,
39 -l, --logtofile - log all to file,
40 -q, --quiet - be quiet,
41 -v, --verbose - be verbose,
48 sed -e "s/^Summary:*/Summary:\%dump/I" $SPECFILE > $SPECFILE.__
50 SOURCES="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ SOURCE[0-9]+/ {print $3}'`"
51 PATCHES="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PATCH[0-9]+/ {print $3}'`"
52 ICON="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/^Icon:/ {print $2}' ${SPEC}`"
53 PACKAGE_NAME="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ name/ {print $3}'`"
54 PACKAGE_VERSION="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PACKAGE_VERSION/ {print $3}'`"
55 PACKAGE_RELEASE="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PACKAGE_RELEASE/ {print $3}'`"
59 if [ "$BE_VERBOSE" != "" ]; then
60 echo -e "- Sources :\n " $SOURCES
61 echo -e "- Patches :\n " $PATCHES
62 if [ "$ICON" != "" ]; then
63 echo -e "- Icon :\n " $ICON
65 echo -e "- Icon : *no package icon*"
67 echo -e "- Name : " $PACKAGE_NAME
68 echo -e "- Version : " $PACKAGE_VERSION
69 echo -e "- Release : " $PACKAGE_RELEASE
88 while test $# -gt 0 ; do
91 COMMAND="version"; shift ;;
93 CVSROOT=":pserver:cvs@cvs.pld.org.pl:/cvsroot"; shift ;;
95 COMMAND="build"; shift ;;
97 shift; CVSROOT="${1}"; shift ;;
99 COMMAND="get"; shift ;;
101 COMMAND="usage"; shift ;;
103 shift; LOGFILE="${1}"; shift ;;
107 BE_VERBOSE="1"; shift ;;
109 SPECFILE="${1}"; shift ;;
115 if [ "$SPECFILE" != "" ]; then
121 echo "ERROR: spec file name not specified.";
126 if [ "$SPECFILE" != "" ]; then
131 echo "ERROR: spec file name not specified.";