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.
26 CONCURRENCY_LEVEL ?= 1
27 export CONCURRENCY_LEVEL
31 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
37 destdir=$(CURDIR)/debian/tmp
39 configure: configure-stamp
42 # # Add here commands to configure the package.
43 rm -f Doxyfile.local SConfig local_config.hh
45 # If needed, we could create new files 'Doxyfile.local',
46 # 'SConfig' and/or 'local_config.hh' here. We don't remove them
47 # in 'clean' to allow building a source package from an
48 # individually configured svn working copy. (The files are ignored
49 # by dpkg-buildpackge because of appropriate -I arguments provided
50 # by 'scons deb' and 'scons debsrc'
53 build: build-arch build-indep
55 build-arch: build-arch-final build-arch-debug
57 build-arch-final: build-arch-final-stamp
58 build-arch-final-stamp: configure-stamp
59 # Add here commands to compile the arch part of the package.
60 scons -j $(CONCURRENCY_LEVEL) default final=1
61 scons $(destdir)/usr/lib final=1 PREFIX='$(destdir)/usr'
64 build-arch-debug: build-arch-debug-stamp
65 build-arch-debug-stamp: configure-stamp
66 # Add here commands to compile the arch part of the package.
67 scons -j $(CONCURRENCY_LEVEL) default LIBADDSUFFIX=_g OBJADDSUFFIX=_g
68 scons $(destdir)/usr/lib LIBADDSUFFIX=_g OBJADDSUFFIX=_g \
69 PREFIX='$(destdir)/usr' OBJINSTALLDIR='$$LIBINSTALLDIR/debug'
72 build-indep: build-indep-stamp
73 build-indep-stamp: configure-stamp
74 # Add here commands to compile the indep part of the package.
75 scons -j $(CONCURRENCY_LEVEL) all_docs
79 scons $(destdir)/usr/include $(destdir)/usr/share/doc \
80 PREFIX='$(destdir)/usr' \
81 DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc/html' \
82 INCLUDEINSTALLDIR='$$PREFIX/include/senf'
83 # Remove all the files not really needed from the documentation directories
84 find $(destdir)/usr/share/doc/libsenf-doc/html \
85 -type f ! -regex '.*\.\(html\|css\|png\|php\|idx\|tag\)' | xargs rm -f
86 # We need to install the example sourcecode
87 find Examples \( -name "*.hh" -o -name "*.cc" \) -printf "%P\n" | \
89 dir="$(destdir)/usr/share/doc/libsenf-doc/examples/$$(dirname "$$src")"; \
91 cp "Examples/$$src" "$$dir"; \
96 # Add here commands to clean up after the build process.
98 -scons -c all LIBADDSUFFIX=_g OBJADDSUFFIX=_g
103 rm -f build-arch-*-stamp build-indep-stamp configure-stamp
106 install: install-arch install-indep
107 install-indep: build-indep
110 dh_clean -k -i -Xdebian/tmp
112 # Add here commands to install the indep part of the package into
113 # debian/<package>-doc.
116 install-arch: build-arch
119 dh_clean -k -s -Xdebian/tmp
121 # Add here commands to install the arch part of the package into
125 # Must not depend on anything. This is to be called by
126 # binary-arch/binary-indep
127 # in another 'make' thread.
136 # dh_installlogrotate
147 dh_compress -Xhtml -Xdoclib -Xexamples
157 binary-indep: build-indep install-indep
158 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
160 binary-arch: build-arch install-arch
161 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
163 binary: binary-arch binary-indep
164 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch \
165 binary-arch-common binary-arch-final binary-arch-debug