File: rules

package info (click to toggle)
pyosmium 3.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,260 kB
  • sloc: python: 2,662; cpp: 1,533; makefile: 170
file content (49 lines) | stat: -rwxr-xr-x 1,368 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
#!/usr/bin/make -f

# DH_VERBOSE := 1

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

export DEB_CXXFLAGS_MAINT_APPEND=$(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS)

export PYBUILD_NAME=pyosmium
export PYBUILD_SYSTEM=distutils

export VERBOSE=1

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

override_dh_clean:
	dh_clean
	
	$(RM) -r doc/_build

override_dh_auto_build-indep:
	dh_auto_build --indep

	(cd doc && PYTHONPATH=$(CURDIR)/.pybuild/cpython3_`py3versions -vd`_pyosmium/build make html)
	(cd doc && PYTHONPATH=$(CURDIR)/.pybuild/cpython3_`py3versions -vd`_pyosmium/build make man)

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="cd test && {interpreter} run_tests.py" dh_auto_test

override_dh_auto_install:
	PYBUILD_INSTALL_ARGS="--install-scripts=/usr/lib/{package}" dh_auto_install

override_dh_install:
	dh_install --list-missing

	# Remove embedded jquery.js in favor of libjs-jquery
	$(RM) debian/*/usr/share/doc/*/html/_static/jquery.js

	# Remove embedded doctools.js & searchtools.js in favor of libjs-sphinxdoc
	$(RM) debian/*/usr/share/doc/*/html/_static/doctools.js
	$(RM) debian/*/usr/share/doc/*/html/_static/searchtools.js

	# Remove embedded underscore.js in favor of libjs-underscore
	$(RM) debian/*/usr/share/doc/*/html/_static/underscore.js