#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

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

PYTHON3_VERSIONS = $(shell py3versions -d)

BIN_NAME = cpplint
BIN_DESCRIPTION = "Static code checker for C++"

export PYBUILD_NAME=cpplint

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_installman:
	PYTHONPATH=debian/cpplint/usr/lib/$(PYTHON3_VERSIONS)/dist-packages \
	help2man \
		--name $(BIN_DESCRIPTION) \
		--no-info \
		--version-string $(DEB_VERSION_UPSTREAM) \
		--output debian/$(BIN_NAME).1 \
		--no-discard-stderr \
		debian/cpplint/usr/bin/$(BIN_NAME)
	dh_installman
