Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # See debhelper(7) (uncomment to enable)
4 # output every command that modifies files on the build system.
5 #DH_VERBOSE = 1
6
7 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
8 DPKG_EXPORT_BUILDFLAGS = 1
9 include /usr/share/dpkg/default.mk
10 BUILDHOME = $(CURDIR)/debian/build
11
12 %:
13 dh $@
14
15 # inject version number at beginning of dist.ini file
16 # this is required because upstream uses Git::NextVersion plugin
17 override_dh_dzil_build:
18 perl -p -g -i -E 'say "version = $(DEB_VERSION_UPSTREAM)";' dist.ini
19 # perl critic tests are better run upstream
20 rm t/perlcriticrc t/perl-critic.t
21 AUTHOR_TESTING=0 dh_dzil_build
22
23 override_dh_clean:
24 dzil clean
25 perl -n -i -E 'print unless /^version =/;' dist.ini
26 dh_clean
27 rm -rf $(BUILDHOME)
28
29 override_dh_auto_test:
30 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
31 mkdir -p $(BUILDHOME)
32 HOME=$(BUILDHOME) AUTHOR_TESTING=0 dzil test
33 endif