File: rules

package info (click to toggle)
rally 1.2.1+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,896 kB
  • sloc: python: 41,385; sh: 1,230; makefile: 175; xml: 43
file content (46 lines) | stat: -rwxr-xr-x 1,398 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
43
44
45
46
#!/usr/bin/make -f

include /usr/share/openstack-pkg-tools/pkgos.make

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

override_dh_clean:
	dh_clean
	rm -rf build debian/rally.config debian/rally.postinst

override_dh_auto_clean:
	python3 setup.py clean

override_dh_install:
	echo "Do nothing..."

override_dh_auto_test:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	set -e ; set -x ; for PYVER in $(PYTHON3S); do \
		PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \
			PYTHON=python$$PYVER \
			python$$PYVER -m pytest tests/unit ; \
	done
endif

	dh_install
	
	rm -rf $(CURDIR)/debian/python3-rally/usr/etc
	mv $(CURDIR)/debian/python3-rally/usr/bin $(CURDIR)/debian/rally/usr

	install -D -m 0755 $(CURDIR)/etc/rally.bash_completion $(CURDIR)/debian/rally/usr/share/bash-completion/completions/rally
	install -D -m 0644 $(CURDIR)/etc/rally/rally.conf.sample $(CURDIR)/debian/rally/usr/share/rally/rally.conf
	sed -i 's|^[ \t#]connection[ \t]*=|connection=sqlite:///var/lib/rally/rally.db|' $(CURDIR)/debian/rally/usr/share/rally/rally.conf

override_dh_auto_build:
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func rally.config
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func rally.postinst

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