From 86cd0cd081a6893f663c30d5a1bedb10e9f24f77 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Sep 2003 03:34:44 +0000 Subject: I think this will gracefully get around issues between different rpm versions. Particularly the long standing problem with Net::LDAP dependencies in examples/LDAP. I'll build new packages tomorrow as the final test. (This used to be commit cca0f603506b2e3c20eff5e1dd235354363d7a86) --- packaging/RedHat/makerpms.sh.tmpl | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'packaging/RedHat/makerpms.sh.tmpl') diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl index 56e9fade7b..339c971854 100644 --- a/packaging/RedHat/makerpms.sh.tmpl +++ b/packaging/RedHat/makerpms.sh.tmpl @@ -22,8 +22,6 @@ USERID=`id -u` GRPID=`id -g` VERSION='PVERSION' SPECFILE="samba3.spec" -REQUIRESCMD="find-requires" - RPMVER=`rpm --version | awk '{print $3}'` RPM="rpm" echo The RPM Version on this machine is: $RPMVER @@ -31,27 +29,22 @@ echo The RPM Version on this machine is: $RPMVER case $RPMVER in 2*) echo Building for RPM v2.x or v3.x - sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba.spec |\ - sed -e "s/REQUIRES_MACRO/__find_requires/g" > $SPECFILE + sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba.spec > $SPECFILE ;; 4.0*) ## catch rpm v4.0.x first echo Building for RPM v4.0 - sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec |\ - sed -e "s/REQUIRES_MACRO/__find_requires/g" > $SPECFILE + sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE ;; 4.1*) echo Building for RPM v4.1 RPM="rpmbuild" - sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec |\ - sed -e "s/REQUIRES_MACRO/__find_requires/g" > $SPECFILE + sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE ;; 4.2*) echo Building for RPM v4.2 RPM="rpmbuild" - REQUIRESCMD="perl.req" - sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec |\ - sed -e "s/REQUIRES_MACRO/__find_requires/g" > $SPECFILE + sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE ;; *) echo "Unknown RPM version: `rpm --version`" @@ -64,21 +57,13 @@ esac ( cd ../../.. ; tar --exclude=CVS -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 ) -## build the filter script - -cat << EOR > filter-requires-samba.sh -#!/bin/sh -/usr/lib/rpm/$REQUIRESCMD $* | grep -v "Net::LDAP" -EOR - -chmod 755 filter-requires-samba.sh - -/bin/cp -p filter-requires-samba.sh ${SRCDIR} +/bin/cp -p filter-requires-samba_rh8.sh ${SRCDIR} +/bin/cp -p filter-requires-samba_rh9.sh ${SRCDIR} /bin/cp -av $SPECFILE ${SPECDIR} echo Getting Ready to build release package cd ${SPECDIR} -${RPM} -ba -v --clean --rmsource $SPECFILE +${RPM} --define="rpm_version $RPMVER" -ba -v --clean --rmsource $SPECFILE echo Done. -- cgit