#!/usr/bin/make -f

export PYBUILD_NAME=calibre
export QT_SELECT=qt5
export PYBUILD_INSTALL_ARGS=--root=debian/tmp/usr
export PYBUILD_CLEAN_ARGS=build -c
export PYBUILD_DISABLE=configure
export LANG=C
export LC_ALL=C
export LANGUAGE=C
export LC_MESSAGES=C
export XDG_DATA_DIRS=$(CURDIR)/debian/tmp/usr/share
export CALIBRE_CONFIG_DIRECTORY=debian/tmp/config

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

override_dh_auto_clean:
	rm -rf debian/orig
	[ ! -d build ] || python2 setup.py build -c
	find . -name *.pyc -delete
	find . -name *.so -delete

