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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# Verbose test output
export VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
UPSTREAM_VERSION=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+(debian|dfsg|ds|deb)[0-9]*.*//')
BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
MANPAGES := $(wildcard debian/man/*.*.xml)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
CHECK = check
ifneq (,$(filter $(DEB_BUILD_ARCH),mips s390x sparc hppa ppc64))
CHECK = nocheck
endif
%:
dh $@
override_dh_clean:
dh_clean debian/man/*.1
override_dh_auto_configure:
dh_auto_configure -- --disable-charls
override_dh_auto_build:
# Create man page from DocBook XML
for x in $(MANPAGES) ; do \
docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \
mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
done
dh_auto_build
override_dh_auto_test:
ifeq ($(CHECK), "check")
dh_auto_test --max-parallel=1 || echo "Ignoring test failures"
endif
override_dh_install:
find debian/tmp/usr/lib/ -type f -name "*.la" -delete
dh_install --list-missing
override_dh_strip:
dh_strip --dbgsym-migration='rasterlite2-dbg (<< 1.0.0~rc0+devel1-7~)'
override_dh_makeshlibs:
dh_makeshlibs -- -v$(UPSTREAM_VERSION)
|