File: rules

package info (click to toggle)
libpar-packer-perl 1.063-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,380 kB
  • sloc: perl: 12,859; ansic: 1,486; makefile: 30; sh: 5
file content (49 lines) | stat: -rwxr-xr-x 1,840 bytes parent folder | download | duplicates (2)
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
41
42
43
44
45
46
47
48
49
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+pie,+bindnow

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

PERL_CURRENT := $(shell perl -MConfig -e 'print "$$Config{revision}.$$Config{patchlevel}.$$Config{subversion}"')
PERL_NEXT    := $(shell perl -MConfig -e 'print "$$Config{revision}.$$Config{patchlevel}." . ($$Config{subversion} + 1)')

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}')

# according to Changes for 1.042, the parallel build issue is fixed
# but we still get the same failure as in #886355.
# 1.046 adds .NOTPARALLEL to the generated Makefile
# but we might as well keep our safeguard here.
%:
	dh $@ --no-parallel

override_dh_auto_build:
	dh_auto_build
	# recreate manpage
	pod2man --section 1p $(CURDIR)/script/parl.pod > $(CURDIR)/blib/man1/parl.1p

override_dh_auto_test:
	ln -sf par.pl blib/script/par-archive
	dh_auto_test
	rm blib/script/par-archive

override_dh_auto_install:
	dh_auto_install
	file-rename -v s/\.pl/-archive/ \
		$(TMP)/usr/bin/par.pl $(TMP)/usr/share/man/man1/par.pl.1p
	# Move arch-dependent stuff into lib
	mkdir -p $(TMP)$(ARCHLIB)/PAR/StrippedPARL/
	mv -v $(TMP)/usr/share/perl5/PAR/StrippedPARL/Static.pm \
		$(TMP)$(ARCHLIB)/PAR/StrippedPARL/
	mv -v $(TMP)/usr/share/perl5/PAR/StrippedPARL/Dynamic.pm \
		$(TMP)$(ARCHLIB)/PAR/StrippedPARL/
	# don't install tkpp and its manpage for the time being
	# it needs Tk::* modules we don't have
	# put it into examples for now
	$(RM) -v $(TMP)/usr/bin/tkpp
	$(RM) -v $(TMP)/usr/share/man/man1/tkpp.1p

override_dh_gencontrol:
	dh_gencontrol -- -V'sameperl:Depends=perl (>= $(PERL_CURRENT)~), perl (<< $(PERL_NEXT)~)'