Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
7
8 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9 DEB_CXXFLAGS_MAINT_APPEND += -fno-inline
10 endif
11
12 export DEB_CXXFLAGS_MAINT_APPEND
13
14 ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
15 CONFIGURE_OPTS_TESTS = --disable-tests
16 endif
17
18 BUILDDIR=build
19
20
21 %:
22 dh $@ --builddirectory=$(BUILDDIR) --dbgsym-migration=aptitude-dbg
23
24
25 # -indep will clear the flags if we are doing full (arch+indep) build
26 override_dh_auto_configure-arch: CONFIGURE_OPTS_DOCS = --disable-docs
27 override_dh_auto_configure-indep: CONFIGURE_OPTS_DOCS =
28
29 override_dh_auto_configure-arch override_dh_auto_configure-indep:
30 dh_auto_configure -- \
31 --htmldir='$${docdir}/html' \
32 --program-transform='s&aptitude$$&aptitude-curses&' \
33 --disable-boost-lib-checks \
34 $(CONFIGURE_OPTS_DOCS) $(CONFIGURE_OPTS_TESTS)
35
36 override_dh_auto_test-arch:
37 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
38 # Run the unit tests, but protect against Boost.Test's flakiness.
39 (cd $(BUILDDIR) && $(MAKE) -C tests check || (cd tests && ./cppunit_test))
40 endif
41
42 override_dh_auto_test-indep:
43 #empty
44
45 override_dh_installdocs-arch:
46 dh_installdocs -paptitude -XREADME.Debian
47
48 override_dh_installdocs-indep:
49 dh_installdocs
50
51 @pkgs=`dh_listpackages | grep ^aptitude-doc`; \
52 for pkg in $$pkgs; do \
53 echo " installing html for $$pkg"; \
54 ll=`echo $$pkg | sed -e 's/^aptitude-doc-//'`; \
55 mkdir -p "debian/$$pkg/usr/share/doc/aptitude/html"; \
56 cp -Rf "debian/tmp/usr/share/doc/aptitude/html/$$ll" \
57 "debian/$$pkg/usr/share/doc/aptitude/html/$$ll"; \
58 done
59
60 # Disable dh_missing due to the manual installation hack above.
61 override_dh_missing:
62
63 override_dh_auto_install:
64 dh_auto_install
65
66 # Special case for "static" man page, move to program name
67 (cd debian/tmp/usr/share/man/gl/man8/ && mv aptitude.8 aptitude-curses.8)