#!/usr/bin/make -f

export LC_ALL=C.UTF-8

PERL=/usr/bin/perl

%:
	dh $@

override_dh_installchangelogs:
	dh_installchangelogs -A ChangeLog  # All binary packages get the upstream changelog

override_dh_install:
	rm -rf $(CURDIR)/debian/tmp/usr/share/doc/xmltv-*  # We'll install our own documentation
	dh_install

override_dh_missing:
	dh_missing --fail-missing

# I use strict-deps to ensure the package dependencies are correct at build
# time, but the Linux::DVB module is not available on non-linux systems. This
# shouldn't affect the package build however.
ifneq ($(DEB_HOST_ARCH_OS), linux)
STRICTDEPS := --strict-deps
else
STRICTDEPS :=
endif

override_dh_auto_configure:
	$(PERL) Makefile.PL --yes $(STRICTDEPS) INSTALLDIRS=vendor PREFIX=/usr  # Give configure process "real" prefix
