File: rules

package info (click to toggle)
jenkins-job-builder 2.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 9,724 kB
  • sloc: xml: 21,573; python: 15,809; makefile: 160; sh: 158
file content (48 lines) | stat: -rwxr-xr-x 1,915 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
#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/openstack-infra/jenkins-job-builder.git
include /usr/share/openstack-pkg-tools/pkgos.make

LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"

%:
	dh $@ --with python3,sphinxdoc

override_dh_auto_clean:
	python3 setup.py clean

override_dh_clean:
	rm -rf doc/build build .testrepository
	dh_clean

override_dh_auto_build:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	pkgos-dh_auto_test --no-py2 'tests\.(?!(.*TestCaseModuleBuilders\.test_yaml_snippet.*|.*TestCaseModulePublishers\.test_yaml_snippet.*|.*builder\.test_builder\.TestCaseTestBuilder\.test_plugins_list.*|.*builder\.test_builder\.TestCaseTestBuilder\.test_plugins_list_from_jenkins.*|.*localyaml\.test_localyaml\.TestCaseLocalYamlIncludeAnchors\.test_multiple_same_anchor_in_multiple_toplevel_yaml.*))'
endif
	mkdir $(CURDIR)/debian/jenkins-job-builder/usr
	mv $(CURDIR)/debian/python3-jenkins-job-builder/usr/bin \
	   $(CURDIR)/debian/jenkins-job-builder/usr/bin

override_dh_missing:
	dh_missing --fail-missing

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) PATH=$(PATH):$(CURDIR)/debian/jenkins-job-builder/usr/bin/ PYTHON=python3 python3 -m sphinx $(SPHINXOPTS) -b html doc/source debian/jenkins-job-builder-doc/usr/share/doc/jenkins-job-builder-doc/html
	dh_sphinxdoc -O--buildsystem=python_distutils
endif

override_dh_installman:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) PATH=$(PATH):$(CURDIR)/debian/jenkins-job-builder/usr/bin/ PYTHON=python3 python3 -m sphinx $(SPHINXOPTS) -b man doc/source doc/build/man
	dh_installman
endif

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3