[Pkg-nagios-devel] nagios install,NONE,1.1 nagios-mysql.dirs,NONE,1.1 nagios-mysql.install,NONE,1.1 nagios-pgsql.dirs,NONE,1.1 nagios-pgsql.install,NONE,1.1 nagios-text.dirs,NONE,1.1 changelog,1.2,1.3 control,1.2,1.3 docs,1.1.1.1,1.2 examples,1.1.1.1,1.2 rules,1.2,1.3

joerg@haydn.debian.org joerg@haydn.debian.org


Update of /cvsroot/pkg-nagios/nagios
In directory haydn:/tmp/cvs-serv23595

Modified Files:
	changelog control docs examples rules 
Added Files:
	install nagios-mysql.dirs nagios-mysql.install 
	nagios-pgsql.dirs nagios-pgsql.install nagios-text.dirs 
Log Message:
Continue changes.
Not finished, DO NOT UPLOAD.


--- NEW FILE: install ---
debian/apache.conf etc/nagios/

--- NEW FILE: nagios-mysql.dirs ---
etc/init.d
etc/nagios
usr/sbin
usr/lib/cgi-bin/nagios
usr/lib/nagios
usr/lib/nagios/plugins/eventhandlers
usr/share/nagios/htdocs
usr/share/nagios/pluginconfig
var/log/nagios
var/run/nagios
var/lib/nagios

--- NEW FILE: nagios-mysql.install ---
debian/README.mysql usr/share/doc/nagios-mysql/
contrib/database/create_mysql usr/share/doc/nagios-mysql/
debian/apache.conf etc/nagios/

--- NEW FILE: nagios-pgsql.dirs ---
etc/init.d
etc/nagios
usr/sbin
usr/lib/cgi-bin/nagios
usr/lib/nagios
usr/lib/nagios/plugins/eventhandlers
usr/share/nagios/htdocs
usr/share/nagios/pluginconfig
var/log/nagios
var/run/nagios
var/lib/nagios

--- NEW FILE: nagios-pgsql.install ---
contrib/database/create_pgsql usr/share/doc/nagios-pgsql/
debian/apache.conf etc/nagios/

--- NEW FILE: nagios-text.dirs ---
etc/init.d
etc/nagios
usr/sbin
usr/lib/cgi-bin/nagios
usr/lib/nagios
usr/lib/nagios/plugins/eventhandlers
usr/share/nagios/htdocs
usr/share/nagios/pluginconfig
var/log/nagios
var/run/nagios
var/lib/nagios

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/changelog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- changelog	31 Oct 2004 14:52:44 -0000	1.2
+++ changelog	31 Oct 2004 22:00:08 -0000	1.3
@@ -12,8 +12,9 @@
   	  (Yes, actually Piotr fixed the init-script for this with his NMU, but
   	  he forgot all the other things where it is mentioned. And var/run fits
       better IMO).
+    - Change debian/rules, first half is done, but still needs some work.
 
- -- Joerg Jaspert <joerg@debian.org>  Sun, 31 Oct 2004 14:19:01 +0100
+ -- Joerg Jaspert <joerg@debian.org>  Sun, 31 Oct 2004 22:46:39 +0100
 
 nagios (2:1.2-3.6) unstable; urgency=high
 

Index: control
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/control,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- control	31 Oct 2004 14:52:44 -0000	1.2
+++ control	31 Oct 2004 22:00:08 -0000	1.3
@@ -2,13 +2,13 @@
 Section: net
 Priority: optional
 Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
-Uploaders: Joerg Jaspert <joerg@debian.org>, Jeremy T. Bouse" <jbouse@debian.org>, Tony Mancill <tony@mancill.com>, Sean Finney <seanius@seanius.net>
+Uploaders: Joerg Jaspert <joerg@debian.org>, Jeremy T. Bouse" <jbouse@debian.org>, Tony Mancill <tony@mancill.com>, Sean Finney <seanius@seanius.net>, Martin F. Krafft <madduck@debian.org>
 Standards-Version: 3.6.1
-Build-Depends: debhelper, dpatch (>= 2.0.10), po-debconf, libpng12-dev, libgd2-noxpm-dev (>= 2.0.1) | libgd2-xpm-dev (>= 2.0.1), iputils-ping, postgresql-dev (>= 7.2), libmysqlclient10-dev
+Build-Depends: debhelper (>= 4.2.22), dpatch (>= 2.0.10), libpng12-dev, libgd2-noxpm-dev (>= 2.0.1) | libgd2-xpm-dev (>= 2.0.1), iputils-ping, postgresql-dev (>= 7.2), libmysqlclient10-dev
 
 Package: nagios-text
 Architecture: any
-Pre-Depends: adduser (>= 3.8), debconf (>= 0.2.17)
+Pre-Depends: adduser, debconf
 Depends: ${shlibs:Depends}, fileutils (>=4.0y) | coreutils (>= 4.5.3), apache | httpd, mailx, nagios-plugins (>= 1.3.1.0-6), ucf
 Conflicts: netsaint, nagios
 Replaces: netsaint, nagios
@@ -36,7 +36,7 @@
 
 Package: nagios-pgsql
 Architecture: any
-Pre-Depends: adduser (>= 3.8), debconf (>= 0.2.17)
+Pre-Depends: adduser, debconf
 Depends: ${shlibs:Depends}, fileutils (>=4.0y) | coreutils (>= 4.5.3), apache | httpd, nagios-plugins (>= 1.3.1.0-6), ucf
 Conflicts: netsaint, nagios
 Replaces: netsaint, nagios
@@ -64,7 +64,7 @@
 
 Package: nagios-mysql
 Architecture: any
-Pre-Depends: adduser (>= 3.8), debconf (>= 0.2.17)
+Pre-Depends: adduser, debconf
 Depends: ${shlibs:Depends}, fileutils (>=4.0y) | coreutils (>= 4.5.3), apache | httpd, nagios-plugins (>= 1.3.1.0-6), ucf
 Conflicts: netsaint, nagios
 Replaces: netsaint, nagios

Index: docs
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/docs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- docs	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ docs	31 Oct 2004 22:00:08 -0000	1.2
@@ -1,2 +1,2 @@
-docs/README
-docs/UPGRADING
+README
+UPGRADING

Index: examples
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/examples,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- examples	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ examples	31 Oct 2004 22:00:08 -0000	1.2
@@ -1,2 +1,2 @@
-examples/nagios.cfg
-examples/resource.cfg
+sample-config/nagios.cfg
+sample-config/resource.cfg

Index: rules
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/rules,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rules	31 Oct 2004 14:52:44 -0000	1.2
+++ rules	31 Oct 2004 22:00:08 -0000	1.3
@@ -1,46 +1,41 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
+# Modified for nagios by various people.
+# Last modified:
+# $Id$
 
 # Uncomment this to turn on verbose mode.
 # export DH_VERBOSE=1
 
 maindir		= $(shell pwd)
-srcdir		= $(shell pwd) # FIXME: drop this
+b			= $(shell pwd)/debian
 
 CGIBINS		= avail cmd config extinfo histogram history notifications outages showlog status statusmap statuswml statuswrl summary tac trends
 
-CFLAGS = -Wall -g
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# -Wall disabled until source is fixed to not print tons of warnings with it. :)
+#CFLAGS = -Wall -g
+CFLAGS = -g
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 CFLAGS += -O0
 else
 CFLAGS += -O2
 endif
-export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
 
 SHELL		= /bin/sh -e
-CONFIGURE	= CFLAGS='$(CFLAGS)' ./configure	--prefix=/usr \
-				--mandir=/usr/share/man \
-				--bindir=/usr/sbin \
-			        --sbindir=/usr/lib/cgi-bin/nagios \
+CONFIGURE	= CFLAGS='$(CFLAGS)' ./configure --prefix=/usr --mandir=/usr/share/man \
+				--bindir=/usr/sbin --sbindir=/usr/lib/cgi-bin/nagios \
 				--datadir=/usr/share/nagios/htdocs \
-			        --libexecdir=/usr/lib/nagios/plugins \
-				--sysconfdir=/etc/nagios \
-			        --mandir=/usr/share/man \
-				--infodir=/usr/share/info \
-			        --localstatedir=/var/log/nagios \
+				--sysconfdir=/etc/nagios --infodir=/usr/share/info \
+				--libexecdir=/usr/lib/nagios/plugins \
+		        --localstatedir=/var/log/nagios \
 				--with-ping-command="/bin/ping -n %s -c %d" \
-				--with-mail=/usr/bin/mail \
-				--with-perlcache \
-				--with-nagios-user=nagios \
-				--with-nagios-grp=nagios \
-				--with-template-extinfo \
-				--with-template-objects \
-				--with-default-extinfo \
-				--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_HNU_TYPE)
-
+				--with-mail=/usr/bin/mail --with-perlcache \
+				--with-nagios-user=nagios --with-nagios-grp=nagios \
+				--with-template-objects --with-template-extinfo --with-default-extinfo 
+			    --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_HNU_TYPE)
 
 DEPENDS		= XSDC=xsddb.c XSDH=xsddb.h XCDC=xcddb.c XCDH=xcddb.h XEDC=xeddb.c \
 		  XEDH=xeddb.h XDDC=xdddb.c XDDH=xdddb.h XRDC=xrddb.c XRDH=xrddb.h
@@ -57,11 +52,11 @@
 	dh_testdir -a
 	dh_testroot -a
 
-#	rm -Rf docs examples debian/files debian/nagios-text
-#	rm -Rf debian/nagios-{text,pgsql,mysql}.*
-#	rm -Rf build-tree* nagios-1.1 debian/templates.merged
+	-rm -Rf docs examples binary-nagios-{text,pgsql,mysql}-stamp
 	-make distclean
-	-rm {patch,configure,build}-stamp
+	-rm -Rf {cgi,base}/*.mysql {cgi,base}/*.pgsql {cgi,base}/*.text
+	-rm {patch,patch-no-defaults,install,configure,build}-stamp
+	-rm debian/templates.merged
 
 	dh_clean
 
@@ -77,6 +72,7 @@
 
 patch-no-defaults: patch-no-defaults-stamp
 patch-no-defaults-stamp:
+# FIXME: Delete this thing.
 	@echo "Doing $@"
 	cat $(maindir)/debian/patches/chk-001_config.h-no_defaults | patch -p2
 	touch patch-no-defaults-stamp
@@ -131,102 +127,94 @@
 	touch binary-nagios-mysql-stamp
 
 binary-indep: 
-	# We have nothing to do by default.
-
-duplicate: duplicate-stamp
-duplicate-stamp:
-	# Duplicate the init script etc
-	for pkg in text pgsql mysql; do \
-		cp debian/init.d debian/nagios-$$pkg.init; \
-		for file in preinst postinst prerm postrm conffiles dirs config; do \
-			cp debian/$$file debian/nagios-$$pkg.$$file; \
-		done \
-	done
-	-mkdir $(maindir)/docs $(maindir)/examples
-	touch $(maindir)/duplicate-stamp
+# We have nothing to do by default.
 
 build: build-stamp
-build-stamp: patch binary-nagios-text binary-nagios-pgsql binary-nagios-mysql duplicate
+build-stamp: patch binary-nagios-text binary-nagios-pgsql binary-nagios-mysql
 	@echo "--- Compiling"
 	dh_testdir
+	po2debconf debian/templates > debian/templates.merged
+	touch build-stamp
 
-binary-arch: build install
+binary-arch: build install nagios-text nagios-mysql nagios-pgsql
 	dh_testdir -a
 	dh_testroot -a
 
-	# Chown all files recursivly
-	chown -R root.root debian/tmp debian/nagios-{mysql,pgsql}
-
-	po2debconf debian/templates > debian/templates.merged
-
-	# Copy the apache.conf to each package
-	for dir in tmp nagios-mysql nagios-pgsql; do \
-	  cp debian/apache.conf debian/$$dir/etc/nagios; \
-	done
-
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_installmenu -a
-	dh_installinit -a 
-	# The init script should just be named 'nagios' (not nagios-PKG).
-#	for pkg in tmp nagios-pgsql nagios-mysql; do \
-#		mv debian/$$pkg/etc/init.d/nagios-* \
-#			debian/$$pkg/etc/init.d/nagios; \
-#	done
-##	(cd debian/tmp/usr/share ; find doc-base | cpio -p ../../../nagios-pgsql/usr/share)
-##	(cd debian/tmp/usr/share ; find doc-base | cpio -p ../../../nagios-mysql/usr/share)
-
-	# install package specific stuff
-	install -m 644 $(srcdir)/contrib/database/create_mysql \
-		debian/nagios-mysql/usr/share/doc/nagios-mysql/create_mysql.sql
-	install -m 644 $(srcdir)/contrib/database/create_pgsql \
-		debian/nagios-pgsql/usr/share/doc/nagios-pgsql/create_pgsql.sql
-	install -m 644 debian/README.mysql debian/nagios-mysql/usr/share/doc/nagios-mysql/
-	#install -m 644 debian/README.pgsql debian/nagios-pgsql/usr/share/doc/nagios-pgsql/
-
-	dh_installcron -a
-	dh_installmanpages -a
-	dh_undocumented -A p1.pl.1 upgrade-netsaint2nagios.8
-	dh_installinfo -a
-	dh_installchangelogs -a
 
-	dh_link -A
-	dh_strip -a
-	dh_compress -a
-	dh_fixperms -a
-
-	dh_installdeb -a
-	for dir in tmp nagios-mysql nagios-pgsql; do \
-	  cp debian/templates.merged debian/$$dir/DEBIAN/templates; \
-	done
+nagios-text: install
+	@echo "--- Building: $@"
+	dh_installdirs 		 -p$@ -P$(b)/$@ 
+	dh_link              -p$@ -P$(b)/$@ 
+	dh_installdocs       -p$@ -P$(b)/$@
+	dh_installchangelogs -p$@ -P$(b)/$@ Changelog
+	dh_install			 -p$@ -P$(b)/$@
+	dh_strip             -p$@ -P$(b)/$@
+	dh_installexamples   -p$@ -P$(b)/$@
+	dh_compress          -p$@ -P$(b)/$@
+	dh_fixperms          -p$@ -P$(b)/$@
+	dh_installdeb        -p$@ -P$(b)/$@
+	dh_shlibdeps         -p$@ -P$(b)/$@
+	dh_installdebconf    -p$@ -P$(b)/$@
+	dh_gencontrol        -p$@ -P$(b)/$@
+	dh_makeshlibs        -p$@ -P$(b)/$@ -V
+	dh_md5sums           -p$@ -P$(b)/$@
+	dh_builddeb          -p$@ -P$(b)/$@
 
-	dh_installdebconf -a
+nagios-mysql: install
+	@echo "--- Building: $@"
+	dh_installdirs 		 -p$@ -P$(b)/$@ 
+	dh_link              -p$@ -P$(b)/$@ 
+	dh_installdocs       -p$@ -P$(b)/$@
+	dh_installchangelogs -p$@ -P$(b)/$@ Changelog
+	dh_install			 -p$@ -P$(b)/$@
+	dh_strip             -p$@ -P$(b)/$@
+	dh_installexamples   -p$@ -P$(b)/$@
+	dh_compress          -p$@ -P$(b)/$@
+	dh_fixperms          -p$@ -P$(b)/$@
+	dh_installdeb        -p$@ -P$(b)/$@
+	dh_shlibdeps         -p$@ -P$(b)/$@
+	dh_installdebconf    -p$@ -P$(b)/$@
+	dh_gencontrol        -p$@ -P$(b)/$@
+	dh_makeshlibs        -p$@ -P$(b)/$@ -V
+	dh_md5sums           -p$@ -P$(b)/$@
+	dh_builddeb          -p$@ -P$(b)/$@
 
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
+nagios-pgsql: install
+	@echo "--- Building: $@"
+	dh_installdirs 		 -p$@ -P$(b)/$@ 
+	dh_link              -p$@ -P$(b)/$@ 
+	dh_installdocs       -p$@ -P$(b)/$@
+	dh_installchangelogs -p$@ -P$(b)/$@ Changelog
+	dh_install			 -p$@ -P$(b)/$@
+	dh_strip             -p$@ -P$(b)/$@
+	dh_installexamples   -p$@ -P$(b)/$@
+	dh_compress          -p$@ -P$(b)/$@
+	dh_fixperms          -p$@ -P$(b)/$@
+	dh_installdeb        -p$@ -P$(b)/$@
+	dh_shlibdeps         -p$@ -P$(b)/$@
+	dh_installdebconf    -p$@ -P$(b)/$@
+	dh_gencontrol        -p$@ -P$(b)/$@
+	dh_makeshlibs        -p$@ -P$(b)/$@ -V
+	dh_md5sums           -p$@ -P$(b)/$@
+	dh_builddeb          -p$@ -P$(b)/$@
 
-install: build install-stamp
+install: install-stamp
 install-stamp:
 	dh_testdir -a
 	dh_testroot -a
-
-	# Add here commands to install the package into debian/tmp.
 	dh_installdirs -A
 
-	# * Install files into each package.
-	# * Move the hosts.cfg out of the way (into the examples dir)
-	# * Update nagios.cfg with information about plugins-auto.cfg.
-	# * Uncoment ^authorized_for_*' options in cgi.cfg.
-	# * Setup paths in all htdocs files
-	@( if [ -d "$(maindir)/debian/tmp" -a ! -d "$(maindir)/debian/nagios-text" ]; then \
-	     mv $(maindir)/debian/tmp $(maindir)/debian/nagios-text; \
-	   fi; \
-	   cd $(maindir)/base && cp nagios.text nagios; \
+# * Install files into each package.
+# * Move the hosts.cfg out of the way (into the examples dir)
+# * Update nagios.cfg with information about plugins-auto.cfg.
+# * Uncoment ^authorized_for_*' options in cgi.cfg.
+# * Setup paths in all htdocs files
+# FIXME: This one should be changed. Ideally the whole nagios thing would be changed
+# to complete automake and then use different build-trees. Or maybe build it 3 times and
+# just keep the debian/nagios-{package} dirs. Or something like this.
+	@( cd $(maindir)/base && cp nagios.text nagios; \
 	   cd $(maindir)/cgi && \
 	   for bin in $(CGIBINS); do \
-	     echo "cp $$bin.cgi.text $$bin.cgi"; \
 	     cp $$bin.cgi.text $$bin.cgi; \
 	   done; \
 	   for dir in text pgsql mysql; do \
@@ -236,8 +224,6 @@
 	       install -m 755 base/nagios.$$dir $(maindir)/debian/nagios-$$dir/usr/lib/cgi-bin/nagios/nagios; \
 	       install -m 755 contrib/traceroute.cgi $(maindir)/debian/nagios-$$dir/usr/lib/cgi-bin/nagios/; \
 	       cp -r contrib/eventhandlers/* $(maindir)/debian/nagios-$$dir/usr/lib/nagios/plugins/eventhandlers; \
-	       cp README UPGRADING $(maindir)/docs; \
-	       cp sample-config/nagios.cfg sample-config/resource.cfg $(maindir)/examples; \
 	       cat sample-config/nagios.cfg | \
 	         sh $(maindir)/debian/scripts/addpluginseg | \
 	         sed -e 's@command_file=/var/log@command_file=/var/cache@' \
@@ -301,8 +287,6 @@
 	rm -f $(maindir)/debian/nagios-text/etc/nagios/checkcommands.cfg
 	rm -f $(maindir)/debian/nagios-mysql/etc/nagios/checkcommands.cfg
 	rm -f $(maindir)/debian/nagios-pgsql/etc/nagios/checkcommands.cfg
-
-	mv $(maindir)/debian/nagios-text $(maindir)/debian/tmp
 
 	touch $(maindir)/install-stamp