#!/usr/bin/make -f
# debian/rules file for ssake
# (C) Andreas Tille
# GPL

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

%:
	dh $@

BINDIR := $(CURDIR)/debian/$(pkg)/usr/bin
DOCDIR := $(CURDIR)/debian/$(examples)/usr/share/doc/$(pkg)

override_dh_install:#
	dh_install
	cp -a SSAKE $(BINDIR)/ssake
	cp -a tools/TQS.py $(BINDIR)/tqs

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
TESTDIR := $(shell mktemp -d)
override_dh_auto_test:
	cp -a test/* $(TESTDIR)
	cd $(TESTDIR) && $(CURDIR)/SSAKE -f Herpesvirus_3.60kb.reads.fa -m 16 -o 2 -r 0.6 -p 0 -t 0 -c 1 -w 5 -b myFirstSSAKErun
	rm -rf $(TESTDIR)
endif
