git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/nagios-plugins-contrib-24.20190301~bpo9+1/debian/rules
blob: e6c707a6084fa426fe6643957c61e883e04fe5ff (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

PKGNAME = nagios-plugins-contrib
PLUGINS := $(shell find $(CURDIR) -mindepth 1 -maxdepth 1 -name .git -prune -o -name .pc -prune -o -name debian -prune -o -type d -printf '%f\n' | sort)

%:
	dh $ _æ_  --with quilt,python2

override_dh_auto_build:
	dh_auto_build
	$(PACKAGING_HELPER) --generate-readme

PACKAGING_HELPER = /usr/bin/python $(CURDIR)/debian/packaging-helper.py


clean: debian/copyright debian/control debian/tests/control
	dh $ _æ_  --with quilt,python2
	rm -f debian/README.Debian.plugins

CONTROL_FILES := $(shell for p in $(PLUGINS); do echo $$p/control; done)
COPYRIGHT_FILES := $(shell for p in $(PLUGINS); do echo $$p/copyright; done)
TESTS_FILES := $(wildcard */tests)
debian/copyright: debian/copyright.in debian/packaging-helper.py $(CONTROL_FILES) $(COPYRIGHT_FILES)
	$(PACKAGING_HELPER) --copyright
	-if [ -d .git ]; then git add $ _æ_ ; git commit -m 'Auto update of $ _æ_ ' $ _æ_ ; fi

debian/control: debian/control.in debian/packaging-helper.py $(CONTROL_FILES)
	$(PACKAGING_HELPER) --control
	-if [ -d .git ]; then git add $ _æ_ ; git commit -m 'Auto update of $ _æ_ ' $ _æ_ ; fi

debian/tests/control: debian/packaging-helper.py $(TESTS_FILES)
	$(PACKAGING_HELPER) --tests
	-if [ -d .git ]; then git add $ _æ_ ; git commit -m 'Auto update of $ _æ_ ' $ _æ_ ; fi


watch:
	 _æ_ $(PACKAGING_HELPER) --watch

.PHONY: watch