#!/usr/bin/make -f
# -*- makefile -*-

# this name is just too long
AIF=arno-iptables-firewall

# one ring to rule them all ...
%:
	dh $@

override_dh_auto_configure:
override_dh_auto_build:

override_dh_auto_clean:
	debconf-updatepo
	rm -f $(CURDIR)/debian/init.d

override_dh_auto_install:
	# install rsyslog configuration
	cp $(CURDIR)/debian/rsyslog.d.conf \
			$(CURDIR)/debian/$(AIF)/etc/rsyslog.d/arno-iptables-firewall.conf
	# and corresponding logrotate configuration
	cp $(CURDIR)/debian/logrotate.d.conf \
			$(CURDIR)/debian/$(AIF)/etc/logrotate.d/arno-iptables-firewall.conf

override_dh_installchangelogs:
	dh_installchangelogs
	# fix up and remove duplicate plugin changelogs
	-rm $(CURDIR)/debian/$(AIF)/usr/share/$(AIF)/plugins/*.CHANGELOG

override_dh_installinit:
	# since one cannot know whether the firewall is
	# properly configured it must not be started
	dh_installinit --noscripts
