#!/usr/bin/make -f

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

export PYBUILD_NAME = phonopy

export PYBUILD_TEST_ARGS = -k 'not test_symfc_cutoff'

%:
	dh $@ --buildsystem pybuild

# Manpages should be regenerated after importing, building and installing
# each new upstream release. This has to be done manually, as opposed to
# build time, due to possibly cross-building.

SCRIPTS  = $(wildcard phonopy/scripts/*.py)
MANPAGES = $(subst _,-,$(SCRIPTS:phonopy/scripts/%.py=debian/man/%.1))

.PHONY: manpages

manpages: $(MANPAGES)

debian/man/%.1:
	help2man $* --version-string $(DEB_VERSION_UPSTREAM) --no-info > $@
