#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# Activate full hardening build flags
export DEB_BUILD_MAINT_OPTIONS := hardening=+all

PACKAGE	= $(firstword $(shell dh_listpackages))
TMP	= $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules

execute_after_dh_auto_build:
	cd doc && sgml2txt ulogd.sgml && sgml2html -s 0 ulogd.sgml

execute_after_dh_auto_clean:
	$(MAKE) -C doc clean
	rm -f ulogd.conf

execute_after_dh_fixperms:
	chmod 600 $(TMP)/etc/ulogd.conf

override_dh_installdocs:
	dh_installdocs --link-doc=$(PACKAGE)
