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

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

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

PYVERS=$(shell pyversions -vd)

%:
	dh $@ --with python2 --with autoreconf --with autotools-dev

override_dh_auto_configure:
	dh_auto_configure -- --disable-rpath --enable-gost --with-pyldns --with-examples --with-drill --disable-ldns-config

override_dh_strip:
	dh_strip -p libldns1 --dbg-package=libldns1-dbg
	dh_strip -a --remaining-packages

override_dh_install:
	install -d -m 755 $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
	install -m 644 packaging/libldns.pc $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
	dh_install --fail-missing -X.la -X_ldns.a

override_dh_auto_test:
# tests in Makefile.in are not distributed
	:
