#!/usr/bin/make -f # -*- makefile -*- # hardening export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DH_OPTIONS += -O-Bbuild-tree UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -n '/\(Version:\)/{s/^Version:[[:space:]]\+\([0-9]\+:\)\?\(.*\)/\2/p}' | rev | cut -d- -f 2- | rev) LDFLAGS += -fPIE -pie -Wl,-z,relro -Wl,-z,now -fPIC CPPFLAGS += -D_FORTIFY_SOURCE=2 -fPIE -pie -Wl,-z,relro -Wl,-z,now CFLAGS += -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIE -pie -Wl,-z,relro -Wl,-z,now export CPPFLAGS export CFLAGS export LDFLAGS # # Test for gcc-5 support # #export CC=gcc-5 #export CXX=g++-5 %: dh $@ --with autoreconf ## # Arch dependent overrides ## override_dh_autoreconf-arch: dh_autoreconf override_dh_auto_configure-arch: dh_auto_configure -- --enable-shared override_dh_auto_build-arch: dh_auto_build -- V=1 override_dh_auto_test-arch: dh_auto_test -- V=1 ## # Arch independent overrides ## override_dh_autoreconf-indep override_dh_auto_configure-indep: ; override_dh_auto_test-indep override_dh_auto_install-indep: ; override_dh_auto_build-indep: install -d build-tree/docs/html cd build-tree && sed -e "s,@VERSION@,${UPSTREAM_VERSION},g" \ -e "s,@top_srcdir@,../,g" \ <../Doxyfile.in >Doxyfile cd build-tree && doxygen ## # Overrides common to both ## override_dh_compress: dh_compress -Xusr/share/doc/libmongo-client0/examples/ \ -Xusr/share/doc/libmongo-client0/html/ override_dh_strip: dh_strip --dbg-package=libmongo-client0-dbg override_dh_makeshlibs: dh_makeshlibs dpkg-gensymbols -v$(UPSTREAM_VERSION) -plibmongo-client0