#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# Security Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/pkg-info.mk

override_dh_install:
	sed -i 's%#include <ipset%#include <libcorkipset%' debian/tmp/usr/include/ipset/*.h
	rm -f obj-*/docs/html/.buildinfo
	cd obj-$(DEB_TARGET_GNU_TYPE); \
	for bin in ipsetbuild ipsetcat ipsetdot; do \
		help2man -N -n "utility of libcorkipset library" \
			--version-string="$(DEB_VERSION)" -o $$bin.1 src/$$bin; \
	done
	dh_install

override_dh_installdocs:
	dh_installdocs -X.gitignore

%:
	dh $@ --with sphinxdoc
