#!/usr/bin/make -f

export DH_VERBOSE = 1

# debhelper(7), dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# -I flags for src/noise_xk/makefile and for example/makefile
export DEB_CFLAGS_MAINT_APPEND = -fPIC -Iinclude -Iinclude/karmel -Iinclude/karmel/minimal -I../include -I../include/karmel -I../include/karmel/minimal -I../..

# export DEB_CPPFLAGS_MAINT_APPEND = -D_DEFAULT_SOURCE

export DEB_LDFLAGS_MAINT_APPEND = -lsodium

export PYBUILD_SYSTEM=distutils

%:
	dh $@ --sourcedirectory=src --with python3

dh_auto_configure:
	dh_auto_configure --with python3 --buildsystem=pybuild
	dh_auto_configure --sourcedirectory=src

override_dh_auto_install:
	dh_auto_install --sourcedirectory=python --buildsystem=pybuild
	dh_auto_install -- PREFIX=/usr
