#!/usr/bin/make -f

PKG:=$(shell dh_listpackages)
TMP:=$(CURDIR)/debian/$(PKG)
EG:=$(TMP)/usr/share/doc/$(PKG)/examples

%:
	dh $@

override_dh_install:
	dh_install
	rm -rf $(TMP)/usr/bin

override_dh_installexamples:
	dh_installexamples
	sed -i -e'1s|#!perl|#!/usr/bin/perl|' $(EG)/ip*

override_dh_auto_test:
	mkdir $(CURDIR)/testout
	dh_auto_test

override_dh_clean:
	dh_clean
	rm -rf $(CURDIR)/testout


