]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
repackage: skip dependency generators in -bb mode
authorElan Ruusamäe <glen@delfi.ee>
Fri, 7 Jun 2013 13:03:32 +0000 (16:03 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 7 Jun 2013 13:03:32 +0000 (16:03 +0300)
repackage.sh

index 9c92434cfb0b1d099571c18ece886eecb1ebf685..5dfe9c3e72f89e75795eb20bb54051c73b006da3 100755 (executable)
 
 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 "$@"
This page took 0.036942 seconds and 4 git commands to generate.