#!/usr/bin/make -f
# -*- makefile -*-
# above is some vimish or emacsen make file format tag thingy

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

PYTHON3:=$(shell py3versions -vr)

%:
	dh $@ --with python3 --buildsystem=pybuild

build-python%:
	python$* setup.py build

override_dh_auto_build: $(PYTHON3:%=build-python%)

install-python%:
	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb

override_dh_auto_install: $(PYTHON3:%=install-python%)
	install -m 644 $(CURDIR)/etc/magcode.conf.sample debian/python3-magcode-core/etc/magcode/magcode.conf

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf *.egg-info
	- rm -rf MANIFEST
	- rm -rf dist
 
