]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- another hack for rpm 4.4.9 to skip %clean and be 4.4.2 compatible
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 29 Jan 2008 21:09:13 +0000 (21:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    repackage.sh -> 1.21

repackage.sh

index 65cc1d06f990f54894df12dea6f43b5d8f0fa864..638c9e55fb9b3f8dbba8a6408250131eff3339fb 100644 (file)
@@ -21,18 +21,22 @@ set -e
 
 rpmbuild() {
        # use gz payload as time is what we need here, not compress ratio
+
+       # we use %__ldconfig variable to test are we on rpm 4.4.9
+       # on 4.4.9 we should not redefine %clean to contain %clean, and redefine %__spec_clean_body instead
+       # on 4.4.2 we must redefine %clean to contain %clean
        set -x
        /usr/bin/rpmbuild \
                ${TARGET:+--target $TARGET} \
                $BCONDS \
                --short-circuit \
-               --define '_source_payload w9.gzdio' \
-               --define '__spec_install_pre %___build_pre' \
-               --define '__spec_clean_body %{nil}' \
-               --define 'clean %%clean \
+               --define 'clean %%%{!?__ldconfig:clean}%{?__ldconfig:check} \
                exit 0%{nil}' \
                --define 'check %%check \
                exit 0%{nil}' \
+               --define '_source_payload w9.gzdio' \
+               --define '__spec_install_pre %___build_pre' \
+               --define '__spec_clean_body %{nil}' \
                "$@" || exit
 }
 
This page took 0.029646 seconds and 4 git commands to generate.