File: rules

package info (click to toggle)
unattended-upgrades 0.93.1%2Bnmu1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,068 kB
  • ctags: 194
  • sloc: python: 2,442; sh: 180; makefile: 41
file content (30 lines) | stat: -rwxr-xr-x 682 bytes parent folder | download
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

PYTHON=python3
DIST=$(shell dpkg-vendor --query Vendor)

%:
	dh $@ --with=systemd

override_dh_auto_build:
	# copy the right template into place
	cp data/50unattended-upgrades.$(DIST) data/50unattended-upgrades
	$(PYTHON) setup.py build

override_dh_auto_test:
	$(MAKE) -C test

override_dh_auto_install:
	$(PYTHON) setup.py install \
		--root=$(CURDIR)/debian/unattended-upgrades \
		--install-layout=deb

override_dh_auto_clean:
	# Sanity-check before upload.
	set -e; for f in unattended-upgrade unattended-upgrade-shutdown; do \
		ln -nsf $$f $$f.py; \
		py3compile $$f.py; \
	        pycompile $$f.py; \
		rm -f $$f.py; \
	done
	$(PYTHON) setup.py clean -a