Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 PACKAGE = $(shell dh_listpackages)
4 TMP = $(CURDIR)/debian/$(PACKAGE)
5
6 include /usr/share/dpkg/architecture.mk
7 PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
8 ARCHLIB := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}')
9
10 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
11
12 %:
13 dh $@
14
15 override_dh_installexamples:
16 dh_installexamples
17 sed -i '1s|^#!/bin/env perl|#!/usr/bin/perl|' \
18 $(TMP)/usr/share/doc/$(PACKAGE)/examples/demo/*
19
20 override_dh_auto_install:
21 dh_auto_install
22 # move arch:all files around
23 mv -v $(TMP)$(ARCHLIB)/Devel/NYTProf/js \
24 $(TMP)/usr/share/perl5/Devel/NYTProf/
25 # remove manpage fragment
26 $(RM) -v $(TMP)/usr/share/man/man3/Devel::NYTProf::FileInfo.3pm
27 # remove MemoryProfiling.pod and generated manpage
28 $(RM) -v $(TMP)$(ARCHLIB)/Devel/MemoryProfiling.pod
29 $(RM) -v $(TMP)/usr/share/man/man3/Devel::MemoryProfiling.3pm
30 # install below /usr/share
31 mv -v $(TMP)/usr/bin/flamegraph.pl $(TMP)/usr/share/perl5/Devel/NYTProf/
32
33 override_dh_installchangelogs:
34 pod2text --loose --utf8 Changes Changes.txt
35 dh_installchangelogs Changes.txt
36
37 override_dh_strip_nondeterminism:
38 find $(TMP) -type f -name "*.png" -print0 | \
39 xargs -r0 chmod +w
40 dh_strip_nondeterminism