File: rules

package info (click to toggle)
jenkins-job-builder 3.11.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,088 kB
  • sloc: xml: 26,099; python: 18,333; sh: 158; makefile: 150
file content (36 lines) | stat: -rwxr-xr-x 1,596 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
#!/usr/bin/make -f

UPSTREAM_GIT := https://opendev.org/jjb/jenkins-job-builder
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)"

PYBUILD_NAME = jenkins-job-builder
PYBUILD_TEST_ARGS = PYTHON={interpreter} stestr run --subunit 'tests\.(?!cmd\.test_config\.TestConfigs\.test_use_global_config|cmd\.test_config\.TestConfigs\.test_use_config_in_user_home|moduleregistry\.test_moduleregistry\.ModuleRegistryPluginInfoTestsWithScenarios\.test_plugin_version_comparison)'
PYBUILD_AFTER_TEST = rm -rfv .stestr/
export PYBUILD_NAME PYBUILD_TEST_ARGS PYBUILD_AFTER_TEST


%:
	dh $@ --buildsystem pybuild

override_dh_auto_test:
	PYBUILD_SYSTEM=custom dh_auto_test

execute_after_dh_auto_install:
	mkdir -p debian/jenkins-job-builder/usr/
	mv -v debian/python3-jenkins-job-builder/usr/bin debian/jenkins-job-builder/usr/

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(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 nodoc, $(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