#! /usr/bin/make -f export DH_OPTIONS ## use hardening some flags DPKG_EXPORT_BUILDFLAGS = 1 DEB_BUILD_MAINT_OPTIONS=hardening=+all export DEB_BUILD_MAINT_OPTIONS include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/pkg-info.mk #ifneq (,$(filter-out $(DEB_HOST_ARCH), alpha hppa arm)) # HARD_CFLAGS += -fstack-protector --param ssp-buffer-size=4 #endif #ifneq (,$(filter-out $(DEB_HOST_ARCH), ia64 hppa avr32)) # HARD_LDFLAGS += -Wl,-z,relro #endif # ## Keep dpkg-buildpackage the hell out of messing with our compile flags, ## we should trust upstream to know better than it what to use here. ## We do append -g for release builds though, for the detached -dbg package, ## and also now the hardening flags too as appropriate. #CPPFLAGS = $(HARD_CPPFLAGS) #CFLAGS = $(HARD_CFLAGS) -g #CXXFLAGS = $(HARD_CFLAGS) -g #LDFLAGS = $(HARD_LDFLAGS) BUILDDIR = obj-$(DEB_HOST_MULTIARCH) %: dh $@ --buildsystem=cmake override_dh_update_autotools_config: override_dh_autoreconf: override_dh_auto_configure: dh_auto_configure -B $(BUILDDIR)-static -- \ $(INSTALL_MANPAGES) dh_auto_configure -- \ -DBUILD_SHARED_LIBS=ON \ $(INSTALL_MANPAGES) override_dh_auto_build: dh_auto_build -B $(BUILDDIR)-static dh_auto_build override_dh_auto_install: dh_auto_install -B $(BUILDDIR)-static dh_auto_install DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \ debian/.*|doc/.*\.png # licensecheck v1 .PHONY: licensecheck licensecheck: LANG=C.UTF-8 licensecheck \ -i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \ --check '.*' --recursive --deb-machine --lines 0 * \ > debian/copyright_newhints cmp debian/copyright_hints debian/copyright_newhints \ && rm debian/copyright_newhints