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
14 # set DOCS_DIR to the path to a release tarball docs dir in order to get docs
17 SPECDIR
=`rpm --eval %_specdir`
18 SRCDIR
=`rpm --eval %_sourcedir`
20 # At this point the SPECDIR and SRCDIR vaiables must have a value!
27 RPMVER
=`rpm --version | awk '{print $3}'`
31 ## Check the RPM version (paranoid)
35 echo "Supported RPM version [$RPMVER]"
38 echo "Unknown RPM version: `rpm --version`"
45 if [ -f Makefile
]; then
52 SRCTREE
=`basename $PWD`
53 if [ $DOCS_DIR ] && [ -d $DOCS_DIR ]; then
58 chown
-R ${USERID}.
${GRPID} $SRCTREE
59 if [ ! -d samba-
${VERSION} ]; then
60 ln -s $SRCTREE samba-
${VERSION} ||
exit 1
62 echo -n "Creating samba-${VERSION}.tar.bz2 ... "
63 tar --exclude=.svn
--exclude=.bzr
--exclude=.bzrignore
--exclude=docs-orig
-chf - samba-
${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.
tar.bz2
68 # restore original structure if docs were specified
69 if [ ${DOCS_DIR} ] && [ -d docs-orig
] && [ -L docs
]; then
81 ## copy additional source files
83 chmod 755 setup
/filter-requires-samba.sh
84 tar --exclude=.svn
-jcvf - setup
> ${SRCDIR}/setup.
tar.bz2
85 cp -p ${SPECFILE} ${SPECDIR}
90 echo "$(basename $0): Getting Ready to build release package"
92 ${RPM} -ba --clean --rmsource $EXTRA_OPTIONS $SPECFILE
94 # restore original structure if docs were specified
96 if [ ${DOCS_DIR} ] && [ -d docs-orig
] && [ -L docs
]; then
101 echo "$(basename $0): Done."