| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
#export DH_VERBOSE = 1 |
| 5 |
|
| 6 |
include /usr/share/dpkg/pkg-info.mk |
| 7 |
|
| 8 |
BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") |
| 9 |
SPHINXOPTS := -E -N -D html_last_updated_fmt="$(BUILD_DATE)" |
| 10 |
|
| 11 |
export PYBUILD_NAME=flask-openid |
| 12 |
|
| 13 |
%: |
| 14 |
dh $@ --buildsystem=pybuild |
| 15 |
|
| 16 |
override_dh_sphinxdoc: |
| 17 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 18 |
PYTHONPATH=`dirname $$(find .pybuild/ -type f -name "flask_openid.py" | head -n1)` \ |
| 19 |
python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-flask-openid-doc/usr/share/doc/python-flask-openid-doc/html |
| 20 |
dh_sphinxdoc |
| 21 |
endif |
| 22 |
|
| 23 |
override_dh_installexamples: |
| 24 |
dh_installexamples |
| 25 |
# Ugly hack, moving "#!/bin/env python" -> "#!/usr/bin/python3" |
| 26 |
sed -i 's/bin\/env python/usr\/bin\/python3/g' $(CURDIR)/debian/python-flask-openid-doc/usr/share/doc/python-flask-openid-doc/examples/example.py |