summaryrefslogtreecommitdiff
path: root/packages/debian/rules
blob: d138deebe3543e0907ae5ccd7d795ca1227c013d (plain)
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
#!/usr/bin/make -f
INIT_SYSTEM ?= systemd
export PYBUILD_INSTALL_ARGS=--init-system=$(INIT_SYSTEM)
DEB_VERSION := $(shell dpkg-parsechangelog --show-field=Version)

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

override_dh_install:
	dh_install
	install -d debian/cloud-init/etc/rsyslog.d
	install -d debian/cloud-init/usr/share/apport/package-hooks
	cp tools/21-cloudinit.conf debian/cloud-init/etc/rsyslog.d/21-cloudinit.conf
	install -D ./tools/Z99-cloud-locale-test.sh debian/cloud-init/etc/profile.d/Z99-cloud-locale-test.sh
	install -D ./tools/Z99-cloudinit-warnings.sh debian/cloud-init/etc/profile.d/Z99-cloudinit-warnings.sh
	flist=$$(find $(CURDIR)/debian/ -type f -name version.py) && sed -i 's,@@PACKAGED_VERSION@@,$(DEB_VERSION),' $${flist:-did-not-find-version-py-for-replacement}

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	http_proxy= make check
else
	@echo check disabled by DEB_BUILD_OPTIONS=$(DEB_BUILD_OPTIONS)
endif

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