#!/usr/bin/make -f
# vim: set noet ft=make
# -*- makefile -*-

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

APT=$(CURDIR)/debian/pkg-perl-autopkgtest/usr/share/pkg-perl-autopkgtest
SCRIPTS=$(CURDIR)/debian/pkg-perl-tools/usr/share/pkg-perl-tools/lib

%:
	dh $@

override_dh_clean:
	# preserve test data (*.orig)
	dh_clean -Xt/patchedit/

override_dh_auto_install:
# dh_auto_install sets INSTALL to "INSTALL=install --strip-program=true"
# which leads to
# 1) install: WARNING: ignoring --strip-program option as -s option was not specified
# 2) W: pkg-perl-tools: executable-not-elf-or-script $file
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

override_dh_fixperms:
	dh_fixperms
	chmod +x $(APT)/* $(APT)/*/*
	chmod +x $(SCRIPTS)/guess-nocheck.pl
