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"
13 CVSROOT=${$CVSROOT:-""}
33 echo SOURCEDIR=%{_sourcedir}
34 echo SPECS=%{_specdir}"
36 #---------------------------------------------
42 Usage: builder [-V] [--version] [-a] [--as_anon] [-b] [--build]
43 [-d <cvsroot>] [--cvsroot <cvsroot>] [-g] [--get] [-h] [--help]
44 [-l <logfile>] [--logtofile <logfile>] [-q] [--quiet]
45 [-v] [--verbose] <package>.spec
47 -V, --version - output builder version
48 -a, --as_anon - get files via pserver as cvs@cvs.pld.org.pl,
49 -b, --build - get all files from CVS repo and build
50 package from <package>.spec,
51 -d, --cvsroot - setup \$CVSROOT,
52 -g, --get - get <package>.spec and all relayted files from
54 -h, --help - this message,
55 -l, --logtofile - log all to file,
56 -q, --quiet - be quiet,
57 -v, --verbose - be verbose,
64 sed -e "s/^Summary:*/Summary:\%dump/I" $SPECFILE > $SPECFILE.__
66 SOURCES="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ SOURCE[0-9]+/ {print $3}'`"
67 PATCHES="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PATCH[0-9]+/ {print $3}'`"
68 ICON="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/^Icon:/ {print $2}' ${SPEC}`"
69 PACKAGE_NAME="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ name/ {print $3}'`"
70 PACKAGE_VERSION="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PACKAGE_VERSION/ {print $3}'`"
71 PACKAGE_RELEASE="`rpm -bp --test $SPECFILE.__ 2>&1 | awk '/ PACKAGE_RELEASE/ {print $3}'`"
75 if [ "$BE_VERBOSE" != "" ]; then
76 echo -e "- Sources :\n " $SOURCES
77 echo -e "- Patches :\n " $PATCHES
78 if [ "$ICON" != "" ]; then
79 echo -e "- Icon :\n " $ICON
81 echo -e "- Icon : *no package icon*"
83 echo -e "- Name : " $PACKAGE_NAME
84 echo -e "- Version : " $PACKAGE_VERSION
85 echo -e "- Release : " $PACKAGE_RELEASE
105 #---------------------------------------------
108 if [ "$#" == 0 ]; then
113 while test $# -gt 0 ; do
116 COMMAND="version"; shift ;;
118 CVSROOT=":pserver:cvs@cvs.pld.org.pl:/cvsroot"; shift ;;
120 COMMAND="build"; shift ;;
122 shift; CVSROOT="${1}"; shift ;;
124 COMMAND="get"; shift ;;
126 COMMAND="usage"; shift ;;
128 shift; LOGFILE="${1}"; shift ;;
132 BE_VERBOSE="1"; shift ;;
134 SPECFILE="${1}"; shift ;;
140 if [ "$SPECFILE" != "" ]; then
146 echo "ERROR: spec file name not specified.";
151 if [ "$SPECFILE" != "" ]; then
156 echo "ERROR: spec file name not specified.";