2 # Copyright (C) John H Terpstra 1998-2002
3 # Gerald (Jerry) Carter 2003
5 # The following allows environment variables to override the target directories
6 # the alternative is to have a file in your home directory calles .rpmmacros
7 # containing the following:
8 # %_topdir /home/mylogin/redhat
10 # Note: Under this directory rpm expects to find the same directories that are under the
11 # /usr/src/redhat directory
16 SPECDIR
=`rpm --eval %_specdir`
17 SRCDIR
=`rpm --eval %_sourcedir`
19 # At this point the SPECDIR and SRCDIR vaiables must have a value!
26 RPMVER
=`rpm --version | awk '{print $3}'`
30 ## Check the RPM version (paranoid)
34 echo "Supported RPM version [$RPMVER]"
37 echo "Unknown RPM version: `rpm --version`"
44 if [ -f Makefile
]; then
51 chown
-R ${USERID}.${GRPID} samba-${VERSION}${REVISION}
52 if [ ! -d samba-
${VERSION} ]; then
53 ln -s samba-
${VERSION}${REVISION} samba-${VERSION} ||
exit 1
55 echo -n "Creating samba-${VERSION}.tar.bz2 ... "
56 tar --exclude=.svn
-cf - samba-
${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.
tar.bz2
67 ## copy additional source files
69 chmod 755 setup
/filter-requires-samba.sh
70 tar --exclude=.svn
-jcvf - setup
> ${SRCDIR}/setup.
tar.bz2
71 cp -p ${SPECFILE} ${SPECDIR}
76 echo "$(basename $0): Getting Ready to build release package"
78 ${RPM} -ba --clean --rmsource $EXTRA_OPTIONS $SPECFILE
80 echo "$(basename $0): Done."