#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

include /usr/share/dpkg/default.mk
# this provides:
# DEB_SOURCE: the source package name
# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
# DEB_VERSION_UPSTREAM: the package's upstream version
# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as
#                    specified by <https://reproducible-builds.org/specs/source-date-epoch/>

# for hardening you might like to uncomment this:
# export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_fixperms:
	dh_fixperms
	chmod +x debian/*/usr/share/plasmidseeker/plasmidseeker.pl

override_dh_installexamples:
	dh_installexamples
	for pl in `grep -Rl '#![[:space:]]*bin/bash' debian/*/usr/*` ; do \
	    sed -i '1s?^#![[:space:]]*bin/bash?#!/bin/bash?' $${pl} ; \
	done
