commit ec69e1fca27359a705ac76432912bd9e584eaef4
Author: Elan Ruusamäe <[email protected]>
Date:   Fri Jun 7 16:03:32 2013 +0300

    repackage: skip dependency generators in -bb mode

 repackage.sh | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)
---
diff --git a/repackage.sh b/repackage.sh
index 9c92434..5dfe9c3 100755
--- a/repackage.sh
+++ b/repackage.sh
@@ -19,6 +19,27 @@
 
 set -e
 
+skip_dep_generators() {
+       local dep
+       for dep in \
+               font \
+               gstreamer \
+               java \
+               kernel \
+               libtool \
+               mimetype \
+               mono \
+               perl \
+               php \
+               pkgconfig \
+               python \
+               ruby \
+       ; do
+               printf "--define __%s_provides%%{nil}\n" $dep
+               printf "--define __%s_requires%%{nil}\n" $dep
+       done
+}
+
 rpmbuild() {
        # preprocess args, we must have --target as first arg to rpmbuild
        # we need to grab also dir where spec resides
@@ -61,6 +82,8 @@ rpmbuild() {
                --define '__spec_install_pre %___build_pre' \
                --define '__spec_clean_body %{nil}' \
                --define '_enable_debug_packages 0' \
+               ${bb+$(skip_dep_generators)} \
+               ${bb+--define '%py_postclean() %{nil}'} \
                $a || exit
 }
 
@@ -107,8 +130,11 @@ if [ "$tmp" ]; then
        TARGET="$tmp"
 fi
 
-# just create the rpm's if -bb is somewhere in the args
-if [[ *$@* != *-bb* ]]; then
-       rpmbuild -bi "$@"
+# skip -bi if -bb is somewhere in the args
+if [[ *$@* = *-bb* ]]; then
+       bb=
+else
+       bb= rpmbuild -bi "$@"
+       unset bb
 fi
 rpmbuild -bb "$@"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/8bb9552ae5a09530bf70b5ce8267d9d65f875fbf

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to