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

pkg=ssake
examples=$(pkg)-examples

include /usr/share/cdbs/1/rules/debhelper.mk

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

install/$(pkg)::
	cp -a SSAKE $(BINDIR)/ssake
	cp -a tools/TQS.py $(BINDIR)/tqs

install/$(examples)::
	cp -a test/* $(DOCDIR)/examples

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
TESTDIR := $(shell mktemp -d)
binary/$(pkg)::
	cp -a $(DOCDIR)/examples/* $(TESTDIR)
	cd $(TESTDIR) && gunzip *.gz && $(BINDIR)/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
