#!/usr/bin/make -f

%:
	dh --with autotools_dev $@

override_dh_auto_configure:
	dh_auto_configure -- --datadir=/var/lib/iptotal --sysconfdir=/etc/iptotal

override_dh_auto_install:
	dh_auto_install
	mv $(CURDIR)/debian/iptotal/var/lib/iptotal/*.cgi $(CURDIR)/debian/iptotal/usr/lib/cgi-bin/iptotal
	for i in $(CURDIR)/debian/iptotal/usr/lib/cgi-bin/iptotal/*.cgi; do chmod +x $$i; done
	rm -f $(CURDIR)/debian/iptotal/var/lib/iptotal/*.gif
	rm -f $(CURDIR)/debian/iptotal/var/lib/iptotal/*.png
	rm -f $(CURDIR)/debian/iptotal/var/lib/iptotal/archive/*.png
	rm -f $(CURDIR)/debian/iptotal/var/lib/iptotal/images/*.png
