#!/usr/bin/make -f
#export DH_VERBOSE = 1


export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND =

include /usr/share/dpkg/pkg-info.mk

export VERSION := $(DEB_VERSION_UPSTREAM)
export MULTIARCH := $(DEB_HOST_MULTIARCH)
export PYBUILD_SYSTEM := distutils


%:
	dh $@ --with python3

%-arch:
	dh $@

%-indep:
	dh $@ --with python3

clean:
	dh $@

override_dh_auto_clean-indep:
	-dh_auto_clean --buildsystem=pybuild --sourcedirectory=python/
	rm -rf python/qrcodegen.egg-info

override_dh_auto_build-indep:
	dh_auto_build --buildsystem=pybuild --sourcedirectory=python/

override_dh_auto_install-indep:
	dh_auto_install --buildsystem=pybuild --sourcedirectory=python/

override_dh_auto_clean-arch:
	dh_auto_clean --sourcedirectory=c/
	dh_auto_clean --sourcedirectory=cpp/

override_dh_auto_build-arch:
	dh_auto_build --sourcedirectory=c/
	dh_auto_build --sourcedirectory=cpp/

override_dh_auto_test-arch:
	./c/qrcodegen-test

override_dh_auto_install-arch:
	dh_auto_install --sourcedirectory=c/
	dh_auto_install --sourcedirectory=cpp/
