From: g0dil Date: Fri, 31 Aug 2007 10:57:35 +0000 (+0000) Subject: Completed 'Build=Depends' (validated with pbuilder) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=e538a1cc66b4998b7ed7cb57b92297392c0c36d7;p=senf.git Completed 'Build=Depends' (validated with pbuilder) Fix SConstruct to work in pbuilder Adjust Makefile to take prerequisites from debian/control git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@421 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Makefile b/Makefile index ae3cae0..9431cfe 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ #---------------------------------------------------------------------- # Some SCONS shortcuts #---------------------------------------------------------------------- -SCONS=scons + +CONCURRENCY_LEVEL ?= 1 + +SCONS=scons -j $(CONCURRENCY_LEVEL) default: build @@ -11,27 +14,32 @@ build: clean: $(SCONS) --clean all -all_docs all_tests: +all_docs all_tests all: $(SCONS) $@ #---------------------------------------------------------------------- # Subversion stuff #---------------------------------------------------------------------- -SVN_REVISION = $(shell svnversion) svn_version: - @echo $(SVN_REVISION) + @svnversion #---------------------------------------------------------------------- # Building SENF requires some debian packages #---------------------------------------------------------------------- -DEB_BASE = scons build-essential binutils-dev -DEB_BOOST = libboost-dev libboost-test-dev -DEB_BOOST += libboost-date-time-dev libboost-regex-dev libboost-thread-dev -DEB_DOC = doxygen dia tidy xsltproc graphviz +DEB_BASE = build-essential + +# This line parses the 'Build-Depends' entry from debian/control +DEB_SENF = $(shell perl -an -F'[:,]' -e ' \ + BEGIN{ $$,=" " } \ + $$P=0 if /^\S/; \ + map {s/\(.*\)//} @F; \ + print @F if $$P; \ + if (/^Build-Depends:/) { print @F[1..$$\#F]; $$P=1 }' \ + debian/control | xargs echo) prerequisites: - aptitude install $(DEB_BASE) $(DEB_BOOST) $(DEB_DOC) + aptitude install $(DEB_BASE) $(DEB_SENF) package: $(SCONS) deb diff --git a/SConstruct b/SConstruct index 22a95af..8739426 100644 --- a/SConstruct +++ b/SConstruct @@ -53,6 +53,10 @@ if os.environ.get('debian_build'): else: rev = 'r' + os.popen("svnversion").read().strip().lower() +logname = os.environ.get('LOGNAME') +if not logname: + logname = pwd.getpwuid(os.getuid()).pw_name + env.Append( CPPPATH = [ '#' ], LIBS = [ 'iberty', '$BOOSTREGEXLIB' ], @@ -60,7 +64,7 @@ env.Append( DOXY_HTML_XSL = '#/doclib/html-munge.xsl', ENV = { 'TODAY' : str(datetime.date.today()), 'REVISION' : rev, - 'LOGNAME' : os.environ['LOGNAME'], # needed by the debian build scripts + 'LOGNAME' : logname, # needed by the debian build scripts 'CONCURRENCY_LEVEL' : env.GetOption('num_jobs') or "1" }, ) diff --git a/debian/control b/debian/control index f50d3b1..ab91aa9 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,17 @@ Source: libsenf Priority: extra Maintainer: Stefan Bund -Build-Depends: debhelper (>= 5), scons, libboost-dev, libboost-test-dev, libboost-date-time-dev, libboost-regex-dev, libboost-thread-dev, doxygen, dia, tidy, xsltproc, graphviz +Build-Depends: debhelper (>= 5), scons, binutils-dev, libboost-dev, + libboost-test-dev, libboost-date-time-dev, libboost-regex-dev, + libboost-thread-dev, doxygen, dia, tidy, xsltproc, graphviz Standards-Version: 3.7.2 Section: libs Package: libsenf-dev Section: libdevel Architecture: any -Depends: binutils-dev, libboost-dev, libboost-regex-dev, libboost-date-time-dev, libboost-thread-dev +Depends: binutils-dev, libboost-dev, libboost-regex-dev, + libboost-date-time-dev, libboost-thread-dev Description: SENF Extensible Network Framework, development files The SENF Simple and Extensible Network Framework aims to be a complete set of libraries to facilitate the development of network