File: rules

package info (click to toggle)
swift 2.26.0-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 19,476 kB
  • sloc: python: 224,355; sh: 604; pascal: 253; makefile: 71; xml: 32
file content (92 lines) | stat: -rwxr-xr-x 3,086 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/make -f

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

export SWIFT_TEST_CONFIG_FILE=$(CURDIR)/debian/swift-test.conf

export PYBUILD_TEST_ARGS=\
	test/unit \
	--exclude-test=test.unit.common.test_utils.TestUtils.test_get_logger_sysloghandler_plumbing
	# --processes=-1

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

override_dh_auto_build:
	dh_auto_build

	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func python3-swift.postinst

	set -e ; set -x ; \
	for i in	debian/swift-account.swift-account-auditor.init.in \
			debian/swift-account.swift-account-reaper.init.in \
			debian/swift-account.swift-account-replicator.init.in \
			debian/swift-container.swift-container-auditor.init.in \
			debian/swift-container.swift-container-reconciler.init.in \
			debian/swift-container.swift-container-replicator.init.in \
			debian/swift-container.swift-container-sharder.init.in \
			debian/swift-container.swift-container-sync.init.in \
			debian/swift-container.swift-container-updater.init.in \
			debian/swift-object-expirer.swift-object-expirer.init.in \
			debian/swift-object.swift-object-auditor.init.in \
			debian/swift-object.swift-object.init.in \
			debian/swift-object.swift-object-reconstructor.init.in \
			debian/swift-object.swift-object-replicator.init.in \
			debian/swift-object.swift-object-updater.init.in \
			; do \
		debian/gen-init $$i ; \
	done

	set -e ; set -x ; \
	for i in	debian/swift-proxy.swift-proxy.init \
			debian/swift-account.swift-account.init \
			debian/swift-container.swift-container.init \
			; do \
		cp $$i.in $$i ; \
		cat /usr/share/openstack-pkg-tools/init-script-template >>$$i ; \
		pkgos-gen-systemd-unit $$i.in ; \
	done

	cp debian/swift-proxy.swift-proxy.init.in debian/swift-proxy.swift-proxy.init
	cat /usr/share/openstack-pkg-tools/init-script-template >>debian/swift-proxy.swift-proxy.init
	pkgos-gen-systemd-unit debian/swift-proxy.swift-proxy.init.in

override_dh_auto_install:
	dh_auto_install

	rm debian/tmp/usr/bin/swift-init

override_dh_installinit:
	set -e ; set -x ; \
	for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.init))) ; do \
		PKG=`echo $$FILE | cut -d. -f1` ; \
		NAME=`echo $$FILE | cut -d. -f2` ; \
		dh_installinit --error-handler=true -p$$PKG --name=$$NAME ;\
	done

override_dh_installsystemd:
	set -e ; set -x ; \
	for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.service))) ; do \
		PKG=`echo $$FILE | cut -d. -f1` ; \
		NAME=`echo $$FILE | cut -d. -f2` ; \
		dh_installsystemd -p$$PKG --name=$$NAME ;\
	done

gen-init-configurations:
	echo "Do nothing"

# build with sphinx documentation
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx doc/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/base
	LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx api-ref/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/api-ref
	dh_sphinxdoc
endif

override_dh_installdocs:
	dh_installdocs

	dh_installdocs -A AUTHORS

override_dh_missing:
	dh_missing --fail-missing