#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_install:
	dh_auto_install

	# remove empty manpage and install .pod as manpage
	# cf. #712006 and #788647 and #788682
	$(RM) -v $(TMP)/usr/share/man/man3/Net::Twitter::Lite.3pm \
	         $(TMP)/usr/share/man/man3/Net::Twitter::Lite::WithAPIv1_1.3pm
	pod2man \
		--section 3pm --name Net::Twitter::Lite \
		$(TMP)/usr/share/perl5/Net/Twitter/Lite.pod > $(TMP)/usr/share/man/man3/Net::Twitter::Lite.3pm
	pod2man \
		--section 3pm --name Net::Twitter::Lite::WithAPIv1_1 \
		$(TMP)/usr/share/perl5/Net/Twitter/Lite/WithAPIv1_1.pod > $(TMP)/usr/share/man/man3/Net::Twitter::Lite::WithAPIv1_1.3pm
