#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for mgltools-volume

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

BRANCH=`cat debian/get-orig-source/current-branch`
RCVERSION=`cat debian/get-orig-source/rc-version`
SRC=CADDDIST

%:
	dh $@ --with python2

override_dh_install:
	dh_install
	# remove some obsolete file, change if file vanishes upstream
	rm $(CURDIR)/debian/mgltools-cadd/usr/lib/python2.7/dist-packages/CADD/Raccoon2/RaccoonTools.py

	find $(CURDIR)/debian/mgltools-cadd -name runCADD | xargs -r chmod 755
	find $(CURDIR)/debian/mgltools-cadd -name *.prm -o -name *.res | xargs -r chmod -x
	find $(CURDIR)/debian/mgltools-cadd -name raccoonLauncher | xargs -r chmod -x
	find $(CURDIR)/debian/mgltools-cadd -name *.bat | xargs -r chmod -x

get-orig-source:
	./debian/get-orig-source/get-orig-source $(SRC) $(BRANCH) $(RCVERSION)
