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

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

%:
	dh $@ --sourcedirectory=libgm/ --with=python3

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCURRENT_GIT_VERSION=$(DEB_VERSION) \
		-DSTATIC_BUILD=OFF

HELP2MAN_FLAGS := \
    --name="Project Peppercorn" \
    --version-string="$(DEB_VERSION)" \
    --section=1 \
    --manual="General Commands" \
    --no-info \
    --no-discard-stderr

override_dh_installman:
	for exe in debian/tmp/usr/bin/*; do \
	    help2man $(HELP2MAN_FLAGS) $$exe > debian/tmp/$$(basename $$exe).1; \
	done
	dh_installman
