#!/usr/bin/make -f

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

%:
	dh $@ --with autoreconf

export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,--as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=/usr/lib/NetworkManager \
		--disable-more-warnings \
		--with-gtkver=3

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/*.1

override_dh_auto_build:
	dh_auto_build
	docbook-to-man debian/nm-applet.sgml > debian/nm-applet.1

override_dh_install:
	dh_install
	find debian/network-manager-gnome/ -name \*.la -o -name \*.a | xargs rm -f

override_dh_builddeb:
	dh_builddeb -- -Zxz

override_dh_auto_test:
