#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

%:
	dh $@ --buildsystem=autoconf

override_dh_auto_clean:
	-dh_auto_clean

override_dh_clean:
	dh_clean
	$(RM) -r libocispec/image-spec libocispec/runtime-spec

override_dh_auto_configure:
	dh_auto_configure
	ln -sv /usr/share/gocode/src/github.com/opencontainers/image-spec libocispec/
	ln -sv /usr/share/gocode/src/github.com/opencontainers/runtime-spec libocispec/

override_dh_auto_test:
	-dh_auto_test

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_gencontrol:
	dh_gencontrol -- -Vmy:Built-Using="$(shell dpkg-query --show -f '$${source:Package} (=$${source:Version}),' golang-github-opencontainers-image-spec-dev golang-github-opencontainers-specs-dev)"
