]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- moved rpmbuild --define 'prep %dump' to separate rpm_dump function
authorMichal Moskal <michal@moskal.me>
Mon, 16 Jun 2003 19:53:27 +0000 (19:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- use just rpmbuild --define 'prep %dump' without -bp nor -bs, as it
  seems to work; but retain old way on Ra's rpm (someone need to check,
  maybe it will also work without -bp or -bs)

Changed files:
    builder.sh -> 1.174

builder.sh

index 92b0aa4190c19fba40588baf7b79b777bdfe6b64..6b46793dfe34457f122326f3393fcdad8a0cce49 100644 (file)
@@ -179,6 +179,17 @@ Usage: builder [-D|--debug] [-V|--version] [-a|--as_anon] [-b|-ba|--build]
 "
 }
 
+rpm_dump () {
+       case "$RPMBUILD" in
+       rpm )
+               rpm -bp --define 'prep %dump' $BCOND $SPECFILE 2>&1 
+               ;;
+       rpmbuild )
+               rpmbuild --define 'prep %dump' $BCOND $SPECFILE 2>&1 
+               ;;
+       esac
+}
+
 parse_spec()
 {
     if [ -n "$DEBUG" ]; then
@@ -188,13 +199,13 @@ parse_spec()
 
     cd $SPECS_DIR
     if [ "$NOSRCS" != "yes" ]; then
-       SOURCES="`$RPMBUILD -bs  $BCOND --define 'prep %dump' $SPECFILE 2>&1 | awk '/SOURCEURL[0-9]+/ {print $3}'`"
+       SOURCES="`rpm_dump | awk '/SOURCEURL[0-9]+/ {print $3}'`"
     fi
-    if ($RPMBUILD -bs  $BCOND --define 'prep %dump' $SPECFILE 2>&1 | grep -qEi ":.*nosource.*1"); then
+    if (rpm_dump | grep -qEi ":.*nosource.*1"); then
        FAIL_IF_NO_SOURCES="no"
     fi
 
-    PATCHES="`$RPMBUILD -bs  $BCOND --define 'prep %dump' $SPECFILE 2>&1 | awk '/PATCHURL[0-9]+/ {print $3}'`"
+    PATCHES="`rpm_dump | awk '/PATCHURL[0-9]+/ {print $3}'`"
     ICONS="`awk '/^Icon:/ {print $2}' ${SPECFILE}`"
     PACKAGE_NAME="`$RPM -q --qf '%{NAME}\n' --specfile ${SPECFILE} 2> /dev/null | head -1`"
     PACKAGE_VERSION="`$RPM -q --qf '%{VERSION}\n' --specfile ${SPECFILE} 2> /dev/null| head -1`"
@@ -340,7 +351,7 @@ find_mirror(){
 src_no ()
 {
     cd $SPECS_DIR
-    $RPMBUILD -bs  $BCOND --define 'prep %dump' $SPECFILE 2>&1 | \
+    rpm_dump | \
        grep "SOURCEURL[0-9]*[  ]*$1""[         ]*$" | \
        sed -e 's/.*SOURCEURL\([0-9][0-9]*\).*/\1/' | \
        head -1 | xargs
This page took 0.12264 seconds and 4 git commands to generate.