3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
19 # This has to be exported to make some magic below work.
22 CONCURRENCY_LEVEL ?= 1
23 export CONCURRENCY_LEVEL
25 destdir=$(CURDIR)/debian/tmp
27 configure: configure-stamp
30 # Add here commands to configure the package.
31 # rm -f Doxyfile.local SConstruct.local senf/local_config.hh
33 # If needed, we could create new files 'Doxyfile.local',
34 # 'SConstruct.local' and/or 'local_config.hh' here. We don't
35 # remove them in 'clean' to allow building a source package from
36 # an individually configured svn working copy. (The files are
37 # ignored by dpkg-buildpackge because of appropriate -I
38 # arguments provided by 'scons deb' and 'scons debsrc'
41 build: build-arch build-indep
43 build-arch: build-arch-debug build-arch-final
45 build-arch-final: build-arch-final-stamp
46 build-arch-final-stamp: configure-stamp
47 # Add here commands to compile the arch part of the package.
48 scons -j $(CONCURRENCY_LEVEL) $(destdir)/usr/lib $(destdir)/usr/bin \
50 PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$PREFIX/lib/senf/final'
53 build-arch-debug: build-arch-debug-stamp
54 build-arch-debug-stamp: configure-stamp
55 # Add here commands to compile the arch part of the package.
56 scons -j $(CONCURRENCY_LEVEL) $(destdir)/usr/lib \
57 LIBADDSUFFIX=_g OBJADDSUFFIX=_g syslayout=1 \
58 PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$PREFIX/lib/senf/debug'
61 build-indep: build-indep-stamp
62 build-indep-stamp: configure-stamp
63 # Add here commands to compile the indep part of the package.
64 # scons -j $(CONCURRENCY_LEVEL) all_docs
67 # scons $(destdir)/usr/include $(destdir)/usr/share/doc \
68 # syslayout=1 PREFIX='$(destdir)/usr' \
69 # DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc/html'
70 scons $(destdir)/usr/include syslayout=1 PREFIX='$(destdir)/usr'
71 # We need to install the example sourcecode
72 find Examples \( -name "*.hh" -o -name "*.cc" -o -name SConstruct \) -printf "%P\n" | \
74 dir="$(destdir)/usr/share/doc/libsenf-doc/examples/$$(dirname "$$src")"; \
76 cp "Examples/$$src" "$$dir"; \
81 # Add here commands to clean up after the build process.
83 -scons -c all LIBADDSUFFIX=_g OBJADDSUFFIX=_g
88 rm -f build-arch-*-stamp build-indep-stamp configure-stamp
91 install: install-arch install-indep
92 install-indep: build-indep
95 dh_clean -k -i -Xdebian/tmp
97 # Add here commands to install the indep part of the package into
98 # debian/<package>-doc.
99 dh_install -X.svn -X.git -i
101 install-arch: build-arch
104 dh_clean -k -s -Xdebian/tmp
106 # Add here commands to install the arch part of the package into
108 dh_install -X.svn -X.git -s
110 # Must not depend on anything. This is to be called by
111 # binary-arch/binary-indep
112 # in another 'make' thread.
121 # dh_installlogrotate
132 dh_compress -Xhtml -Xdoclib -Xexamples
142 binary-indep: build-indep install-indep
143 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
145 binary-arch: build-arch install-arch
146 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
148 binary: binary-arch binary-indep
149 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch \
150 binary-arch-common binary-arch-final binary-arch-debug