#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

PROJ_ABI=$(shell dpkg --search libproj.so.|grep /usr/lib|cut -d: -f1|sort|uniq|tail -1)

%:
	dh $@

override_dh_gencontrol:
	dh_gencontrol -- -Vproj:Depends="$(PROJ_ABI)"

override_dh_installexamples:
	dh_installexamples
	sed -i '1s|^#! /usr/bin/env perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/$(PACKAGE)/examples/*
