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 50 51 52 53
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
subst_pdlapi = -Vpdlapi:Provides="`perl -Mblib -MPDL::Config::Debian -e 'print \"pdlapi-$$PDL::Config::Debian::pdl_core_version\n\"'`"
include /usr/share/dpkg/architecture.mk
perlver := $(shell perl -MConfig -e 'print $$Config{version}')
vendorarch := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(perlver) -MConfig -e 'print substr($$Config{vendorarch}, 1)')
TEMPLATES=$(wildcard debian/*.in)
templates:
for TEMPLATE in $(TEMPLATES) ; do \
sed -e 's,@vendorarch@,$(vendorarch),g' $$TEMPLATE > `echo $$TEMPLATE | sed 's/.in$$//'` ; \
done
%:
dh $@
override_dh_auto_configure: templates
PERL5LIB=$(CURDIR) dh_auto_configure
override_dh_auto_build:
LD_RUN_PATH="" dh_auto_build
mkdir -p blib/lib/PDL/Config
perl -Mblib=$(CURDIR) debian/write_config_debian.pl > blib/lib/PDL/Config/Debian.pm
pod2man debian/dh_pdl > debian/dh_pdl.1
override_dh_auto_test:
@echo "BEGIN test verbose"
TEST_VERBOSE=1 LC_ALL=C dh_auto_test
@echo "END test verbose"
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/pdl --max-parallel=1
(cd debian/pdl; while read f ; do rm -f "$$f" ; done < ../pdl.remove)
# create placeholder in usr/share/perl5/PDL
echo > $(CURDIR)/debian/pdl/usr/share/perl5/PDL/.placeholder
# Remove empty manpage
$(RM) $(CURDIR)/debian/*/usr/share/man/man1/pdl.1p
override_dh_gencontrol:
dh_gencontrol -- $(subst_pdlapi)
|