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

export KERAS_BACKEND=theano
export THEANO_FLAGS=base_compiledir='.pybuild',device=cpu
export PYTHONDONTWRITEBYTECODE=1

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

# Get version from changelog as well as lsb_release
# to compute unique build version (useful for repo mirroring systems doing file pooling)
PKG_VERSION  := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DIST_NAME    := $(shell lsb_release -si)
DIST_RELEASE := $(shell lsb_release -sc)
DIST_VERSION := $(shell lsb_release -sr)
PKG_VERSION_TAG := $(PKG_VERSION)+$(DIST_NAME).$(DIST_VERSION).$(DIST_RELEASE)

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

override_dh_compress:
	dh_compress -X.py

override_dh_gencontrol:
	dh_gencontrol -- -v"$(PKG_VERSION_TAG)"
