summaryrefslogtreecommitdiff
path: root/packaging/RedHat-9/makerpms.sh.tmpl
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-04-22 21:43:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:27 -0500
commitff69176b2d0a409d1ae11c65aefef77c9ee35094 (patch)
tree84f4134d208d2add36dea8f7e721d075f31f2636 /packaging/RedHat-9/makerpms.sh.tmpl
parent7c83df11599f856a6c71f8133511d1d2604b24ef (diff)
downloadsamba-ff69176b2d0a409d1ae11c65aefef77c9ee35094.tar.gz
samba-ff69176b2d0a409d1ae11c65aefef77c9ee35094.tar.bz2
samba-ff69176b2d0a409d1ae11c65aefef77c9ee35094.zip
r15165: updates for RH 9 packages (merged from RHEL fixes)
(This used to be commit 220cf41bc10029ec4bba70df0da27c0d3ce60f54)
Diffstat (limited to 'packaging/RedHat-9/makerpms.sh.tmpl')
-rw-r--r--packaging/RedHat-9/makerpms.sh.tmpl26
1 files changed, 23 insertions, 3 deletions
diff --git a/packaging/RedHat-9/makerpms.sh.tmpl b/packaging/RedHat-9/makerpms.sh.tmpl
index 8da4a5d520..e54467f493 100644
--- a/packaging/RedHat-9/makerpms.sh.tmpl
+++ b/packaging/RedHat-9/makerpms.sh.tmpl
@@ -21,6 +21,7 @@ SRCDIR=`rpm --eval %_sourcedir`
USERID=`id -u`
GRPID=`id -g`
VERSION='PVERSION'
+REVISION='PREVISION'
SPECFILE="samba3.spec"
RPMVER=`rpm --version | awk '{print $3}'`
RPM="rpm"
@@ -53,10 +54,29 @@ esac
echo "RPM build command is \"$RPM\""
-( 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 ... "
+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
-( cd ../../.. ; tar --exclude=CVS -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 )
/bin/cp -p filter-requires-samba_rh8.sh ${SRCDIR}
/bin/cp -p filter-requires-samba_rh9.sh ${SRCDIR}