#!/usr/bin/make -f

# export DH_VERBOSE=1

PACKAGE = corkscrew

include debian/pod2man.mk
include debian/debian-autotools.mk

man:
	# target: man - convert *.pod to manual page
	$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
	PODCENTER=Networking MANSECT=1 makeman

override_dh_auto_configure:
	$(config-prepare)
	dh_auto_configure

install: man build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) prefix=debian/$(PACKAGE)/usr install

binary-arch: build install
	$(config-restore)
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installman
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch

%:
	dh $@

.PHONY: install man
.PHONY: binary-arch binary man

# End of file
