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

%:
	dh  $@

override_dh_auto_clean:
	if [ -r Makefile ]; then $(MAKE) distclean; fi
	-cd documentation/userguide && if [ -r Makefile ]; then make distclean; fi
	-cd easel/documentation && if [ -r Makefile ]; then make distclean; fi
	dh_clean *.1 */*.log *.log */Makefile Makefile documentation/manpages/*.1

override_dh_compress :
	dh_compress -X.pdf

override_dh_strip:
	dh_strip --dbg-package=infernal-dbg

override_dh_auto_install:
	$(MAKE) install prefix=$(CURDIR)/debian/tmp

override_dh_builddeb:
	dh_builddeb -- -Z xz

get-orig-source:
	VERSION=`dpkg-parsechangelog | grep Ver | cut -d' ' -f2 | cut -d- -f1` ; \
	URL="ftp://selab.janelia.org/pub/software/infernal/infernal-$${VERSION}.tar.gz"; \
	ln -s infernal-$${VERSION}.tar.gz infernal_$${VERSION}.orig.tar.gz
