#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed

%:
	dh $@

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=/usr/lib/NetworkManager \
		--without-libnm-glib \
		--disable-static \
		--enable-more-warnings=yes

override_dh_makeshlibs:
	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/NetworkManager/

override_dh_install:
	find debian/tmp -name '*.la' -print -delete
	dh_install

override_dh_missing:
	dh_missing --fail-missing

# Tests are currently not safe to be run in parallel
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839849
override_dh_auto_test:
	dh_auto_test --no-parallel
