[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 01/03: Let debian/rules use the new Makefile.

Bernd Zeimetz bernd at bzed.de
Tue Aug 18 16:05:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

bzed pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.

commit 22769eaf9347b32884ff97a08d67c1f183b529d2
Author: Bernd Zeimetz <bernd at bzed.de>
Date:   Tue Aug 18 17:47:41 2015 +0200

    Let debian/rules use the new Makefile.
---
 debian/rules | 91 +++---------------------------------------------------------
 1 file changed, 4 insertions(+), 87 deletions(-)

diff --git a/debian/rules b/debian/rules
index 7f8a706..4ced005 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,101 +4,18 @@
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
 
-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)
-
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), hurd-i386))
-	PLUGINS := $(filter-out check_memcached check_varnish,$(PLUGINS))
-endif
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), arm64))
-	PLUGINS := $(filter-out check_memcached,$(PLUGINS))
-endif
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), m68k))
-	PLUGINS := $(filter-out check_varnish,$(PLUGINS))
-endif
-
 PKGNAME = nagios-plugins-contrib
 
 %:
-	dh $@ --with quilt,python2,autotools_dev,autoreconf --parallel
-
-# Here follows a small shell snipped to call dh_auto_* for all plugins
-# Currently
-# - if a Makefile exists in the plugin directory
-#   we run dh_auto_$(1) with -O--sourcedirectory="$$plugin"
-# - if $${plugin}/src exists, we run dh_auto_$(1) on that directory
-# - else: fail :)
-DH_AUTO_CALL = 	if [ "$$auto_command" = "dh_auto_configure" ]; then \
-		    export options="$$options -- --enable-stack-protector" ;\
-		fi ;\
-		if [ -f $(CURDIR)/$$plugin/Makefile ]; then \
-			$$auto_command -O--sourcedirectory="$${plugin}" $$options; \
-		elif [ -d $(CURDIR)/$$plugin/src ]; then \
-			$$auto_command -O--sourcedirectory="$${plugin}/src" $$options; \
-		else \
-			echo failed to build $$plugin; exit 255 ; \
-		fi
+	dh $@ --with quilt,python2
 
 PACKAGING_HELPER = /usr/bin/python $(CURDIR)/debian/packaging-helper.py
 
 
-clean: $(PLUGINS:%=clean-%) debian/copyright debian/control
-	dh $@ --with quilt,python2,autotools_dev,autoreconf --parallel --with
-	rm -f debian/$(PKGNAME).install
+clean: debian/copyright debian/control
+	dh $@ --with quilt,python2
 	rm -f debian/README.Debian.plugins
 
-clean-%:
-	rm -rf debian/$*
-
-dh_auto_install-%:
-	# run dh_auto_install to debian/$plugin
-	set -e ;\
-	    export auto_command="dh_auto_install" ;\
-	    export plugin="$*" ;\
-	    export options="--destdir=debian/$*" ;\
-	    $(DH_AUTO_CALL)
-	if [ -d debian/$*/usr/lib/$(PKGNAME) ]; then \
-	    mkdir -p debian/$*/usr/lib/nagios ;\
-	    mv debian/$*/usr/lib/$(PKGNAME) debian/$*/usr/lib/nagios/plugins ;\
-	fi
-	# add files to debian/$(PKGNAME).install
-	set -e; find debian/$* -type f -printf '%h\n' | sort -u  |\
-	    while read dir; do \
-	        echo "$$dir/* `echo $$dir | sed 's,debian/$*/,,'`" ;\
-	    done >> debian/$(PKGNAME).install
-	# create shlibdeps for the plugin into a temp file
-	set -e; \
-	   opts=`find debian/$* -type f -exec file {} \; |\
-	   grep -E ' ELF ' |\
-	   sed 's,:.*,,;s,^,-e,' |\
-	   tr '\n' ' '` ;\
-	   if [ -n "$$opts" ]; then \
-	   	dpkg-shlibdeps -O $$opts | grep shlibs:Depends > debian/$*/substvars ;\
-	   fi
-       
-dh_auto_%:
-	set -e; \
-	    export auto_command=`echo $* | sed 's,-.*,,;s,^,dh_auto_,'` ;\
-	    export plugin=`echo $* | sed 's,[^-]*-,,'` ;\
-	    $(DH_AUTO_CALL)
-
-
-override_dh_auto_build: $(PLUGINS:%=dh_auto_build-%)
-
-override_dh_auto_clean: $(PLUGINS:%=dh_auto_clean-%)
-
-override_dh_auto_configure: $(PLUGINS:%=dh_auto_configure-%)
-
-override_dh_auto_install: $(PLUGINS:%=dh_auto_install-%)
-	$(PACKAGING_HELPER) --generate-readme
-
-#override_dh_auto_test: $(PLUGINS:%=dh_auto_test-%)
-override_dh_auto_test: 
-	# nothign to do right now.
-
-override_dh_python2:
-	dh_python2
-	dh_python2 usr/lib/nagios/plugins usr/lib/nagios/cronjobs
-
 CONTROL_FILES := $(shell for p in $(PLUGINS); do echo $$p/control; done)
 COPYRIGHT_FILES := $(shell for p in $(PLUGINS); do echo $$p/copyright; done)
 debian/copyright: debian/copyright.in debian/packaging-helper.py $(CONTROL_FILES) $(COPYRIGHT_FILES)
@@ -113,4 +30,4 @@ debian/control: debian/control.in debian/packaging-helper.py $(CONTROL_FILES)
 watch:
 	@$(PACKAGING_HELPER) --watch
 
-.PHONY: watch override_dh_auto_build override_dh_auto_clean override_dh_auto_configure override_dh_auto_install override_dh_auto_test
+.PHONY: watch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git



More information about the Pkg-nagios-changes mailing list