summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 8ec7cb102f82f0c151d5bf038c8b2fb62638b695 (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
#!/usr/bin/make -f
DEB_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
ORIG_SRC=https://github.com/WindowsAzure/WALinuxAgent

get-packaged-orig-source:
	git clone --separate-git-dir=walinuxagent.checkout \
		$(ORIG_SRC) orig_source
	git checkout -b tags/v$(DEB_VERSION)
	git archive --format=tar.gz v$(DEB_VERSION) \
		-o walinuxagent_$(DEB_VERSION).orig.tar.gz
	rm -rf walinuxagent.checkout
	rm -rf orig_source

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


override_dh_installinit:
	dh_installinit --no-restart-on-upgrade --name walinuxagent
	dh_installinit --no-restart-on-upgrade --name ephemeral-disk-warning

override_dh_systemd_enable:
	dh_systemd_enable --name walinuxagent walinuxagent.service
	dh_systemd_enable --name ephemeral-disk-warning ephemeral-disk-warning.service