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

include /usr/share/cli-common/cli.make

DEBIAN_DIR = $(dir $(firstword $(MAKEFILE_LIST)))
VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | \
			sed -n 's/\-.*$$//;s/Version: //p')
USCAN = uscan \
	--package=pdfmod \
	--watchfile=$(DEBIAN_DIR)/watch \
	--upstream-version=$(VERSION)

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-external-poppler-sharp \
		MCS=/usr/bin/mono-csc

# disable tests; they need network access to download DTDs
override_dh_auto_test:

override_dh_clistrip:
	dh_clistrip --dbg-package=pdfmod-dbg

get-orig-source:
	$(USCAN) \
		--download \
		--force-download \
		--rename \
		--destdir=.

%:
	dh $@
