summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules28
1 files changed, 6 insertions, 22 deletions
diff --git a/debian/rules b/debian/rules
index 272002f..3402cb8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,24 +6,10 @@ 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
-
+include /usr/share/dpkg/pkg-info.mk
%:
- dh $@ --with autoreconf
+ dh $@
##
# Arch dependent overrides
@@ -38,7 +24,7 @@ override_dh_auto_build-arch:
dh_auto_build -- V=1
override_dh_auto_test-arch:
- dh_auto_test -- V=1
+ cd build-tree/tests && make check
##
# Arch independent overrides
@@ -47,10 +33,11 @@ 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" \
+ cd build-tree && sed -e "s,@VERSION@,$(DEB_VERSION_UPSTREAM),g" \
-e "s,@top_srcdir@,../,g" \
<../Doxyfile.in >Doxyfile
cd build-tree && doxygen
+ find . -name "*.md5" -exec rm {} \;
##
# Overrides common to both
@@ -59,9 +46,6 @@ 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
+ dpkg-gensymbols -v$(DEB_VERSION_UPSTREAM) -plibmongo-client0