Debian Codegraph @

debian/rules

raw
1 #! /usr/bin/make -f
2
3 export DH_OPTIONS
4
5 ## use hardening some flags
6 DPKG_EXPORT_BUILDFLAGS = 1
7 DEB_BUILD_MAINT_OPTIONS=hardening=+all
8 export DEB_BUILD_MAINT_OPTIONS
9
10 include /usr/share/dpkg/buildflags.mk
11 include /usr/share/dpkg/pkg-info.mk
12
13 #ifneq (,$(filter-out $(DEB_HOST_ARCH), alpha hppa arm))
14 # HARD_CFLAGS += -fstack-protector --param ssp-buffer-size=4
15 #endif
16 #ifneq (,$(filter-out $(DEB_HOST_ARCH), ia64 hppa avr32))
17 # HARD_LDFLAGS += -Wl,-z,relro
18 #endif
19 #
20 ## Keep dpkg-buildpackage the hell out of messing with our compile flags,
21 ## we should trust upstream to know better than it what to use here.
22 ## We do append -g for release builds though, for the detached -dbg package,
23 ## and also now the hardening flags too as appropriate.
24 #CPPFLAGS = $(HARD_CPPFLAGS)
25 #CFLAGS = $(HARD_CFLAGS) -g
26 #CXXFLAGS = $(HARD_CFLAGS) -g
27 #LDFLAGS = $(HARD_LDFLAGS)
28
29 BUILDDIR = obj-$(DEB_HOST_MULTIARCH)
30
31 %:
32 dh $@ --buildsystem=cmake
33
34 override_dh_update_autotools_config:
35
36 override_dh_autoreconf:
37
38 override_dh_auto_configure:
39 dh_auto_configure -B $(BUILDDIR)-static -- \
40 $(INSTALL_MANPAGES)
41 dh_auto_configure -- \
42 -DBUILD_SHARED_LIBS=ON \
43 $(INSTALL_MANPAGES)
44
45 override_dh_auto_build:
46 dh_auto_build -B $(BUILDDIR)-static
47 dh_auto_build
48
49 override_dh_auto_install:
50 dh_auto_install -B $(BUILDDIR)-static
51 dh_auto_install
52
53 DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
54 debian/.*|doc/.*\.png
55 # licensecheck v1
56 .PHONY: licensecheck
57 licensecheck:
58 LANG=C.UTF-8 licensecheck \
59 -i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
60 --check '.*' --recursive --deb-machine --lines 0 * \
61 > debian/copyright_newhints
62 cmp debian/copyright_hints debian/copyright_newhints \
63 && rm debian/copyright_newhints