]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
- fix log4j name
[packages/rpm-build-tools.git] / builder.sh
index 8a39bb8ed3a2ed8ca747bed69307f99adf7c7c1a..c9dd23dfc1a1e762ace26fd7c70cc88adfaa2528 100644 (file)
@@ -1,4 +1,8 @@
 #!/bin/ksh
+# 
+# This program is free software, distributed under the terms of
+# the GNU General Public License Version 2.
+#
 # -----------
 # Exit codes:
 #        0 - succesful
@@ -22,7 +26,7 @@
 RCSID='$Id$'
 r=${RCSID#* * }
 rev=${r%% *}
-VERSION="v0.18/$rev"
+VERSION="v0.20/$rev"
 VERSIONSTRING="\
 Build package utility from PLD Linux CVS repository
 $VERSION (C) 1999-2007 Free Penguins".
@@ -211,7 +215,7 @@ Usage: builder [-D|--debug] [-V|--version] [--short-version] [-a|--as_anon] [-b|
 [-g|--get] [-h|--help] [--http] [{-l|--logtofile} <logfile>] [-m|--mr-proper]
 [-q|--quiet] [--date <yyyy-mm-dd> [-r <cvstag>] [{-T|--tag <cvstag>]
 [-Tvs|--tag-version-stable] [-Ts|--tag-stable] [-Tv|--tag-version]
-[{-Tp|--tag-prefix} <prefix>] [{-tt|--test-tag}]
+[{-Tp|--tag-prefix} <prefix>] [{-tt|--test-tag}] [--use-greed-sources]
 [-nu|--no-urls] [-v|--verbose] [--opts <rpm opts>] [--short-circuit]
 [--show-bconds] [--with/--without <feature>] [--define <macro> <value>]
 <package>[.spec][:cvstag]
@@ -313,6 +317,9 @@ Usage: builder [-D|--debug] [-V|--version] [--short-version] [-a|--as_anon] [-b|
 -u, --try-upgrade   - check version, and try to upgrade package
 -un, --try-upgrade-with-float-version
                     - as above, but allow float version
+--use-greed-sources
+                    - try download source from tag head if don't find it in
+                      current tag      
 -U, --update        - refetch sources, don't use distfiles, and update md5 comments
 -Upi, --update-poldek-indexes
                     - refresh or make poldek package index files.
@@ -411,6 +418,10 @@ minirpm() {
 %__php_api_requires() %{nil}
 %php_major_version ERROR
 %php_api_version ERROR
+%requires_xorg_xserver_extension %{nil}
+%requires_xorg_xserver_xinput %{nil}
+%requires_xorg_xserver_font %{nil}
+%requires_xorg_xserver_videodrv %{nil}
 %py_ver ERROR
 %perl_vendorarch ERROR
 %perl_vendorlib ERROR
@@ -607,8 +618,12 @@ init_builder()
        fi
 
        if [ "$NOINIT" != "yes" ] ; then
-               SOURCE_DIR="`eval $RPM $RPMOPTS --define '"name $ASSUMED_NAME"' --eval '%{_sourcedir}'`"
-               SPECS_DIR="`eval $RPM $RPMOPTS --define '"name $ASSUMED_NAME"' --eval '%{_specdir}'`"
+               local extra
+               if [ "$ASSUMED_NAME" ]; then
+                       extra="--define 'name $ASSUMED_NAME'"
+               fi
+               SOURCE_DIR="`eval $RPM $RPMOPTS $extra --eval '%{_sourcedir}'`"
+               SPECS_DIR="`eval $RPM $RPMOPTS $extra --eval '%{_specdir}'`"
        else
                SOURCE_DIR="."
                SPECS_DIR="."
@@ -1155,11 +1170,18 @@ tag_files()
        if [ "$tag_files" ]; then
                if [ "$TAG_VERSION" = "yes" ]; then
                        update_shell_title "tag sources: $TAGVER"
+                       printf "Tagging %d files\n" $(echo $tag_files | wc -w)
                        cvs $OPTIONS $TAGVER $tag_files || exit
                fi
                if [ -n "$TAG" ]; then
                        update_shell_title "tag sources: $TAG"
-                       cvs $OPTIONS $TAG $tag_files || exit
+
+                       while [ "$tag_files" ]; do
+                               local chunk=$(echo $tag_files | tr ' ' '\n' | head -n 100)
+                               printf "Tagging %d files\n" $(echo $chunk | wc -w)
+                               cvs $OPTIONS $TAG $chunk || exit
+                               tag_files=$(echo $tag_files | tr ' ' '\n' | tail +101)
+                       done
                fi
        fi
 
@@ -1901,7 +1923,7 @@ while [ $# -gt 0 ]; do
                -c | --clean )
                        CLEAN="--clean --rmspec --rmsource"; shift ;;
                -cf | --cvs-force )
-                       CVS_FORCE="-F"; shift;;
+                       CVS_FORCE="-F -B"; shift;;
                -d | --cvsroot )
                        shift; CVSROOT="${1}"; shift ;;
                -g | --get )
This page took 0.029869 seconds and 4 git commands to generate.