#!/usr/bin/make -f

# To make debian/rules clean work even when setup.py doesn't exist
# because our patches are not applied
override_dh_auto_clean:
	[ ! -e setup.py ] || dh_auto_clean

genman:
	go-md2man -in debian/dhcpig.1.md -out debian/dhcpig.1
	echo "*** This target should not be executed automatically ***"
	echo "*** as a consequence, it always return an error      ***"
	echo "*** be sure to update the man page when the markdown ***"
	echo "*** file is updated                                  ***"
	exit 1

# using pybuild for install
# pig.py is properly named dhcpig
override_dh_install:
	dh_install
	mv $(CURDIR)/debian/dhcpig/usr/bin/pig.py $(CURDIR)/debian/dhcpig/usr/bin/dhcpig

%:
	dh $@ --with python2 --buildsystem=pybuild
