#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export export V=1
export DEB_CFLAGS_MAINT_APPEND = -UGDK_DISABLE_DEPRECATED
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/pkg-info.mk

UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')

%:
	dh $@

execute_before_dh_autoreconf:
	NOCONFIGURE=y ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- --enable-gtk-doc

execute_before_dh_install:
	find debian/tmp -name '*.la' -delete

	# Explicitly remove files not included in any package
	$(RM) debian/tmp/usr/share/doc/osm-gps-map/AUTHORS
	$(RM) debian/tmp/usr/share/doc/osm-gps-map/ChangeLog
	$(RM) debian/tmp/usr/share/doc/osm-gps-map/COPYING
	$(RM) debian/tmp/usr/share/doc/osm-gps-map/NEWS
	$(RM) debian/tmp/usr/share/doc/osm-gps-map/README

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION)
