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
|
#!/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)')
ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
%:
dh $@
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_clean:
dh_clean
rm -fr _Inline
rm -fr contrib/automated_pp_test/pp_switch_tests
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)~)'
|