summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 91d44aee8176ef112d449918889b5600ff7c4ec7 (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
27
#!/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

override_dh_python3:
	dh_python3 -O--buildsystem=pybuild --shebang "/usr/bin/env python3"