#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_build:
	dh_auto_build --no-parallel

override_dh_auto_install-arch:
	make install INSTALLDIR=$(CURDIR)/debian/$(DEB_SOURCE)/usr/bin
	# Fix wrong path used in upstream script.  Fixing it here is safer than
	# changing the patch for any new upstream release
	sed -e 's?/usr/local/bin?/usr/bin?' \
	    -e 's?/usr/bin/sed?/bin/sed?'   \
	    theseus_align > debian/$(DEB_SOURCE)/usr/bin/theseus_align

override_dh_auto_install-indep:
	# nothing to do here

override_dh_install:
	dh_install
	# remove macos resource files
	find debian -name "._*" -delete
	find debian -name ".DS_*" -delete
