#!/usr/bin/make -f

DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')

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

JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@ --with javahelper

override_dh_fixperms:
	dh_fixperms
	chmod -x debian/$(DEBPKGNAME)/etc/$(DEBPKGNAME)/*
	find debian/$(DEBPKGNAME)/usr/share/doc/$(DEBPKGNAME)/examples -type f -exec chmod -x \{\} \;
	find debian/$(DEBPKGNAME)/usr/share/$(DEBPKGNAME)/models -type f -exec chmod -x \{\} \;

override_dh_installchangelogs:
	dh_installchangelogs src/main/resources/CHANGELOG

override_dh_compress:
	dh_compress --exclude=.nex --exclude=alignment

get-orig-source:
	uscan --verbose --force-download --repack --compression xz
