#!/usr/bin/make -f

PYTHONS:=$(shell pyversions -vr)

UPSTREAM_GIT = git://github.com/openstack/oslo.sphinx.git
include /usr/share/openstack-pkg-tools/pkgos.make

export OSLO_PACKAGE_VERSION=$(VERSION)

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

override_dh_clean:
	dh_clean -O--buildsystem=python_distutils
	rm -rf oslo.sphinx.egg-info

override_dh_auto_install:
	set -e && for pyvers in $(PYTHONS); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python-oslosphinx; \
		cp -rf oslosphinx/theme $(CURDIR)/debian/python-oslosphinx/usr/lib/python$$pyvers/dist-packages/oslosphinx ; \
	done
