File: rules

package info (click to toggle)
lavacli 0.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 604 kB
  • sloc: python: 9,619; sh: 105; makefile: 31
file content (33 lines) | stat: -rwxr-xr-x 963 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
#!/usr/bin/make -f

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

# Prevent setuptools/distribute from accessing the internet.
export http_proxy = http://127.0.9.1:9

export PYBUILD_NAME=lavacli

export BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d @"$(SOURCE_DATE_EPOCH)")


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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python3 setup.py pytest
endif

override_dh_auto_build:
	python3 setup.py build
	make -C doc/ man SPHINXBUILD="/usr/share/sphinx/scripts/python3/sphinx-build" SPHINXOPTS="-j 4 -D today=\"$(BUILD_DATE)\""

override_dh_auto_install:
	python3 setup.py install --root=$(CURDIR)/debian/lavacli/ --install-layout=deb
	dh_installman -plavacli doc/_build/man/lavacli.1

override_dh_auto_clean::
	$(RM) -r lavacli.egg-info/ build/ dist/ .pybuild/ doc/_build
	find . -name '*.pyc' -exec $(RM) -f {} +
	find . -name '*.pyo' -exec $(RM) -f {} +
	find . -name '*~' -exec rm $(RM) {} +