| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
|
| 5 |
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 6 |
|
| 7 |
ifneq (,$(findstring $(DEB_HOST_ARCH), i386 mipsel hurd-i386 kfreebsd-i386 )) |
| 8 |
export DEB_CFLAGS_MAINT_APPEND = -ffloat-store |
| 9 |
export DEB_CXXFLAGS_MAINT_APPEND = -ffloat-store |
| 10 |
endif |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ |
| 14 |
|
| 15 |
# Derive upstream version from debian/changelog (e.g. 4.7.0 from 4.7.0-1~exp1) |
| 16 |
UPSTREAM_VERSION := $(shell dpkg-parsechangelog -SVersion | sed -E 's/^[0-9]+://; s/-[^-]+$$//') |
| 17 |
# Drop trailing .0 for SOVERSION (e.g. 4.7 from 4.7.0) |
| 18 |
UPSTREAM_SOVERSION := $(shell echo "$(UPSTREAM_VERSION)" | sed -E 's/\.0$$//') |
| 19 |
|
| 20 |
override_dh_auto_configure: |
| 21 |
dh_auto_configure -- -DVERSION="$(UPSTREAM_VERSION)" -DSOVERSION="$(UPSTREAM_SOVERSION)" |
| 22 |
|
| 23 |
# Disable auto test for the mips platform, because it fails sometimes |
| 24 |
# on weak machiens with timouts |
| 25 |
disable_auto_test_archs = mips |
| 26 |
ifneq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs))) |
| 27 |
override_dh_auto_test: |
| 28 |
endif |