| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
export DH_VERBOSE=1 |
| 6 |
|
| 7 |
PKGNAME = monitoring-plugins-contrib |
| 8 |
PLUGINS := $(shell find $(CURDIR) -mindepth 1 -maxdepth 1 -name .git -prune -o -name redhat -prune -o -name .pc -prune -o -name debian -prune -o -type d -printf '%f\n' | sort) |
| 9 |
|
| 10 |
override_dh_auto_build: |
| 11 |
dh_auto_build |
| 12 |
$(PACKAGING_HELPER) --generate-readme |
| 13 |
|
| 14 |
PACKAGING_HELPER = /usr/bin/python3 $(CURDIR)/debian/packaging-helper.py |
| 15 |
|
| 16 |
|
| 17 |
clean: debian/copyright debian/control debian/tests/control |
| 18 |
dh $@ --with quilt |
| 19 |
rm -f debian/README.Debian.plugins |
| 20 |
|
| 21 |
CONTROL_FILES := $(shell for p in $(PLUGINS); do echo $$p/control; done) |
| 22 |
COPYRIGHT_FILES := $(shell for p in $(PLUGINS); do echo $$p/copyright; done) |
| 23 |
TESTS_FILES := $(wildcard */tests) |
| 24 |
debian/copyright: debian/copyright.in debian/packaging-helper.py $(CONTROL_FILES) $(COPYRIGHT_FILES) |
| 25 |
$(PACKAGING_HELPER) --copyright |
| 26 |
-if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi |
| 27 |
|
| 28 |
debian/control: debian/control.in debian/packaging-helper.py $(CONTROL_FILES) |
| 29 |
$(PACKAGING_HELPER) --control |
| 30 |
-if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi |
| 31 |
|
| 32 |
debian/tests/control: debian/packaging-helper.py $(TESTS_FILES) |
| 33 |
$(PACKAGING_HELPER) --tests |
| 34 |
-if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi |
| 35 |
|
| 36 |
|
| 37 |
%: |
| 38 |
dh $@ --with quilt |
| 39 |
|
| 40 |
|
| 41 |
watch: |
| 42 |
@$(PACKAGING_HELPER) --watch |
| 43 |
|
| 44 |
.PHONY: watch |