Skip to content
Snippets Groups Projects
Commit 4bc4a112 authored by g0dil's avatar g0dil
Browse files

debian: Add README.Debian file to all packages

debian: Optimize build process (compile in build stage not in binary stage)
parent fff66dcc
No related branches found
No related tags found
No related merge requests found
......@@ -715,8 +715,8 @@
GREPacket.hh:
\code
#ifndef GRE_PACKET_HH
#define GRE_PACKET_HH
#ifndef HH_GREPacket_
#define HH_GREPacket_
#include <senf/Packets.hh>
......@@ -934,7 +934,7 @@
documentation of all the packet parser macros.</td></tr>
<tr><td>\ref parseint, \n \ref parsecollection</td> <td>There are several lists of available
reusable packet parsers: . However, this list is not complete as there are other protocol
reusable packet parsers. However, these lists are not complete as there are other protocol
specific reusable parsers (without claiming to be exhaustive: senf::INet4AddressParser,
senf::INet6AddressParser, senf::MACAddressParser)</td></tr>
......@@ -951,6 +951,5 @@
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
// compile-command: "scons -u doc"
// mode: flyspell
// mode: auto-fill
// End:
......@@ -18,10 +18,4 @@ The main goals of this library are (in no particular order):
- extensible design
- concise interface
Getting started
---------------
Information on using the library including some extensively documented
examples are found in the 'libsenf-doc' package.
-- Stefan Bund <senf-dev@lists.berlios.de> Tue, 28 Aug 2007 10:02:23 +0200
......@@ -191,14 +191,14 @@ SENFSCons.StandardTargets(env)
SENFSCons.GlobalTargets(env)
SENFSCons.Doxygen(env)
SENFSCons.DoxyXRef(env,
HTML_HEADER = '#/doclib/doxy-header-overview.html',
HTML_HEADER = '#/doclib/doxy-header.html',
HTML_FOOTER = '#/doclib/doxy-footer.html')
SENFSCons.InstallIncludeFiles(env, [ 'config.hh' ])
# Build combined library 'libsenf'
libsenf = env.Library(
SENFSCons.LibPath(env['LIBSENF']),
'senf${LIBADDSUFFIX}',
Flatten([ env.File(SENFSCons.LibPath(lib)).sources for lib in env['ALLLIBS'] ]))
env.Default(libsenf)
env.Clean('all', libsenf)
......@@ -225,7 +225,7 @@ PhonyTarget(env, 'debsrc', [
PhonyTarget(env, 'debbin', [
checkLocalConf,
updateRevision,
"$BUILDPACKAGE_COMMAND -b -nc",
"$BUILDPACKAGE_COMMAND -b",
"fakeroot ./debian/rules debclean"
])
......
Th SENF debian distribution consists of the following packages:
libsenf non-debug static library /usr/lib/libsenf.a
/usr/lib/senf-packets/
libsenf-dbg debug static library /usr/lib/libsenf_g.a
/usr/lib/debug/senf-packets/
libsenf-dev include files /usr/include/senf
libsenf-doc documentation /usr/share/doc/libsenf-doc/
So to develop using SENF, you will need 'libsenf-dev' and one of
'libsenf' or 'libsenf-dbg' however, you will probably want to install
both, 'libsenf' and 'libsenf-dbg'.
To compile an application against the debug library, just link against
the libsenf_g.a library.
To compile an application against the non-debug library, link against
libsenf.a AND ENSURE, THE PREPROCESSOR SYMBOL 'SENF_NO_DEBUG' IS
DEFINED in your build, best by adding '-DSENF_NO_DEBUG' to CPPFLAGS.
Lets repeat that:
VERY IMPORTANT: When building against libsenf.a, you MUST define
SENF_NO_DEBUG. Don't say, you haven't been warned ...
......@@ -34,8 +34,9 @@ Section: libdevel
Architecture: all
Depends: binutils-dev, libboost-dev, libboost-regex-dev,
libboost-date-time-dev, libboost-thread-dev,
libboost-filesystem-dev, libsenf | libsenf-dbg
Recommends: libsenf, libsenf-dbg
libboost-filesystem-dev, libsenf (=${binary:Version}) | libsenf-dbg (=${binary:Version})
Recommends: libsenf (=${binary:Version}), libsenf-dbg (=${binary:Version})
Suggests: libsenf-doc (=${binary:Version})
Description: SENF Extensible Network Framework, header files
The SENF Simple and Extensible Network Framework aims to be a
complete set of libraries to facilitate the development of network
......
debian/tmp/usr/lib/libsenf_g.a
debian/tmp/usr/lib/*.o usr/lib/debug/senf-packets
debian/tmp/usr/lib/debug/*.o usr/lib/debug/senf-packets
README usr/share/doc/libsenf-dbg
debian/README.Debian usr/share/doc/libsenf-dbg
......@@ -5,3 +5,4 @@ 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
debian/tmp/usr/share/doc/libsenf-doc
README usr/share/doc/libsenf-doc
debian/index.html usr/share/doc/libsenf-doc
README usr/share/doc/libsenf-doc
debian/README.Debian usr/share/doc/libsenf-doc
debian/tmp/usr/lib/libsenf.a
debian/tmp/usr/lib/*.o usr/lib/senf-packets
README usr/share/doc/libsenf
debian/README.Debian usr/share/doc/libsenf
......@@ -50,26 +50,49 @@ configure-stamp:
# by 'scons deb' and 'scons debsrc'
touch configure-stamp
build: #build-arch build-indep
build: build-arch build-indep
build-arch: build-arch-$(LIBTYPE)-stamp
build-arch-$(LIBTYPE)-stamp: configure-stamp
build-arch: build-arch-final build-arch-debug
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'
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 $(SCONS_OPTIONS)
scons -j $(CONCURRENCY_LEVEL) default LIBADDSUFFIX=_g OBJADDSUFFIX=_g
scons $(destdir)/usr/lib LIBADDSUFFIX=_g OBJADDSUFFIX=_g \
PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$LIBINSTALLDIR/debug'
touch $@
build-indep: build-indep-stamp
build-indep-stamp: configure-stamp
# Add here commands to compile the indep part of the package.
scons -j $(CONCURRENCY_LEVEL) all_docs
scons all_docs
scons linklint
scons fixlinks
scons $(destdir)/usr/include $(destdir)/usr/share/doc $(SCONS_OPTIONS) \
PREFIX='$(destdir)/usr' \
DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc' \
INCLUDEINSTALLDIR='$$PREFIX/include/senf'
# We need to install the example sourcecode
find Examples \( -name "*.hh" -o -name "*.cc" \) -printf "%P\n" | \
while read src; do \
dir="$(destdir)/usr/share/doc/libsenf-doc/examples/$$(dirname "$$src")"; \
mkdir -p "$$dir"; \
cp "Examples/$$src" "$$dir"; \
done
touch $@
clean: debclean
# Add here commands to clean up after the build process.
-scons -c all
-scons -c all LIBSENF=senf_g
-scons -c all LIBADDSUFFIX=_g OBJADDSUFFIX=_g
debclean:
dh_testdir
......@@ -77,36 +100,24 @@ debclean:
rm -f build-arch-*-stamp build-indep-stamp configure-stamp
dh_clean
install: #install-indep install-arch
install: install-arch install-indep
install-indep: build-indep
dh_testdir
dh_testroot
dh_clean -k -i
dh_clean -k -i -Xdebian/tmp
dh_installdirs -i
# Add here commands to install the indep part of the package into
# debian/<package>-doc.
scons $(destdir)/usr/include $(destdir)/usr/share/doc $(SCONS_OPTIONS) \
PREFIX='$(destdir)/usr' \
DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc' \
INCLUDEINSTALLDIR='$$PREFIX/include/senf'
# We need to install the example sourcecode
find Examples \( -name "*.hh" -o -name "*.cc" \) -printf "%P\n" | \
while read src; do \
dir="$(destdir)/usr/share/doc/libsenf-doc/examples/$$(dirname "$$src")"; \
mkdir -p "$$dir"; \
cp "Examples/$$src" "$$dir"; \
done
dh_install -X.svn -i
install-arch: build-arch
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs # options provided by DH_OPTIONS
dh_clean -k -s -Xdebian/tmp
dh_installdirs -s
# Add here commands to install the arch part of the package into
# debian/tmp.
scons $(destdir)/usr/lib $(SCONS_OPTIONS) PREFIX='$(destdir)/usr'
dh_install -X.svn # options provided by DH_OPTIONS
dh_install -X.svn -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
......@@ -143,24 +154,7 @@ binary-common:
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
binary-arch: binary-arch-final binary-arch-debug
binary-arch-final:
$(MAKE) -f debian/rules \
DH_OPTIONS="-s -Nlibsenf-dbg" \
SCONS_OPTIONS="final=1" \
LIBTYPE="final" \
binary-arch-common
binary-arch-debug:
$(MAKE) -f debian/rules \
DH_OPTIONS="-plibsenf-dbg" \
SCONS_OPTIONS="LIBSENF=senf_g" \
LIBTYPE="debug" \
binary-arch-common
binary-arch-common: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS="$(DH_OPTIONS)" binary-common
binary-arch: build-arch install-arch
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch \
......
......@@ -300,7 +300,7 @@ def GlobalTargets(env):
## \brief Return path of a built library within $LOCALLIBDIR
# \internal
def LibPath(lib): return '$LOCALLIBDIR/lib%s.a' % lib
def LibPath(lib): return '${LOCALLIBDIR}/${LIBPREFIX}%s${LIBADDSUFFIX}${LIBSUFFIX}' % lib
## \brief Build object files
#
......@@ -342,7 +342,7 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ
target = 'test',
objects = objects,
test_sources = testSources,
LIBS = LIBS,
LIBS = [ x + '$LIBADDSUFFIX' for x in LIBS ],
OBJECTS = OBJECTS,
DEPENDS = [ env.File(LibPath(x)) for x in LIBS ])
env.Alias('all_tests', test)
......@@ -609,7 +609,7 @@ def Object(env, target, sources, testSources = None, LIBS = [], OBJECTS = [], no
objects = Objects(env,sources,testSources,LIBS=LIBS,OBJECTS=OBJECTS)
ob = None
if objects:
ob = env.Command(target+".o", objects, "ld -r -o $TARGET $SOURCES")
ob = env.Command(target+"${OBJADDSUFFIX}${OBJSUFFIX}", objects, "ld -r -o $TARGET $SOURCES")
env.Default(ob)
env.Alias('default', ob)
InstallWithSources(env, ob, '$OBJINSTALLDIR', sources, testSources, no_includes)
......@@ -630,7 +630,7 @@ def Binary(env, binary, sources, testSources = None, LIBS = [], OBJECTS = [], no
program = None
if objects:
progEnv = env.Copy()
progEnv.Prepend(LIBS = LIBS)
progEnv.Prepend(LIBS = [ x + '$LIBADDSUFFIX' for x in LIBS ])
program = progEnv.ProgramNoScan(target=binary,source=objects+OBJECTS)
env.Default(program)
env.Depends(program, [ env.File(LibPath(x)) for x in LIBS ])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment