#!/usr/bin/make -f

export DEB_BUILD_OPTIONS += nocheck
export PYBUILD_NAME := frescobaldi
export PYBUILD_INSTALL_ARGS := --install-layout=deb

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
	# See testenv:mo-generate in tox.ini.
	python3 i18n/mo-gen.py
	# See testenv:linux-generate in tox.ini.
	msgfmt --desktop \
		-d i18n/frescobaldi \
		--template linux/org.frescobaldi.Frescobaldi.desktop.in \
		-o linux/org.frescobaldi.Frescobaldi.desktop
	msgfmt --xml \
		-d i18n/frescobaldi \
		--template linux/org.frescobaldi.Frescobaldi.metainfo.xml.in \
		-o linux/org.frescobaldi.Frescobaldi.metainfo.xml
