]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Use rpmbuild for building rpms
authorEric Sandeen <sandeen@sgi.com>
Tue, 16 Jul 2002 04:44:19 +0000 (04:44 +0000)
committerEric Sandeen <sandeen@sgi.com>
Tue, 16 Jul 2002 04:44:19 +0000 (04:44 +0000)
build/Makefile
build/rpm/Makefile
configure.in
include/builddefs.in

index 48ebcf58c1c19a7644ab48fc42936562ecff1411..8ca704777064a274c8f693171545dbf1618d379f 100644 (file)
@@ -71,7 +71,7 @@ dist : default $(MANIFEST)
        if [ -x $(TAR) ]; then \
            ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \
        fi; \
-       if [ -x $(RPM) ]; then \
+       if [ -x $(RPMBUILD) ]; then \
            ( echo "=== rpm ===" && $(MAKEF) -C rpm $@ || exit $$? ); \
        fi; \
        test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done
index 2dffcebc375b0324d0163357d33d750c8cbae434..57bc4f0dd7c007867242f0ebd5c223b02930b10b 100644 (file)
@@ -45,7 +45,7 @@ include $(BUILDRULES)
 
 # generate a binary rpm file
 dist : default $(SPECF) rpm-$(RPM_VERSION).rc
-       $(RPM) -ba --rcfile ./rpm-$(RPM_VERSION).rc $(SPECF)
+       $(RPMBUILD) -ba --rcfile ./rpm-$(RPM_VERSION).rc $(SPECF)
 
 # Because rpm prior to v.2.90 does not support macros and old style config
 # is not supported by rpm v.3, we have to resort to such ugly hacks
index c614aa59e9b473242125230b4c17b6ba6086595a..937946a6dfa016c3dfa13584c46c035d0217eb88 100644 (file)
@@ -77,17 +77,30 @@ test -z "$RPM" && AC_PATH_PROG(RPM, rpm, /bin/rpm)
 rpm=$RPM
 AC_SUBST(rpm)
 
-dnl check if the msgfmt program is available
-test -z "$MSGFMT" && AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt)
-msgfmt=$MSGFMT
-AC_SUBST(msgfmt)
-
 dnl .. and what version is rpm
 rpm_version=0
 test -x $RPM && \
        rpm_version=`$RPM --version | awk '{print $NF}' | awk -F. '{print $1}'`
 AC_SUBST(rpm_version)
 
+dnl At some point in rpm 4.0, rpm can no longer build rpms, and
+dnl rpmbuild is needed (rpmbuild may go way back; not sure)
+dnl So, if rpm version >= 4.0, look for rpmbuild.  Otherwise build w/ rpm
+
+if test $rpm_version -ge 4; then
+       AC_PATH_PROG(RPMBUILD, rpmbuild)
+       rpmbuild=$RPMBUILD
+else
+       rpmbuild=$RPM
+fi
+
+AC_SUBST(rpmbuild)
+       
+dnl check if the msgfmt program is available
+test -z "$MSGFMT" && AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt)
+msgfmt=$MSGFMT
+AC_SUBST(msgfmt)
+
 dnl check if the makedepend program is available
 test -z "$MAKEDEPEND" && AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
 makedepend=$MAKEDEPEND
index 5bb90ab9ccafc3738942aea912682ed87c0e7014..1c6263ce216b2ddead078fb49aacdb96ee014712 100644 (file)
@@ -70,6 +70,7 @@ LN_S  = @LN_S@
 ZIP    = @zip@
 TAR    = @tar@
 RPM    = @rpm@
+RPMBUILD= @rpmbuild@
 MSGFMT = @msgfmt@
 
 RPM_VERSION = @rpm_version@