#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# hack to stop setuptools from complaining
export PYTHONPATH=../../debian/tmp/usr/lib/python3/dist-packages
export GPIB_PYTHON_VERSION=1.0.0

%:
	dh $@


# Yet more hacks to accommodate the build of the python module
execute_after_dh_auto_install:
	mv debian/tmp/usr/lib/python3/dist-packages/gpib-1.0-*.egg debian/tmp/usr/lib/python3/dist-packages/gpib
	rm -f debian/tmp/usr/lib/python3/dist-packages/easy-install.pth

# Don't use the source package version for the python module
override_dh_gencontrol:
	dh_gencontrol -ppython3-gpib -- -v$(GPIB_PYTHON_VERSION)-$(DEB_VERSION_REVISION)
	dh_gencontrol --remaining-packages
