File: rules

package info (click to toggle)
libxml-libxslt-perl 2.003000-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 704 kB
  • sloc: xml: 2,181; perl: 1,227; ansic: 402; makefile: 21
file content (30 lines) | stat: -rwxr-xr-x 1,022 bytes parent folder | download
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
#!/usr/bin/make -f

include /usr/share/dpkg/buildtools.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

SKIP_TESTS = $(shell cat debian/tests/pkg-perl/smoke-skip)
TEST_FILES = $(filter-out $(SKIP_TESTS),$(wildcard t/*.t))

# also in libxml-libxml-perl
XML_VER           := $(shell $(PKG_CONFIG) --modversion libxml-2.0)
XML_VER_MAJOR      = $(shell echo $(XML_VER) | cut -f 1 -d .)
XML_VER_MINOR      = $(shell echo $(XML_VER) | cut -f 2 -d .)
XML_VER_CUR        = $(XML_VER_MAJOR).$(XML_VER_MINOR)
XML_VER_NEXT       = $(XML_VER_MAJOR).$(shell expr $(XML_VER_MINOR) + 1)
XML_VER_DEBIAN     = $(shell dpkg-query -Wf '$${source:Version}' libxml2-dev)
ifeq (,$(findstring +really,$(XML_VER_DEBIAN)))
XML_VER_SUBST      = -Vlibxml:Depends="libxml2 (>= $(XML_VER_CUR)), libxml2 (<< $(XML_VER_NEXT)~)"
else
XML_VER_SUBST      = -Vlibxml:Depends="libxml2 (>= $(XML_VER_DEBIAN))"
endif

%:
	dh $@

override_dh_auto_test:
	dh_auto_test -- TEST_FILES="$(TEST_FILES)"

override_dh_gencontrol:
	dh_gencontrol -- $(XML_VER_SUBST)