#!/usr/bin/make -f
DH_VERBOSE=1

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND=-Wall -pendantic
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

BUILD:=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
	dh $@ --with autoreconf,gir

override_dh_autoreconf:
	gtkdocize
	NOCONFIGURE=1 dh_autoreconf ./autogen.sh

override_dh_install:
	rm debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/libsignon-glib.la
	dh_install --list-missing

override_dh_strip:
	dh_strip --dbg-package=libsignon-glib-dbg

override_dh_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean
