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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
INSTDIR = $(shell perl -V:archlib | cut -d\' -f2)
%:
dh $@ --buildsystem perl_makemaker --with apache2
override_dh_auto_configure:
dh_auto_configure -- --with-apache2-apxs=/usr/bin/apxs2 \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_test:
dh_auto_test || echo "Ignoring test failures"
override_dh_auto_install:
dh_auto_install -- INSTALLDIRS=vendor \
prefix=/usr
execute_after_dh_auto_install:
# Strip RPATH
-find $(CURDIR)/debian/tmp/usr/lib -name "*.so*" -type f -exec chrpath --delete {} \;
execute_after_dh_apache2:
# Strip RPATH
-find $(CURDIR)/debian/libapache2-mod-apreq2/usr/lib -name "*.so*" -type f -exec chrpath --delete {} \;
execute_after_dh_install:
mkdir -p debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/
install -m 0644 docs/html/* debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/
override_dh_dh_installchangelogs:
dh_installchangelogs CHANGES
override_dh_installdocs:
dh_installdocs -A NOTICE
override_dh_perl:
dh_perl $(INSTDIR)/Apache
execute_after_dh_strip:
strip --strip-unneeded \
--remove-section=.comment \
--remove-section=.note \
$(CURDIR)/debian/*/usr/lib/apache2/modules/mod_apreq2.a
override_dh_makeshlibs:
dh_makeshlibs -- -v$(UPSTREAM_VERSION)
|