#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for Qiime
# Tim Booth <tbooth@ceh.ac.uk>, Andreas Tille <tille@debian.org>
# GPL

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

%:
	dh $@ --with python2

override_dh_compress:
	dh_compress \
	    --exclude=.js \
	    --exclude=.sff \
	    --exclude=.qual \
	    --exclude=.fna \
	    --exclude=.fna.txt

override_dh_clean:
	dh_clean
	rm -rf doc/_build

export ROOTDIR=debian/`dh_listpackages`

#Lots of shuffling to be done...
# Python scripts go into /usr/lib/qiime/bin (not /usr/bin)
# Helper script goes into /usr/bin
# Setup scripts go into /usr/lib/qiime/shell
# Default configuration goes into /etc/qiime/default_qiime_config
# ...or maybe it should be copied to $HOME/.qiime_config on 1st run?
override_dh_install:
	dh_install
	mv $(ROOTDIR)/usr/bin/*.py  $(ROOTDIR)/usr/lib/qiime/bin
	install -m 755 debian/scripts/uclust $(ROOTDIR)/usr/lib/qiime/bin
	rm -rf $(ROOTDIR)/usr/lib/qiime/shell/.svn
	chmod -R a+rX $(ROOTDIR)/usr/lib/qiime/shell

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog
