| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
include /usr/share/dpkg/default.mk |
| 5 |
|
| 6 |
# The home directory of user buildd does not exist on the builders |
| 7 |
export XDG_DATA_HOME=/tmp |
| 8 |
|
| 9 |
# Enable Hardening |
| 10 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ |
| 14 |
|
| 15 |
override_dh_auto_configure: |
| 16 |
dh_auto_configure -- \ |
| 17 |
-DNET_CPP_ENABLE_DOC_GENERATION=$(if $(filter %-doc,$(shell dh_listpackages)),ON,OFF) \ |
| 18 |
|
| 19 |
override_dh_auto_test: |
| 20 |
dh_auto_test --no-parallel |
| 21 |
|
| 22 |
execute_before_dh_install-indep: |
| 23 |
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) |
| 24 |
# Fix installation location of the doc:pkg files |
| 25 |
mv $(CURDIR)/debian/tmp/usr/share/doc/net-cpp \ |
| 26 |
$(CURDIR)/debian/tmp/usr/share/doc/libnet-cpp-doc |
| 27 |
dh_install |
| 28 |
# Get rid of duplicate files and replace them by symlinks |
| 29 |
if [ -d "$(CURDIR)/debian/tmp/usr/share/doc/libnet-cpp-doc/html/" ]; then \ |
| 30 |
find "$(CURDIR)/debian/tmp/usr/share/doc/libnet-cpp-doc/html/" -name *.md5 -delete; \ |
| 31 |
rdfind -makesymlinks true "$(CURDIR)/debian/tmp/usr/share/doc/libnet-cpp-doc/html/"; \ |
| 32 |
symlinks -rc "$(CURDIR)/debian/tmp/usr/share/doc/libnet-cpp-doc/html/"; \ |
| 33 |
fi |
| 34 |
endif |
| 35 |
|
| 36 |
execute_after_dh_clean: |
| 37 |
rm -f results.txt |
| 38 |
|
| 39 |
get-orig-source: |
| 40 |
uscan --noconf --force-download --rename --download-current-version --destdir=.. |