#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_BUILD_PARALLEL = 1

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

# use the NEWS file as upstream ChangeLog...
DEB_DH_INSTALLCHANGELOGS_ARGS = NEWS
DEB_INSTALL_DOCS_ALL = README AUTHORS

DEB_DH_INSTALL_ARGS += --fail-missing

DEB_CONFIGURE_SCRIPT := ./autogen.sh

DEB_CONFIGURE_EXTRA_FLAGS += \
                --disable-silent-rules \
                --libexecdir=/usr/lib/mate-applets \
                --localstatedir=/var \
                --disable-static \
                --with-cpufreq-lib=cpufreq \
                --with-gtk=3.0

common-install-indep:: remove-cruft
common-install-arch:: remove-cruft

remove-cruft::
	rm -rfv debian/*/usr/lib/python*/dist-packages/mate_invest/*.pyc
	rm -rfv debian/*/usr/lib/python*/dist-packages/mate_invest/*.pyo

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