[Pkg-nagios-changes] [pkg-pnp4nagios] 05/06: Modernize rules

Markus Frosch (old DM Account) lazyfrosch-guest at moszumanska.debian.org
Sun Sep 7 09:50:43 UTC 2014


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

lazyfrosch-guest pushed a commit to branch master
in repository pkg-pnp4nagios.

commit 2a2c4f6e00f4a0bb9cf00ec4ea1efc4f8bae17d6
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Tue Sep 2 18:54:33 2014 +0200

    Modernize rules
---
 debian/.gitignore |   1 +
 debian/clean      |   2 +
 debian/control    |   3 +-
 debian/docs       |   1 +
 debian/rules      | 131 ++++++------------------------------------------------
 5 files changed, 20 insertions(+), 118 deletions(-)

diff --git a/debian/.gitignore b/debian/.gitignore
index 4289ae0..65b3edc 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -7,3 +7,4 @@ stamp-patched
 files
 .*.swp
 .*.swo
+autoreconf.*
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..a5e087b
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,2 @@
+scripts/rrd_modify.pl
+share/pnp/media/js/jquery.imgareaselect.min.js
diff --git a/debian/control b/debian/control
index 4aff152..8d88ca6 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Uploaders:
 Build-Depends:
     autotools-dev,
     debhelper (>= 8),
-    po-debconf,
+    dh-autoreconf,
     quilt,
     rrdtool,
     librrds-perl,
@@ -37,6 +37,7 @@ Package: pnp4nagios-bin
 Architecture: any
 Depends:
     ${misc:Depends},
+    ${perl:Depends},
     ${shlibs:Depends},
     librrds-perl,
     adduser
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..62deb04
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+AUTHORS
diff --git a/debian/rules b/debian/rules
index e7227d3..50452f0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,88 +1,27 @@
 #!/usr/bin/make -f
 # debian/rules for PNP4Nagios
-#
-# Written by Sven Velt <sven at velt.de> and Sebastian Harl <tokkee at debian.org>.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+%:
+	dh $@ --with autoreconf
 
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-else
-CROSS= --build $(DEB_BUILD_GNU_TYPE)
-endif
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		--with-layout=debian \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--without-kohana \
+		--with-kohana_system=/usr/share/php/kohana2/system
 
-CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
-CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
-
-get-orig-source:
-	uscan --force --verbose --rename
-
-config.status: configure
-	dh_testdir
-
-	for file in config.guess config.sub; do \
-		mv $$file $$file.upstream; \
-		ln -s /usr/share/misc/$$file .; \
-	done
-
-	./configure $(CROSS) \
-				--with-layout=debian \
-				--mandir=/usr/share/man \
-				--infodir=/usr/share/info \
-				--without-kohana \
-				--with-kohana_system=/usr/share/php/kohana2/system \
-				--with-httpd-conf=/etc/apache2/conf.d \
-				CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
-
-build: build-arch build-indep
-
-build-arch: build-stamp
-
-build-indep: build-stamp
+override_dh_auto_build:
+	dh_auto_build -- all
 	uglifyjs share/pnp/media/js/jquery.imgareaselect.js \
 	       > share/pnp/media/js/jquery.imgareaselect.min.js
 
-build-stamp: config.status
-	dh_testdir
-
-	$(MAKE) all
-
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f config.log
-	rm -f build-stamp
-
-	rm -f share/pnp/media/js/jquery.imgareaselect.min.js
-
-	for file in config.guess config.sub; do \
-		if [ -e $$file.upstream ]; then \
-			rm -f $$file; \
-			mv $$file.upstream $$file; \
-		fi \
-	done
-
-	[ ! -f Makefile ] || $(MAKE) distclean
-
-	dh_clean
-	rm -f scripts/rrd_modify.pl
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp \
-		INSTALL_OPTS="--owner=root --group=root" install install-config
+override_dh_auto_install:
+	dh_auto_install -- install-config
 
 	# Ignore install.php (for future debugging don't delete it)
 	touch debian/tmp/usr/share/pnp4nagios/html/install.ignore
@@ -163,50 +102,8 @@ install: build
 	mkdir debian/tmp/etc/pnp4nagios/templates.d
 	cp debian/README.templates.d debian/tmp/etc/pnp4nagios/templates.d/README
 
-	dh_install --fail-missing
-
-# Build architecture-independent files here.
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -i ChangeLog
-	dh_installdocs -A -i AUTHORS README debian/README.Debian
-	dh_installexamples -i
-	dh_installdebconf -i
-	dh_installinit -i
-	dh_installman -i
-	dh_link -i
-	dh_lintian -i
-	dh_compress -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -a ChangeLog
-	dh_installdocs -A -a AUTHORS README debian/README.Debian
-	dh_installexamples -a
-	dh_installdebconf -a
+override_dh_installinit:
 	dh_installinit -ppnp4nagios-bin --name=npcd
 	dh_installinit -ppnp4nagios-bin --name=pnp_gearman_worker
-	dh_installman -a
-	dh_link -a
-	dh_lintian -a
-	dh_strip -a
-	dh_compress -a
-	dh_fixperms -a
-	dh_installdeb -a
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
 
 # vi: noexpandtab ts=4 sw=4 :

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



More information about the Pkg-nagios-changes mailing list