#!/usr/bin/make -f
# -*- makefile -*-

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

export PYBUILD_SYSTEM = distutils
export PYBUILD_NAME = montagepy
export PYBUILD_BEFORE_CONFIGURE = python3 parse.py

export DEB_CFLAGS_MAINT_APPEND = -fcommon -std=gnu17

%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure
	ln -sf setup_manylinux.py python/MontagePy/setup.py
	mkdir -p python/MontagePy/lib
	dh_auto_configure -Spybuild -D python/MontagePy

override_dh_auto_build:
	mkdir -p lib/include bin
	dh_auto_build
	dh_auto_build -Spybuild -D python/MontagePy

override_dh_auto_install:
	dh_auto_install
	dh_auto_install -Spybuild -D python/MontagePy

override_dh_installchangelogs:
	dh_installchangelogs ChangeHistory
