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

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

# enable dpkg build flags
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export DPKG_GENSYMBOLS_CHECK_LEVEL=4

PYVERS=$(shell pyversions -vd)

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

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

override_dh_strip:
	dh_strip -O--dbgsym-migration='libldns1-dbg (<< 1.7.0~)'

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
	:
