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 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/usr/bin/make -f
TMP = $(CURDIR)/debian/tmp
MPR = $(CURDIR)/ModPerl-Registry
APR = $(CURDIR)/Apache-Reload
include /usr/share/dpkg/architecture.mk
PERLVER = $(shell perl -MConfig -e 'print $$Config{version}')
PVA = $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print substr($$Config{vendorarch},1)')
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --with apache2
override_dh_auto_configure:
dh_auto_configure -- \
INSTALLDIRS=vendor \
MP_TRACE=0 \
MP_USE_DSO=1 \
MP_USE_STATIC=0 \
MP_CCOPTS="$(CFLAGS) -Wall -fgnu89-inline" \
MP_APR_CONFIG=/usr/bin/apr-config
override_dh_auto_build:
dh_auto_build -- MODPERL_OPTIMIZE="$(CFLAGS) $(CPPFLAGS)" OPTIMIZE="$(CFLAGS) $(CPPFLAGS)"
sed -i -e 's,$(CURDIR),/build,g' 'blib/lib/Apache2/BuildConfig.pm'
override_dh_auto_test:
APACHE_TEST_EXTRA_ARGS="-httpd_conf $(CURDIR)/debian/apache2.conf -servername 127.0.0.1 -port select" \
LC_ALL=C \
dh_auto_test --max-parallel=1
override_dh_clean:
dh_clean
rm -rf t/htdocs/hooks debian/docs
find . -name 'pod2htmd.tmp' -exec rm '{}' \;
find . -name 'pod2htmi.tmp' -exec rm '{}' \;
find . -name 'Makefile.old' -exec rm '{}' \;
rm -f Apache-Test/Apache-TestItSelf/t/SMOKE
override_dh_install:
mkdir -p $(CURDIR)/debian/docs
perl debian/transform_pod2html.pl $(CURDIR) docs debian
install -d $(TMP)/usr/share/bug
install -m755 debian/libapache2-mod-perl2.bug $(TMP)/usr/share/bug/libapache2-mod-perl2
install -d $(TMP)/usr/share/libapache2-mod-perl2
mv $(TMP)/usr/bin/mp2bug $(TMP)/usr/share/libapache2-mod-perl2
rm $(TMP)/$(PVA)/Apache2/Reload.pm
rm $(TMP)/$(PVA)/Apache/SizeLimit.pm
rm $(TMP)/$(PVA)/Apache/Reload.pm
rm $(TMP)/usr/share/man/man3/Apache2::Reload.3pm
rm $(TMP)/usr/share/man/man3/Apache::SizeLimit.3pm
rm $(TMP)/usr/share/man/man3/Apache::Reload.3pm
dh_install
override_dh_installexamples-indep:
dh_installexamples
file-rename 's,\.,,' debian/libapache2-mod-perl2-dev/usr/share/doc/libapache2-mod-perl2-dev/examples/code/.debug-*
# These rules are needed because otherwise the build process
# tries to re-make the 'build' directory and fails
.PHONY: build
build:
dh build
|