summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-16 00:37:12 +0200
committerMichael Adam <obnox@samba.org>2008-05-16 03:15:23 +0200
commit67a0bfa7647f954b27a864e0ff8e55db9aad5752 (patch)
tree299d7f596818f1d06ef2ece54b28f65de37d94b3
parent7391b519c62a8c2f536f4aa3d8b3885b168297cb (diff)
downloadsamba-67a0bfa7647f954b27a864e0ff8e55db9aad5752.tar.gz
samba-67a0bfa7647f954b27a864e0ff8e55db9aad5752.tar.xz
samba-67a0bfa7647f954b27a864e0ff8e55db9aad5752.zip
packaging: use docs tarball instead of docs dir in makerpms / samba.spec
Michael (cherry picked from commit f28a24d5eac2dcf99e1d00c2daf913dd9912eb4a) (This used to be commit 5148e99d0951245632650784d18306db74ed87bd)
-rwxr-xr-xpackaging/RHEL-CTDB/makerpms.sh18
-rw-r--r--packaging/RHEL-CTDB/samba.spec2
2 files changed, 6 insertions, 14 deletions
diff --git a/packaging/RHEL-CTDB/makerpms.sh b/packaging/RHEL-CTDB/makerpms.sh
index c6192a1c809..94714e4ddda 100755
--- a/packaging/RHEL-CTDB/makerpms.sh
+++ b/packaging/RHEL-CTDB/makerpms.sh
@@ -11,7 +11,7 @@
# /usr/src/redhat directory
#
-# set DOCS_DIR to the path to a release tarball docs dir in order to get docs
+# set DOCS_TARBALL to the path to a docs release tarball in .tar.bz2 format
# extra options passed to rpmbuild
EXTRA_OPTIONS="$1"
@@ -26,6 +26,7 @@ GRPID=`id -g`
VERSION='3.2.0'
REVISION='ctdb'
SPECFILE="samba.spec"
+DOCS="docs.tar.bz2"
RPMVER=`rpm --version | awk '{print $3}'`
RPM="rpmbuild"
@@ -52,9 +53,8 @@ popd
pushd .
cd ../../
SRCTREE=`basename $PWD`
-if [ $DOCS_DIR ] && [ -d $DOCS_DIR ]; then
- mv docs docs-orig
- ln -s $DOCS_DIR docs
+if [ "x${DOCS_TARBALL}" != "x" ] && [ -f ${DOCS_TARBALL} ]; then
+ cp ${DOCS_TARBALL} ${SRCDIR}/${DOCS}
fi
cd ../
chown -R ${USERID}.${GRPID} $SRCTREE
@@ -67,11 +67,6 @@ echo "Done."
if [ $? -ne 0 ]; then
popd
cd ../../
- # restore original structure if docs were specified
- if [ ${DOCS_DIR} ] && [ -d docs-orig ] && [ -L docs ]; then
- rm docs
- mv docs-orig docs
- fi
echo "Build failed!"
exit 1
fi
@@ -103,12 +98,7 @@ ${RPM} -ba $EXTRA_OPTIONS $SPECFILE
-# restore original structure if docs were specified
cd ../../
-if [ ${DOCS_DIR} ] && [ -d docs-orig ] && [ -L docs ]; then
- rm docs
- mv -f docs-orig docs
-fi
echo "$(basename $0): Done."
diff --git a/packaging/RHEL-CTDB/samba.spec b/packaging/RHEL-CTDB/samba.spec
index 871410d435e..f6454a33c6a 100644
--- a/packaging/RHEL-CTDB/samba.spec
+++ b/packaging/RHEL-CTDB/samba.spec
@@ -15,6 +15,7 @@ URL: http://www.samba.org/
Source: samba-%{version}.tar.bz2
# Don't depend on Net::LDAP
+Source997: docs.tar.bz2
Source998: filter-requires-samba.sh
Source999: setup.tar.bz2
@@ -136,6 +137,7 @@ utilized by SWAT as well as the HTML and PDF version of "Using Samba",
# setup the vendor files (init scripts, etc...)
%setup -T -D -a 999 -n samba-%{version} -q
+%setup -T -D -a 997 -n samba-%{version} -q
%build