#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# see http://lists.debian.org/debian-devel-announce/2011/09/msg00001.html
# Also it does hardening by default, see http://wiki.debian.org/Hardening
-include /usr/share/dpkg/default.mk

MANPAGES := $(patsubst debian/%.sgml, debian/%.1, $(wildcard debian/*.sgml))
$(MANPAGES):
	docbook-to-man $(patsubst %.1, %.sgml, $@) > $@

%:
	dh $@

override_dh_auto_clean:
	$(RM) $(MANPAGES) dvbackup dvconnect

override_dh_auto_build: $(MANPAGES)
	dh_auto_build -- CFLAGS="$(CFLAGS)"

override_dh_auto_install:
	dh_install
	dh_buildinfo

get-orig-source:
	uscan --noconf --force-download --repack --rename --download-current-version --destdir=.
