| 1 |
|
| 2 |
|
| 3 |
include /usr/share/dpkg/buildtools.mk |
| 4 |
|
| 5 |
|
| 6 |
SKIP_TESTS = $(shell cat debian/tests/pkg-perl/smoke-skip) |
| 7 |
TEST_FILES = $(filter-out $(SKIP_TESTS), $(wildcard t/*.t)) |
| 8 |
|
| 9 |
PACKAGE = $(shell dh_listpackages) |
| 10 |
TMP = $(CURDIR)/debian/$(PACKAGE) |
| 11 |
|
| 12 |
XML_LIBS := $(shell $(PKG_CONFIG) --libs libxml-2.0) |
| 13 |
XML_INC := $(shell $(PKG_CONFIG) --cflags libxml-2.0) |
| 14 |
|
| 15 |
|
| 16 |
XML_VER_MIN = 2.15 |
| 17 |
XML_BIN = $(shell grep -Po 'libxml2[\w-]*' $(TMP).substvars) |
| 18 |
XML_VER_SUBST = -Vlibxml:Depends="$(XML_BIN) (>= $(XML_VER_MIN))" |
| 19 |
|
| 20 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 21 |
|
| 22 |
%: |
| 23 |
dh $@ |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
override_dh_auto_clean: |
| 28 |
dh_auto_clean |
| 29 |
[ ! -d $(CURDIR)/inc.save ] || mv $(CURDIR)/inc.save $(CURDIR)/inc |
| 30 |
|
| 31 |
override_dh_auto_configure: |
| 32 |
[ ! -d $(CURDIR)/inc ] || mv $(CURDIR)/inc $(CURDIR)/inc.save |
| 33 |
SKIP_SAX_INSTALL=1 dh_auto_configure -- LIBS="$(XML_LIBS)" INC="$(XML_INC)" |
| 34 |
|
| 35 |
override_dh_auto_test: |
| 36 |
dh_auto_test -- TEST_FILES="$(TEST_FILES)" |
| 37 |
|
| 38 |
override_dh_gencontrol: |
| 39 |
dh_gencontrol -- $(XML_VER_SUBST) |