From: g0dil Date: Mon, 24 Aug 2009 20:29:27 +0000 (+0000) Subject: Fix debian package build X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=2e7dc69c3a63bac0a9df1abbcece62c03112a1ab;p=senf.git Fix debian package build git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1334 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/.gitignore b/.gitignore index 1b0466f..3f110ea 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ all_includes.hh doc/ .test.bin .test.stamp +/libsenf_g.a diff --git a/SConstruct b/SConstruct index 1c63e04..18a3397 100644 --- a/SConstruct +++ b/SConstruct @@ -57,11 +57,11 @@ env.Append( '$BOOSTIOSTREAMSLIB', '$BOOSTSIGNALSLIB', '$BOOSTFSLIB' ], TEST_EXTRA_LIBS = [ ], - PREFIX = '/usr/local', - LIBINSTALLDIR = '$PREFIX', - BININSTALLDIR = '$PREFIX', - INCLUDEINSTALLDIR = '$PREFIX', - OBJINSTALLDIR = '$LIBINSTALLDIR', + PREFIX = '#/dist', + LIBINSTALLDIR = '$PREFIX${syslayout and "/lib" or ""}', + BININSTALLDIR = '$PREFIX${syslayout and "/bin" or ""', + INCLUDEINSTALLDIR = '$PREFIX${syslayout and "/include" or ""}', + OBJINSTALLDIR = '$LIBINSTALLDIR${syslayout and "/$LIBINSTALLDIR/senf" or ""', DOCINSTALLDIR = '$PREFIX/docs', CPP_INCLUDE_EXTENSIONS = [ '.h', '.hh', '.ih', '.mpp', '.cci', '.ct', '.cti' ], CPP_EXCLUDE_EXTENSIONS = [ '.test.hh' ], @@ -96,9 +96,10 @@ env.Append( ) env.SetDefault( - LIBSENF = "senf", - final = 0, - debug = 0, + LIBSENF = "senf", + final = 0, + debug = 0, + syslayout = 0 ) # Set variables from command line @@ -117,7 +118,9 @@ if not env.GetOption('clean') and not os.path.exists(".prepare-stamp") \ # Load SConscripts +SConscriptChdir(0) SConscript("debian/SConscript") +SConscriptChdir(1) if os.path.exists('SConscript.local') : SConscript('SConscript.local') SConscript("senf/SConscript") SConscript("Examples/SConscript") diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..5bd5ee6 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,5 @@ +/changelog +/files +/*.debhelper.log +/libsenf*/ +/tmp/ diff --git a/debian/SConscript b/debian/SConscript index 1233a2e..769a700 100644 --- a/debian/SConscript +++ b/debian/SConscript @@ -21,7 +21,7 @@ def updateRevision(target, source, env): rev = rev[:-1] if 'm' in rev: rev = rev[:-1] - url = None + url = '' for line in os.popen("svn info"): elts=line.split(':',1) if elts[0] == 'URL': @@ -31,7 +31,7 @@ def updateRevision(target, source, env): version = url.rsplit('/',1)[-1].split('_',1)[0] if version[0] not in string.digits: version = None - if version is None: + if not version: version = '1:0r%s' % rev changelog = file('debian/changelog.template').read() % { 'version': version, @@ -65,6 +65,10 @@ if os.environ.get('debian_build'): rev = os.popen("dpkg-parsechangelog | awk '/^Version:/{print $2}'").read().strip() else: rev = 'r' + os.popen("svnversion").read().strip().lower() + if rev == 'rexported': + rev = 'r' + os.popen("gitsvnversion").read().strip().lower() + if rev == '': + rev = 'unknown' logname = os.environ.get('LOGNAME') if not logname: @@ -82,7 +86,7 @@ env.Append( ENV = { }) env.Replace( - LOCAL_CONFIG_FILES = [ '/Doxyfile.local', '/SConfig', '/local_config.hh' ], + LOCAL_CONFIG_FILES = [ '/Doxyfile.local', '/SConscript.local', '/senf/local_config.hh' ], DPKG_IGNORED_FILES = [ '$LOCAL_CONFIG_FILES', '.svn', '/_templates' ], DPKG_IGNORED_FILES_OPTS = dpkgIgnoredFilesOpts, BUILDPACKAGE_COMMAND = "dpkg-buildpackage -us -uc -rfakeroot $DPKG_IGNORED_FILES_OPTS", diff --git a/debian/control b/debian/control index dee5ab7..fdeeaa4 100644 --- a/debian/control +++ b/debian/control @@ -1,13 +1,18 @@ Source: libsenf Priority: extra Maintainer: Stefan Bund -Build-Depends: debhelper (>= 5), scons (>= 0.97), g++, binutils-dev, libboost-dev, - libboost-test-dev, libboost-date-time-dev, libboost-regex-dev, - libboost-filesystem-dev, libboost-serialization-dev, libboost-iostreams-dev, - libboost-signals-dev, doxygen (>= 1.5.5), libreadline-dev, dia, tidy, xsltproc, - graphviz, perl-base, linklint, netpbm, gs, tetex-bin, tetex-extra -Standards-Version: 3.7.2 -Section: libs +Build-Depends: debhelper (>= 5), scons (>= 0.97), g++, binutils-dev, + libboost-dev | libboost1.35-dev, + libboost-test-dev | libboost-test1.35-dev, + libboost-date-time-dev | libboost-date-time1.35-dev, + libboost-regex-dev | libboost-regex1.35-dev, + libboost-filesystem-dev | libboost-filesystem1.35-dev, + libboost-serialization-dev | libboost-serialization1.35-dev, + libboost-iostreams-dev | libboost-iostreams1.35-dev, + libboost-signals-dev | libboost-signals1.35-dev, + doxygen (>= 1.5.5), libreadline-dev, dia, tidy, xsltproc, graphviz, + perl-base, linklint, netpbm, gs, tetex-extra | texlive-extra-utils +Standards-Version: 3.7.2 Section: libs Package: libsenf Section: libdevel @@ -34,9 +39,13 @@ Description: SENF Extensible Network Framework, static library (debug build) Package: libsenf-dev Section: libdevel Architecture: all -Depends: binutils-dev, libboost-dev, libboost-regex-dev, - libboost-date-time-dev, libboost-thread-dev, libboost-serialization-dev, - libboost-filesystem-dev, libboost-signals-dev, +Depends: binutils-dev, libboost-dev | libboost-1.35-dev, + libboost-regex-dev | libboost-regex1.35-dev, + libboost-date-time-dev | libboost-date-time1.35-dev, + libboost-thread-dev | libboost-thread1.35-dev, + libboost-serialization-dev | libboost-serialization1.35-dev, + libboost-filesystem-dev | libboost-filesystem1.35-dev, + libboost-signals-dev | libboost-signals1.35-dev, libsenf (=${source:Version}) | libsenf-dbg (=${source:Version}) Recommends: libsenf (=${source:Version}), libsenf-dbg (=${source:Version}) Suggests: libsenf-doc (=${source:Version}) diff --git a/debian/libsenf-dbg.install b/debian/libsenf-dbg.install index b943a57..f3193ca 100644 --- a/debian/libsenf-dbg.install +++ b/debian/libsenf-dbg.install @@ -1,4 +1,4 @@ debian/tmp/usr/lib/libsenf_g.a -debian/tmp/usr/lib/debug/*.o usr/lib/debug/senf-packets +debian/tmp/usr/lib/senf/debug/*_g.o usr/lib/senf README usr/share/doc/libsenf-dbg debian/README.Debian usr/share/doc/libsenf-dbg diff --git a/debian/libsenf-dev.install b/debian/libsenf-dev.install index f40b4aa..d27ef05 100644 --- a/debian/libsenf-dev.install +++ b/debian/libsenf-dev.install @@ -1,8 +1,3 @@ debian/tmp/usr/include/senf usr/include -boost usr/include/senf -local_config.hh usr/include/senf -include/senf/Socket.hh usr/include/senf -include/senf/Packets.hh usr/include/senf -include/senf/PPI.hh usr/include/senf README usr/share/doc/libsenf-dev debian/README.Debian usr/share/doc/libsenf-dev diff --git a/debian/libsenf.install b/debian/libsenf.install index 812eee7..029c17b 100644 --- a/debian/libsenf.install +++ b/debian/libsenf.install @@ -1,4 +1,4 @@ debian/tmp/usr/lib/libsenf.a -debian/tmp/usr/lib/*.o usr/lib/senf-packets +debian/tmp/usr/lib/senf/*.o README usr/share/doc/libsenf debian/README.Debian usr/share/doc/libsenf diff --git a/debian/rules b/debian/rules index 8f1cefc..a7d1b80 100755 --- a/debian/rules +++ b/debian/rules @@ -19,50 +19,43 @@ export debian_build # This has to be exported to make some magic below work. export DH_OPTIONS -CFLAGS = -Wall -g - CONCURRENCY_LEVEL ?= 1 export CONCURRENCY_LEVEL -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - destdir=$(CURDIR)/debian/tmp configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. - rm -f Doxyfile.local SConfig local_config.hh +# rm -f Doxyfile.local SConstruct.local senf/local_config.hh scons prepare # If needed, we could create new files 'Doxyfile.local', -# 'SConfig' and/or 'local_config.hh' here. We don't remove them -# in 'clean' to allow building a source package from an -# individually configured svn working copy. (The files are ignored -# by dpkg-buildpackge because of appropriate -I arguments provided -# by 'scons deb' and 'scons debsrc' +# 'SConstruct.local' and/or 'local_config.hh' here. We don't +# remove them in 'clean' to allow building a source package from +# an individually configured svn working copy. (The files are +# ignored by dpkg-buildpackge because of appropriate -I +# arguments provided by 'scons deb' and 'scons debsrc' touch configure-stamp build: build-arch build-indep -build-arch: build-arch-final build-arch-debug +build-arch: build-arch-debug build-arch-final build-arch-final: build-arch-final-stamp build-arch-final-stamp: configure-stamp # Add here commands to compile the arch part of the package. scons -j $(CONCURRENCY_LEVEL) default final=1 - scons $(destdir)/usr/lib final=1 PREFIX='$(destdir)/usr' + scons $(destdir)/usr/lib $(destdir)/usr/bin final=1 syslayout=1 \ + PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$PREFIX/lib/senf' touch $@ build-arch-debug: build-arch-debug-stamp build-arch-debug-stamp: configure-stamp # Add here commands to compile the arch part of the package. scons -j $(CONCURRENCY_LEVEL) default LIBADDSUFFIX=_g OBJADDSUFFIX=_g - scons $(destdir)/usr/lib LIBADDSUFFIX=_g OBJADDSUFFIX=_g \ - PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$LIBINSTALLDIR/debug' + scons $(destdir)/usr/lib syslayout=1 LIBADDSUFFIX=_g OBJADDSUFFIX=_g \ + PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$PREFIX/lib/senf/debug' touch $@ build-indep: build-indep-stamp @@ -72,10 +65,9 @@ build-indep-stamp: configure-stamp scons all_docs scons linklint scons fixlinks - scons $(destdir)/usr/include $(destdir)/usr/share/doc \ + scons $(destdir)/usr/include $(destdir)/usr/share/doc syslayout=1 \ PREFIX='$(destdir)/usr' \ - DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc/html' \ - INCLUDEINSTALLDIR='$$PREFIX/include/senf' + DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc/html' # Remove all the files not really needed from the documentation directories find $(destdir)/usr/share/doc/libsenf-doc/html \ -type f ! -regex '.*\.\(html\|css\|png\|php\|idx\|tag\)' | xargs rm -f diff --git a/senf/Packets/ListBParser.cti b/senf/Packets/ListBParser.cti index 7358fad..ac603c3 100644 --- a/senf/Packets/ListBParser.cti +++ b/senf/Packets/ListBParser.cti @@ -114,20 +114,6 @@ init(data_iterator i, state_type s) } template -prefix_ void -senf::detail::ListBParser_Policy::container_policy:: -construct(container_type & c) - const -{} - -template -prefix_ void -senf::detail::ListBParser_Policy::container_policy:: -destruct(container_type & c) - const -{} - -template prefix_ void senf::detail::ListBParser_Policy::container_policy:: erase(container_type & c, data_iterator p) { diff --git a/senf/Packets/ListBParser.ih b/senf/Packets/ListBParser.ih index d8f7b11..fe61177 100644 --- a/senf/Packets/ListBParser.ih +++ b/senf/Packets/ListBParser.ih @@ -107,11 +107,9 @@ namespace detail { size_type size (data_iterator i, state_type s) const; void init (data_iterator i, state_type s); - void construct (container_type & c) const; - void destruct (container_type & c) const; - void erase (container_type & c, data_iterator p); - void insert (container_type & c, data_iterator p); - void update (container_type const & c) const; + void erase (container_type & c, data_iterator p); + void insert (container_type & c, data_iterator p); + void update (container_type const & c) const; /** \brief Internal: ListBParser specific iterator data */ struct iterator_data {}; diff --git a/senf/Packets/ListNParser.cti b/senf/Packets/ListNParser.cti index c10b375..ca46454 100644 --- a/senf/Packets/ListNParser.cti +++ b/senf/Packets/ListNParser.cti @@ -68,18 +68,6 @@ prefix_ void senf::detail::ListNParser_Policy::init(dat template prefix_ void -senf::detail::ListNParser_Policy::construct(container_type & c) - const -{} - -template -prefix_ void -senf::detail::ListNParser_Policy::destruct(container_type & c) - const -{} - -template -prefix_ void senf::detail::ListNParser_Policy::erase(container_type & c, data_iterator p) const diff --git a/senf/Packets/ListNParser.ih b/senf/Packets/ListNParser.ih index f50bbfd..db54348 100644 --- a/senf/Packets/ListNParser.ih +++ b/senf/Packets/ListNParser.ih @@ -58,11 +58,9 @@ namespace detail { size_type size (data_iterator i, state_type s) const; void init (data_iterator i, state_type s) const; - void construct (container_type & c) const; - void destruct (container_type & c) const; - void erase (container_type & c, data_iterator p) const; - void insert (container_type & c, data_iterator p) const; - void update (container_type const & c) const; + void erase (container_type & c, data_iterator p) const; + void insert (container_type & c, data_iterator p) const; + void update (container_type const & c) const; /** Internal: ListNParser iterator specific data */ struct iterator_data { diff --git a/senf/Packets/ListParser.cti b/senf/Packets/ListParser.cti index 286c325..a16ed88 100644 --- a/senf/Packets/ListParser.cti +++ b/senf/Packets/ListParser.cti @@ -222,15 +222,12 @@ prefix_ senf::ListParser_Container:: ListParser_Container(parser_type const & list) : ListPolicy(static_cast(list)), state_(list.state()), i_(std::distance(data().begin(),list.i())) -{ - ListPolicy::construct(*this); -} +{} template prefix_ senf::ListParser_Container::~ListParser_Container() { ListPolicy::update(*this); - ListPolicy::destruct(*this); } // Accessors diff --git a/site_scons/SENFSCons.py b/site_scons/SENFSCons.py index fd19556..cc5e807 100644 --- a/site_scons/SENFSCons.py +++ b/site_scons/SENFSCons.py @@ -119,7 +119,7 @@ def AutoPacketBundle(env, name, exclude=[], subdirs=[], doc_extra_sources=[]): subscripts = glob.glob("*/SConscript") objects = env.Object(sources) - cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}', objects, NAME=((name))) + cobject = env.CombinedObject('${LOCALLIBDIR}/${NAME}${OBJADDSUFFIX}', objects, NAME=((name))) env.Default(cobject) env.Append(ALLOBJECTS = objects, PACKET_BUNDLES = cobject)