From 04c0d440ff5be404184003a01ae524d26d82b7ae Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Sep 2003 20:02:45 +0000 Subject: another round of changes for build on RedHat (This used to be commit a8de1f41c9e8465a26d5ce19c5c08efda186e198) --- packaging/RedHat/makerpms.sh.tmpl | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'packaging/RedHat/makerpms.sh.tmpl') diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl index 339c971854..1371b55fd3 100644 --- a/packaging/RedHat/makerpms.sh.tmpl +++ b/packaging/RedHat/makerpms.sh.tmpl @@ -26,24 +26,14 @@ RPMVER=`rpm --version | awk '{print $3}'` RPM="rpm" echo The RPM Version on this machine is: $RPMVER +## +## fix the mandir macro +## case $RPMVER in - 2*) - echo Building for RPM v2.x or v3.x + [23]*) 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 > $SPECFILE - ;; - 4.1*) - echo Building for RPM v4.1 - RPM="rpmbuild" - sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE - ;; - 4.2*) - echo Building for RPM v4.2 - RPM="rpmbuild" + 4*) sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE ;; *) @@ -52,6 +42,17 @@ case $RPMVER in ;; esac +## +## now catch the right command to build an RPM (defaults ro 'rpm' +## +case $RPMVER in + 4.[12]*) + RPM="rpmbuild" + ;; +esac + +echo "RPM build command is \"$RPM\"" + ( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) ( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) @@ -59,11 +60,13 @@ esac /bin/cp -p filter-requires-samba_rh8.sh ${SRCDIR} /bin/cp -p filter-requires-samba_rh9.sh ${SRCDIR} +chmod 755 ${SRCDIR}/filter-requires-samba_rh?.sh /bin/cp -av $SPECFILE ${SPECDIR} echo Getting Ready to build release package cd ${SPECDIR} -${RPM} --define="rpm_version $RPMVER" -ba -v --clean --rmsource $SPECFILE +#${RPM} -ba --clean --rmsource $SPECFILE +${RPM} -ba -vv $SPECFILE echo Done. -- cgit