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

export DH_VERBOSE=1
export DEB_BUILD_OPTIONS="parallel=1" # breaks on ubuntu18.04 otherwise
DESTDIR=$(CURDIR)/debian/tmp/
PERLARCH=$(shell perl -e 'use Config; print $$Config{archname}')
PERLVER=$(shell perl -e 'use Config; print $$Config{version}')

override_dh_auto_configure:
	dh_auto_configure
	echo "libthruk: embedded-library usr/lib/thruk/perl5/$(PERLARCH)/auto/Compress/Raw/Zlib/Zlib.so: zlib" >> debian/libthruk.lintian-overrides
	echo "libthruk: embedded-library zlib usr/lib/thruk/perl5/$(PERLARCH)/auto/Compress/Raw/Zlib/Zlib.so" >> debian/libthruk.lintian-overrides
	echo "libthruk: embedded-library zlib [usr/lib/thruk/perl5/$(PERLARCH)/auto/Compress/Raw/Zlib/Zlib.so]" >> debian/libthruk.lintian-overrides

override_dh_gencontrol:
	dh_gencontrol -- -Vextra:Depends=perlapi-$(PERLVER)

override_dh_auto_test:

override_dh_strip:

%:
	dh $@
