#!/usr/bin/make -f

DHFLAGS=--parallel

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ $(DHFLAGS)

override_dh_install:
	rm -f debian/tmp/usr/lib/*/*.la
	dh_install --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_auto_configure:
	# upstream tarball is without configure. autogen.sh will create it
	NOCONFIGURE=1 ./autogen.sh
	dh_auto_configure $(DHFLAGS) -- \
		--disable-silent-rules \
		--localstatedir=/var \
		--libexecdir=/usr/lib/mate-window-manager \
		--disable-static \
		--enable-startup-notification=yes \
		--with-gtk=2.0

override_dh_strip:
	dh_strip -pmarco --dbg-package=marco-dbg
	dh_strip -plibmarco-private0 --dbg-package=libmarco-private0-dbg

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
