#!/usr/bin/make -f

# enable verbose mode
#export DH_VERBOSE=1

# enable all hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --with python3 --with-systemd

override_dh_auto_configure:
	intltoolize --force --automake
	dh_auto_configure -- --disable-perl

override_dh_perl:
	dh_perl -d

override_dh_systemd_enable:
	dh_systemd_enable location-update.timer

override_dh_install:
	dh_install
	# lintian: unknown-file-in-python-module-directory
	rm debian/location-python/usr/lib/python3*/site-packages/_location.la
	# linitan: binaries-have-file-conflict (d/location-importer.install)
	rm debian/location-python/usr/lib/python3*/site-packages/location/database.py
	rm debian/location-python/usr/lib/python3*/site-packages/location/importer.py
