diff options
author | Gerald Carter <jerry@samba.org> | 2006-04-22 17:28:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:27 -0500 |
commit | 7c83df11599f856a6c71f8133511d1d2604b24ef (patch) | |
tree | 1ae292c15370f50435a9e35863dd7ab321f80a48 /packaging/RHEL/makerpms.sh.tmpl | |
parent | 7b75d2c650cc8dfe8c9d5b9e396afce1cedb0645 (diff) | |
download | samba-7c83df11599f856a6c71f8133511d1d2604b24ef.tar.gz samba-7c83df11599f856a6c71f8133511d1d2604b24ef.tar.bz2 samba-7c83df11599f856a6c71f8133511d1d2604b24ef.zip |
r15163: packaging updates for RHEL/Fedora and break out 'pre' tag to the RPM release number
(This used to be commit e3763272c39dc85e7feca4fc5646225b4b266fbc)
Diffstat (limited to 'packaging/RHEL/makerpms.sh.tmpl')
-rw-r--r-- | packaging/RHEL/makerpms.sh.tmpl | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/packaging/RHEL/makerpms.sh.tmpl b/packaging/RHEL/makerpms.sh.tmpl index ebaa4e649f..5b377bda57 100644 --- a/packaging/RHEL/makerpms.sh.tmpl +++ b/packaging/RHEL/makerpms.sh.tmpl @@ -21,6 +21,7 @@ SRCDIR=`rpm --eval %_sourcedir` USERID=`id -u` GRPID=`id -g` VERSION='PVERSION' +REVISION='PREVISION' SPECFILE="samba.spec" RPMVER=`rpm --version | awk '{print $3}'` RPM="rpmbuild" @@ -38,12 +39,29 @@ case $RPMVER in ;; esac -( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) -( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) +pushd . +cd ../../source +if [ -f Makefile ]; then + make distclean +fi +popd +pushd . +cd ../../../ +chown -R ${USERID}.${GRPID} samba-${VERSION}${REVISION} +if [ ! -d samba-${VERSION} ]; then + ln -s samba-${VERSION}${REVISION} samba-${VERSION} || exit 1 +fi echo -n "Creating samba-${VERSION}.tar.bz2 ... " -( cd ../../.. ; tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 ) +tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 echo "Done." +if [ $? -ne 0 ]; then + echo "Build failed!" + exit 1 +fi + +popd + ## ## copy additional source files |