| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
# Uncomment this to turn on verbose mode. |
| 5 |
#export DH_VERBOSE=1 |
| 6 |
|
| 7 |
# Enable hardening build flags |
| 8 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 9 |
|
| 10 |
include /usr/share/dpkg/architecture.mk |
| 11 |
include /usr/share/dpkg/pkg-info.mk |
| 12 |
|
| 13 |
UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//') |
| 14 |
|
| 15 |
INSTDIR = $(shell perl -V:archlib | cut -d\' -f2) |
| 16 |
|
| 17 |
%: |
| 18 |
dh $@ --buildsystem perl_makemaker --with apache2 |
| 19 |
|
| 20 |
override_dh_auto_configure: |
| 21 |
dh_auto_configure -- --with-apache2-apxs=/usr/bin/apxs2 \ |
| 22 |
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) |
| 23 |
|
| 24 |
override_dh_auto_test: |
| 25 |
dh_auto_test || echo "Ignoring test failures" |
| 26 |
|
| 27 |
override_dh_auto_install: |
| 28 |
dh_auto_install -- INSTALLDIRS=vendor \ |
| 29 |
prefix=/usr |
| 30 |
|
| 31 |
execute_after_dh_auto_install: |
| 32 |
# Strip RPATH |
| 33 |
-find $(CURDIR)/debian/tmp/usr/lib -name "*.so*" -type f -exec chrpath --delete {} \; |
| 34 |
|
| 35 |
execute_after_dh_apache2: |
| 36 |
# Strip RPATH |
| 37 |
-find $(CURDIR)/debian/libapache2-mod-apreq2/usr/lib -name "*.so*" -type f -exec chrpath --delete {} \; |
| 38 |
|
| 39 |
execute_after_dh_install: |
| 40 |
mkdir -p debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/ |
| 41 |
install -m 0644 docs/html/* debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/ |
| 42 |
|
| 43 |
override_dh_dh_installchangelogs: |
| 44 |
dh_installchangelogs CHANGES |
| 45 |
|
| 46 |
override_dh_installdocs: |
| 47 |
dh_installdocs -A NOTICE |
| 48 |
|
| 49 |
override_dh_perl: |
| 50 |
dh_perl $(INSTDIR)/Apache |
| 51 |
|
| 52 |
execute_after_dh_strip: |
| 53 |
strip --strip-unneeded \ |
| 54 |
--remove-section=.comment \ |
| 55 |
--remove-section=.note \ |
| 56 |
$(CURDIR)/debian/*/usr/lib/apache2/modules/mod_apreq2.a |
| 57 |
|
| 58 |
override_dh_makeshlibs: |
| 59 |
dh_makeshlibs -- -v$(UPSTREAM_VERSION) |