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

# 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=bhtreeDIST

PYVERS := $(shell pyversions -vs)

%:
	dh $@ --with python2

override_dh_clean:
	dh_clean
	find . -name CVS -a -type d| xargs -r rm -r
	rm -rf build build-stamp debian/Pmv
	rm -rf debian/tmpbuild
	rm -rf bhtree/bhtreelib.py bhtree/bhtreelib_wrap.c

override_dh_auto_build:
	for i in $(PYVERS); do \
	    python$$i setup.py install --install-platlib=`pwd`/debian/tmpbuild; \
	done

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

