1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#! /usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
#include /usr/share/hardening-includes/hardening.make
include /usr/share/dpkg/buildflags.mk
CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS)
CFLAGS += $(HARDENING_CFLAGS)
CFLAGS += $(CPPFLAGS)
CPPFLAGS += $(HARDENING_CFLAGS)
LDFLAGS += $(HARDENING_LDFLAGS)
DESTDIR = $(CURDIR)/debian/tmp/
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
DEBUG = DEBUG=yes
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
override_dh_auto_build:
cd $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)/ && \
$(MAKE) SYSTEM=linux PBKDF_BACKEND=gcrypt $(DEBUG)
# test needs the library, which can't be built ATM
override_dh_auto_test:
# for the rest, use debhelper
%:
dh $@
|