File: rules

package info (click to toggle)
cloud-init 20.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 7,060 kB
  • sloc: python: 69,581; sh: 3,915; makefile: 105; xml: 21
file content (30 lines) | stat: -rwxr-xr-x 1,152 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

PYTHON3S:=$(shell py3versions -vr)
export PYBUILD_INSTALL_ARGS=--init-system=systemd,sysvinit_deb

%:
	dh $@ --with python3 --buildsystem pybuild

override_dh_auto_install:
	dh_auto_install
	mv $(CURDIR)/debian/cloud-init/etc/NetworkManager/dispatcher.d/hook-network-manager \
		$(CURDIR)/debian/cloud-init/etc/NetworkManager/dispatcher.d/cloud-init-hook-network-manager

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e && set -x && for pyvers in $(PYTHON3S); do \
		PYMAJOR=`echo $$pyvers | cut -d'.' -f1` ; \
		echo "===> Testing with python$$pyvers (python$$PYMAJOR)" ; \
		PYTHON=python$$pyvers PYTHONPATH=. python$$pyvers -m pytest -v tests/unittests ; \
	done
endif

override_dh_installinit:
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade --name cloud-init-local
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade --name cloud-config
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade --name cloud-final

override_dh_systemd_start:
	dh_systemd_start --no-restart-on-upgrade --no-start