File: rules

package info (click to toggle)
glare 0.5.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,664 kB
  • sloc: python: 15,645; sh: 237; makefile: 59
file content (76 lines) | stat: -rwxr-xr-x 3,129 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f

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

%:
	dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd

override_dh_auto_clean:
	find . -iname '*.pyc' -delete
	rm -f debian/*.init debian/*.upstart debian/*.service debian/*.templates
	rm -f debian/glare-common.postinst debian/glare-common.config debian/glare-api.config debian/glare-api.postinst debian/glare-common.postrm
	rm -rf build

override_dh_auto_build:
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func glare-common.config
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func glare-common.postinst
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func glare-api.config
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func glare-api.postinst
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm glare-common.postrm
	pkgos-merge-templates glare-api glare endpoint
	pkgos-merge-templates glare-common glare db rabbit ksat

override_dh_auto_test:
	echo "Do nothing..."

override_dh_auto_install:
	echo "Do nothing..."

override_dh_install:
	for i in $(PYTHON3S) ; do \
		python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \
	done
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	pkgos-dh_auto_test --no-py2 'glare\.tests\.unit(?!.*test_store_api\.TestStoreAPI\.test_read_data.*)'
endif
	mkdir -p $(CURDIR)/debian/glare-common/usr/share/glare-common
	PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslo-config-generator \
		--output-file $(CURDIR)/debian/glare-common/usr/share/glare-common/glare.conf \
                --wrap-width 140 \
		--namespace glare \
		--namespace glance.store \
		--namespace keystonemiddleware.auth_token \
		--namespace oslo.concurrency \
		--namespace oslo.db \
		--namespace oslo.db.concurrency \
		--namespace oslo.log \
		--namespace oslo.messaging \
		--namespace oslo.middleware.cors \
		--namespace oslo.middleware.http_proxy_to_wsgi \
		--namespace oslo.policy
	pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/glare-common/usr/share/glare-common/glare.conf keystone_authtoken glare

	# Set a valid default. /tmp is a security problem.
	pkgos-fix-config-default $(CURDIR)/debian/glare-common/usr/share/glare-common/glare.conf oslo_concurrency lock_path /var/lock/glare

	cp etc/glare-paste.ini $(CURDIR)/debian/glare-common/usr/share/glare-common
	cp etc/glare-swift.conf.sample $(CURDIR)/debian/glare-common/usr/share/glare-common/glare-swift.conf

	PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \
		--output-file $(CURDIR)/debian/glare-common/usr/share/glare-common/policy.json \
		--format json \
		--namespace=glare

	rm -rf $(CURDIR)/debian/tmp/usr/etc
	dh_install
	dh_missing --fail-missing

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	echo "No doc for now."
#	sphinx-build $(SPHINXOPTS) -b html doc/source $(CURDIR)/debian/glare-doc/usr/share/doc/glare-doc/html
#	dh_sphinxdoc -O--buildsystem=python_distutils
endif

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