Rev 384: more build tweaks in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Tue May 29 05:52:03 GMT 2007
------------------------------------------------------------
revno: 384
revision-id: tridge at samba.org-20070529055203-vy4qlp6x1syx879n
parent: tridge at samba.org-20070529053642-xsoqyaoqc38ztq0o
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-05-29 15:52:03 +1000
message:
more build tweaks
modified:
Makefile.in makefile.in-20061117234101-o3qt14umlg9en8z0-1
packaging/RHEL/ctdb.spec ctdb.spec-20070527204758-biuh7znabuwan3zn-3
packaging/RHEL/makerpms.sh makerpms.sh-20070527204758-biuh7znabuwan3zn-4
=== modified file 'Makefile.in'
--- a/Makefile.in 2007-05-29 05:20:41 +0000
+++ b/Makefile.in 2007-05-29 05:52:03 +0000
@@ -7,6 +7,7 @@
includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
+sbindir = @sbindir@
localstatedir = @localstatedir@
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
srcdir = @srcdir@
@@ -42,11 +43,13 @@
OBJS = @TDB_OBJ@ @TALLOC_OBJ@ @LIBREPLACEOBJ@ @INFINIBAND_WRAPPER_OBJ@ $(EXTRA_OBJ) @EVENTS_OBJ@ $(CTDB_OBJ) $(UTIL_OBJ)
-BINS = bin/ctdbd bin/ctdbd_test bin/ctdb_test bin/ctdb_bench bin/ctdb_messaging bin/ctdb_fetch bin/ctdb_fetch1 bin/lockwait bin/ctdb @INFINIBAND_BINS@
+TEST_BINS=bin/ctdbd_test bin/ctdb_test bin/ctdb_bench bin/ctdb_messaging bin/ctdb_fetch bin/ctdb_fetch1 bin/lockwait @INFINIBAND_BINS@
+BINS = bin/ctdb
+SBINS = bin/ctdbd
DIRS = lib bin
-all: showflags dirs $(OBJS) $(BINS)
+all: showflags dirs $(OBJS) $(BINS) $(SBINS) $(TEST_BINS)
showflags:
@echo 'ctdb will be compiled with flags:'
@@ -115,6 +118,7 @@
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(includedir)
rsync $(BINS) $(DESTDIR)$(bindir)
+ rsync $(SBINS) $(DESTDIR)$(sbindir)
rsync $(srcdir)/include/ctdb.h $(DESTDIR)$(includedir)
test: all
=== modified file 'packaging/RHEL/ctdb.spec'
--- a/packaging/RHEL/ctdb.spec 2007-05-29 05:20:41 +0000
+++ b/packaging/RHEL/ctdb.spec 2007-05-29 05:52:03 +0000
@@ -44,6 +44,7 @@
CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
--prefix=%{_prefix} \
+make showflags
make
%install
=== modified file 'packaging/RHEL/makerpms.sh'
--- a/packaging/RHEL/makerpms.sh 2007-05-29 05:15:00 +0000
+++ b/packaging/RHEL/makerpms.sh 2007-05-29 05:52:03 +0000
@@ -2,6 +2,7 @@
# Copyright (C) John H Terpstra 1998-2002
# Gerald (Jerry) Carter 2003
# Jim McDonough 2007
+# Andrew Tridgell 2007
# The following allows environment variables to override the target directories
# the alternative is to have a file in your home directory calles .rpmmacros
@@ -14,6 +15,14 @@
EXTRA_OPTIONS="$1"
+RHEL="packaging/RHEL"
+
+[ -d ${RHEL} ] || {
+ echo "Must run this from the ctdb directory"
+ exit 1
+}
+
+
SPECDIR=`rpm --eval %_specdir`
SRCDIR=`rpm --eval %_sourcedir`
@@ -25,7 +34,7 @@
REVISION=''
SPECFILE="ctdb.spec"
RPMVER=`rpm --version | awk '{print $3}'`
-RPM="rpmbuild"
+RPMBUILD="rpmbuild"
##
## Check the RPM version (paranoid)
@@ -40,15 +49,11 @@
;;
esac
-pushd .
-cd ../..
if [ -f Makefile ]; then
make distclean
fi
-popd
pushd .
-cd ../../
BASEDIR=`basename $PWD`
cd ..
chown -R ${USERID}.${GRPID} $BASEDIR
@@ -57,7 +62,7 @@
REMOVE_LN=$PWD/ctdb-$VERSION
fi
echo -n "Creating ctdb-${VERSION}.tar.bz2 ... "
-tar --exclude=.bzr --exclude .bzrignore --exclude packaging -cf - ctdb-${VERSION}/. | bzip2 > ${SRCDIR}/ctdb-${VERSION}.tar.bz2
+tar --exclude=.bzr --exclude .bzrignore --exclude packaging --exclude="*~" -cf - ctdb-${VERSION}/. | bzip2 > ${SRCDIR}/ctdb-${VERSION}.tar.bz2
echo "Done."
if [ $? -ne 0 ]; then
echo "Build failed!"
@@ -71,16 +76,15 @@
##
## copy additional source files
##
-tar --exclude=.svn -jcvf - setup > ${SRCDIR}/ctdb-setup.tar.bz2
-cp -p ${SPECFILE} ${SPECDIR}
+(cd packaging/RHEL && tar --exclude=.bzr --exclude="*~" -jcvf - setup) > ${SRCDIR}/ctdb-setup.tar.bz2
+cp -p ${RHEL}/${SPECFILE} ${SPECDIR}
##
## Build
##
echo "$(basename $0): Getting Ready to build release package"
cd ${SPECDIR}
-${RPM} -ba --clean --rmsource $EXTRA_OPTIONS $SPECFILE
+${RPMBUILD} -ba --clean --rmsource $EXTRA_OPTIONS $SPECFILE
echo "$(basename $0): Done."
[ ${REMOVE_LN} ] && rm $REMOVE_LN
-
More information about the samba-cvs
mailing list