File: rules

package info (click to toggle)
libdevel-nytprof-perl 6.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,888 kB
  • sloc: perl: 5,497; javascript: 4,033; ansic: 107; makefile: 27
file content (40 lines) | stat: -rwxr-xr-x 1,292 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
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

include /usr/share/dpkg/architecture.mk
PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
ARCHLIB := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}')

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_installexamples:
	dh_installexamples
	sed -i '1s|^#!/bin/env perl|#!/usr/bin/perl|' \
		$(TMP)/usr/share/doc/$(PACKAGE)/examples/demo/*

override_dh_auto_install:
	dh_auto_install
	# move arch:all files around
	mv -v $(TMP)$(ARCHLIB)/Devel/NYTProf/js \
		$(TMP)/usr/share/perl5/Devel/NYTProf/
	# remove manpage fragment
	$(RM) -v $(TMP)/usr/share/man/man3/Devel::NYTProf::FileInfo.3pm
	# remove MemoryProfiling.pod and generated manpage
	$(RM) -v $(TMP)$(ARCHLIB)/Devel/MemoryProfiling.pod
	$(RM) -v $(TMP)/usr/share/man/man3/Devel::MemoryProfiling.3pm
	# install below /usr/share
	mv -v $(TMP)/usr/bin/flamegraph.pl $(TMP)/usr/share/perl5/Devel/NYTProf/

override_dh_installchangelogs:
	pod2text --loose --utf8 Changes Changes.txt
	dh_installchangelogs Changes.txt

override_dh_strip_nondeterminism:
	find $(TMP) -type f -name "*.png" -print0 | \
		xargs -r0 chmod +w
	dh_strip_nondeterminism