#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

PERL_CURRENT := $(shell perl -MConfig -e 'print "$$Config{revision}.$$Config{patchlevel}"')

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	pod2man --utf8 --section 3pm \
		$(TMP)/usr/lib/perl5/common/sense.pod > \
		$(TMP)/usr/share/man/man3/common::sense.3pm

override_dh_gencontrol:
	dh_gencontrol -- -V'minperl:Depends=perl (>= $(PERL_CURRENT))'
