File: rules

package info (click to toggle)
flask-peewee 3.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,076 kB
  • sloc: javascript: 9,322; python: 3,901; makefile: 132; sh: 16
file content (42 lines) | stat: -rwxr-xr-x 1,566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE = 1

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE  = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -E -N -D html_last_updated_fmt="$(BUILD_DATE)"

export PYBUILD_NAME=flask-peewee
%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -b man $(SPHINXOPTS) docs/ -d debian/doctrees docs/build/man # Manpage generator

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-flask-peewee-doc/usr/share/doc/python-flask-peewee-doc/html
	dh_sphinxdoc
endif

override_dh_auto_test:
	dh_auto_test -- --system=custom --test-args="PYTHONPATH={build_dir} {interpreter} runtests.py"

override_dh_auto_clean:
	dh_auto_clean
	rm -rf debian/doctrees

override_dh_auto_install:
	dh_auto_install
	# We don't install examples in dist-packages
	rm -r $(CURDIR)/debian/python3-flask-peewee/usr/lib/*/dist-packages/example

override_dh_link:
	dh_link
	# Use Debian-packaged jquery and and underscore
	dh_link -ppython3-flask-peewee usr/share/javascript/jquery/jquery.min.js usr/lib/python3/dist-packages/flask_peewee/static/js/jquery.min.js
	dh_link -ppython3-flask-peewee /usr/share/javascript/bootstrap/js/bootstrap.js usr/lib/python3/dist-packages/flask_peewee/static/js/bootstrap.js
	dh_link -ppython3-flask-peewee /usr/share/javascript/bootstrap/js/bootstrap.min.js usr/lib/python3/dist-packages/flask_peewee/static/js/bootstrap.min.js