--- ndoutils-1.4b9.orig/debian/compat
+++ ndoutils-1.4b9/debian/compat
@@ -0,0 +1 @@
+5
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.config.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.config.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+# config script for @@PACKAGE@@
+#
+# see: dh_installdeb(1)
+
+. /usr/share/debconf/confmodule
+
+dbc_dbuser=ndoutils
+dbc_dbname=ndoutils
+
+if [ -f /usr/share/dbconfig-common/dpkg/config.@@DB@@ ]; then
+ . /usr/share/dbconfig-common/dpkg/config.@@DB@@
+ dbc_go @@PKG_SHORT@@ $@
+fi
+db_stop
+
+# summary of how this script can be called:
+# * <config> `configure' <installed-version> (from dpkg-preconfigure)
+# * <config> `configure' <installed-version> (from postinst)
+# * <config> `reconfigure' <installed-version> (from dpkg-reconfigure)
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+ configure|reconfigure)
+ ;;
+ *)
+ echo "config called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
--- ndoutils-1.4b9.orig/debian/changelog
+++ ndoutils-1.4b9/debian/changelog
@@ -0,0 +1,149 @@
+ndoutils (1.4b9-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Make sure the MySQL database schema is updated on the package
+ upgrade (Closes: 607925) -- thanks to Drew Scott Daniels.
+
+ -- Konstantin Khomoutov <flatworm@users.sourceforge.net> Mon, 27 Dec 2010 12:41:15 +0300
+
+ndoutils (1.4b9-1) unstable; urgency=low
+
+ * New upstream version (Closes: 569973)
+ * Removes socket on (re)start if ndoutils isn't running (Closes: 560681)
+ * Enabled ucf --debconf-ok in postinst script (Closes: 545435)
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Mon, 08 Feb 2010 16:57:20 +0100
+
+ndoutils (1.4b7-11) unstable; urgency=low
+
+ * dropped empty ndoutils-nagios2-mysql binary package
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Tue, 03 Jun 2008 10:46:21 +0200
+
+ndoutils (1.4b7-10) unstable; urgency=low
+
+ * reverting changes for parallel usage of nagios2 & nagios3 to just support
+ nagios3 (Closes: 479289)
+ * debian/copyright
+ + switched to format as proposed on
+ http://wiki.debian.org/Proposals/CopyrightFormat
+
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Mon, 19 May 2008 22:51:09 +0200
+
+ndoutils (1.4b7-9) unstable; urgency=low
+
+ * moved common and shared files into ndoutils-common package
+ * enabled parallel installation of package for nagios version 2 and 3
+ * fixed some lintian warnings
+ * added db_purge to debian/postrm scripts
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Wed, 23 Apr 2008 11:24:32 +0200
+
+ndoutils (1.4b7-8) unstable; urgency=low
+
+ * debian/rules:
+ + changed install destination of dbconfig-commons db dumps to package
+ shortname
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Tue, 18 Mar 2008 13:48:39 +0100
+
+ndoutils (1.4b7-7) unstable; urgency=low
+
+ * postinst:
+ + moved debconfs db_stop after ucf is executed (Closes: #470695: package
+ upgrade or install freeze)
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Thu, 13 Mar 2008 11:43:07 +0100
+
+ndoutils (1.4b7-6) unstable; urgency=low
+
+ * enabled building for nagios3
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Tue, 05 Feb 2008 21:49:20 +0100
+
+ndoutils (1.4b7-5) unstable; urgency=low
+
+ * fixed build on GNU/kFreeBSD as building with -fPIC (Closes: #462718)
+ * disabled verbose packaging in debian/rules
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Sun, 27 Jan 2008 18:54:50 +0100
+
+ndoutils (1.4b7-4) unstable; urgency=low
+
+ * Fixed typo in README.Debian (Closes: #460862)
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Wed, 16 Jan 2008 09:34:19 +0100
+
+ndoutils (1.4b7-3) unstable; urgency=low
+
+ * Enabled source for DM-Upload
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Wed, 09 Jan 2008 10:47:09 +0100
+
+ndoutils (1.4b7-2) unstable; urgency=low
+
+ * updated Standards-Version to 3.7.3.
+ * removed bashism in debian/rules (Closes: #459180)
+ * removed Homepage stanza from description in debian/control
+ * removed empty directory usr/share/ndoutils-nagios2-mysql/tmpl/configs
+ * removed libz.o and libnsl.o linking since ndoutils uses none of its symbols
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Mon, 07 Jan 2008 18:05:50 +0100
+
+ndoutils (1.4b7-1) unstable; urgency=low
+
+ * New upstream release (Closes: #445996)
+ * Fixed Vcs-* in debian/control
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Thu, 01 Nov 2007 14:26:21 +0100
+
+ndoutils (1.4b6-2) unstable; urgency=low
+
+ * Fixed dbconfig-common's debconf packagename
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Thu, 27 Sep 2007 20:43:13 +0200
+
+ndoutils (1.4b6-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Thu, 27 Sep 2007 19:39:52 +0200
+
+ndoutils (1.4b5-2) unstable; urgency=low
+
+ * Changed Pre-Depends to Depends
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Wed, 19 Sep 2007 20:18:42 +0200
+
+ndoutils (1.4b5-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Wed, 29 Aug 2007 23:03:51 +0200
+
+ndoutils (1.4b4-2) unstable; urgency=low
+
+ * Fixed comments in debian/rules
+ * Changed Build-Depend to libmysqlclient15-dev too
+ * Used dbc_generate_include to generate ndo2db.cfg
+ * Removed configuration of broker_module in nagios.cfg (See README.Debian)
+ * Removed invoke-rc.d/nagios2 in {pre,post}{inst,rm}
+ * Fixed some lintian warnings
+ * Moved ndoutils specific binaries to /usr/lib/ndoutils
+ * Created manpages for binaries
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Mon, 09 Jul 2007 22:13:48 +0200
+
+ndoutils (1.4b4-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Wed, 20 Jun 2007 09:00:47 +0200
+
+ndoutils (1.4b3-1) unstable; urgency=low
+
+ * Initial release. (Closes: #413418: RFP: ndoutils -- This is a
+ database addon for Nagios. - Debian Bug report logs)
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Sun, 10 Jun 2007 14:14:29 +0200
--- ndoutils-1.4b9.orig/debian/dirs
+++ ndoutils-1.4b9/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
--- ndoutils-1.4b9.orig/debian/README.source
+++ ndoutils-1.4b9/debian/README.source
@@ -0,0 +1,9 @@
+README.source for ndoutils
+==========================
+
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+See /usr/share/doc/dpatch/README.source.gz for more information.
+
--- ndoutils-1.4b9.orig/debian/rules
+++ ndoutils-1.4b9/debian/rules
@@ -0,0 +1,334 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+b=$(shell pwd)/debian
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# 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)
+
+include /usr/share/dpatch/dpatch.make
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+#CONFIGURE = ./configure --prefix=/usr
+# --host=$(DEB_HOST_GNU_TYPE) \
+# --build=$(DEB_BUILD_GNU_TYPE) \
+# --mandir=\$${prefix}/share/man \
+# --infodir=\$${prefix}/share/info \
+# CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+
+CONFIGURE = ./configure --localstatedir=/var/cache/nagios3/
+CONFIG_MYSQL = CPPFLAGS=`mysql_config --include` $(CONFIGURE) \
+ --enable-mysql --disable-pgsql
+#CONFIG_PGSQL = CPPFLAGS="-I`pg_config --includedir`" $(CONFIGURE) \
+# --enable-pgsql --disable-mysql --with-pgsql-lib=`pg_config --libdir` --with-pgsql-inc=`pg_config --includedir`
+
+clean: unpatch
+ dh_testdir -a
+ dh_testroot -a
+ -rm -f \
+ build-ndoutils-mysql-stamp \
+ build-ndoutils-pgsql-stamp \
+ config-ndoutils-mysql-stamp \
+ config-ndoutils-pgsql-stamp
+ [ ! -f Makefile ] || $(MAKE) distclean
+ rm -f config.guess config.log config.sub
+ rm -f \
+ src/*-mysql src/*-mysql-2x* src/*-mysql-3x* \
+ src/*-pgsql src/*-pgsql-2x* src/*-pgsql-3x*
+ rm -f \
+ debian/ndoutils-nagios3-mysql.dirs \
+ debian/ndoutils-nagios3-mysql.docs \
+ debian/ndoutils-nagios3-mysql.manpages \
+ debian/ndoutils-nagios3-mysql.ndoutils.default \
+ debian/ndoutils-nagios3-mysql.ndoutils.init \
+ debian/ndoutils-nagios3-mysql.config \
+ debian/ndoutils-nagios3-mysql.preinst \
+ debian/ndoutils-nagios3-mysql.prerm \
+ debian/ndoutils-nagios3-mysql.postinst \
+ debian/ndoutils-nagios3-mysql.postrm \
+ debian/ndoutils-nagios3-mysql.README.Debian \
+ debian/ndoutils-nagios3-pgsql.dirs \
+ debian/ndoutils-nagios3-pgsql.manpages \
+ debian/ndoutils-nagios3-pgsql.ndoutils.default \
+ debian/ndoutils-nagios3-pgsql.ndoutils.init \
+ debian/ndoutils-nagios3-pgsql.config \
+ debian/ndoutils-nagios3-pgsql.preinst \
+ debian/ndoutils-nagios3-pgsql.prerm \
+ debian/ndoutils-nagios3-pgsql.postinst \
+ debian/ndoutils-nagios3-pgsql.postrm \
+ debian/ndoutils-nagios3-pgsql.README.Debian
+
+ rm -f debian/doc/NDOUTILS\ DB\ Model.odt \
+ debian/doc/NDOUtils\ Documentation.sxw
+ dh_clean
+
+config-ndoutils-mysql: config-ndoutils-mysql-stamp
+config-ndoutils-mysql-stamp: patch
+ dh_testdir -a
+ @echo " ### Doing $@"
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+ $(CONFIG_MYSQL)
+ touch $@
+
+#config-ndoutils-pgsql: config-ndoutils-pgsql-stamp
+#config-ndoutils-pgsql-stamp: patch
+# dh_testdir -a
+# @echo " ### Doing $@"
+# -make clean;
+# $(CONFIG_PGSQL)
+# touch $@
+
+build-ndoutils-mysql: build-ndoutils-mysql-stamp
+build-ndoutils-mysql-stamp: config-ndoutils-mysql-stamp
+ dh_testdir -a
+ @echo " ### Doing $@"
+ $(MAKE) && \
+ (cd src && \
+ mv ndomod-2x.o ndomod-mysql-2x.o && \
+ mv ndomod-3x.o ndomod-mysql-3x.o && \
+ mv ndo2db-2x ndo2db-mysql-2x && \
+ mv ndo2db-3x ndo2db-mysql-3x && \
+ mv log2ndo log2ndo-mysql && \
+ mv sockdebug sockdebug-mysql && \
+ mv file2sock file2sock-mysql \
+ );
+ touch $@
+
+#build-ndoutils-pgsql: build-ndoutils-pgsql-stamp
+#build-ndoutils-pgsql-stamp: config-ndoutils-pgsql-stamp
+# dh_testdir -a
+# @echo " ### Doing $@"
+# $(MAKE) && \
+# (cd src && \
+# mv ndomod-2x.o ndomod-pgsql-2x.o && \
+# mv ndo2db-2x ndo2db-pgsql-2x && \
+# mv log2ndo log2ndo-pgsql && \
+# mv sockdebug sockdebug-pgsql && \
+# mv file2sock file2sock-pgsql \
+# );
+# touch $@
+
+# TODO: ndoutils-pgsql
+binary-arch: ndoutils-common ndoutils-mysql
+ dh_testdir -a
+ dh_testroot -a
+
+binary-indep: ndoutils-doc
+
+ndoutils-mysql: ndoutils-nagios3-mysql
+
+ndoutils-nagios3-mysql: build-ndoutils-mysql
+ @echo " ### Doing $@"
+ for script in dirs docs config preinst postinst prerm postrm manpages ndoutils.default ndoutils.init README.Debian; do \
+ test -e debian/ndoutils-NG-DB.$${script}.in && \
+ sed " s/@@NG@@/nagios3/g; \
+ s/@@DB@@/mysql/g; \
+ s/@@PACKAGE@@/$@/g; \
+ s/@@PKG_SHORT@@/ndoutils-mysql/g; \
+ s/@@DBPORT@@/3306/g; \
+ s/@@NGV@@/3x/g" \
+ < debian/ndoutils-NG-DB.$${script}.in > debian/$@.$${script}; \
+ done
+ dh_installdirs -p$@ -P$(b)/$@
+
+ # install the binaries
+ for bin in ndomod-mysql-3x.o ndo2db-mysql-3x; do \
+ install -m 755 src/$$bin debian/$@/usr/lib/ndoutils/$$bin; \
+ done
+
+ # install the config templates
+ for cfg in ndo2db.cfg-sample ndomod.cfg-sample; do \
+ sed -e 's/^ *[^#]* *\(\<db_servertype\) *=.*$$/\1=_DBC_DBTYPE_/' \
+ -e 's/^ *[^#]* *\(\<db_host\) *=.*$$/\1=_DBC_DBSERVER_/' \
+ -e 's/^ *[^#]* *\(\<db_port\) *=.*$$/\1=_DBC_DBPORT_/' \
+ -e 's/^ *[^#]* *\(\<db_name\) *=.*$$/\1=_DBC_DBNAME_/' \
+ -e 's/^ *[^#]* *\(\<db_user\) *=.*$$/\1=_DBC_DBUSER_/' \
+ -e 's/^ *[^#]* *\(\<db_pass\) *=.*$$/\1=_DBC_DBPASS_/' \
+ -e 's/_NAGIOS_/nagios3/g' \
+ < config/$$cfg \
+ > debian/$@/usr/share/$@/tmpl/$$cfg; \
+ done
+
+ # install the SQL schemes
+ install -m 644 db/mysql.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/install/mysql
+ install -m 644 db/mysql-upgrade-1.3.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.3
+ install -m 644 db/mysql-upgrade-1.4b1.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b1
+ install -m 644 db/mysql-upgrade-1.4b2.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b2
+ install -m 644 db/mysql-upgrade-1.4b3.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b3
+ install -m 644 db/mysql-upgrade-1.4b4.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b4
+ install -m 644 db/mysql-mods-1.4b5.sql \
+ debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b5
+ sed -e 's/`nagios`\.//' < db/mysql-upgrade-1.4b8.sql \
+ > debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b8
+ sed -e 's/^[[:space:]]*;/--/' < db/mysql-mods-1.4b8.sql \
+ >> debian/$@/usr/share/dbconfig-common/data/ndoutils-mysql/upgrade/mysql/1.4b8
+
+ # use debhelper
+ dh_installchangelogs -p$@ -P$(b)/$@
+ dh_installdebconf -p$@ -P$(b)/$@
+ dh_installdocs -p$@ -P$(b)/$@ --all
+ dh_installman -p$@ -P$(b)/$@ --all
+ dh_installinit -p$@ -P$(b)/$@ --name=ndoutils
+ dh_link -p$@ -P$(b)/$@ \
+ usr/lib/ndoutils/ndo2db-mysql-3x usr/sbin/ndo2db
+ dh_strip -p$@ -P$(b)/$@
+ dh_compress -p$@ -P$(b)/$@
+ dh_fixperms -p$@ -P$(b)/$@
+ dh_makeshlibs -p$@ -P$(b)/$@ -V
+ dh_installdeb -p$@ -P$(b)/$@
+ dh_shlibdeps -p$@ -P$(b)/$@
+ dh_gencontrol -p$@ -P$(b)/$@
+ dh_md5sums -p$@ -P$(b)/$@
+ dh_builddeb -p$@ -P$(b)/$@
+
+ndoutils-common: build-ndoutils-mysql
+ @echo " ### Doing: $@"
+ dh_installdirs -p$@ -P$(b)/$@
+
+ install -m 755 src/sockdebug-mysql debian/$@/usr/lib/ndoutils/sockdebug
+ install -m 755 src/file2sock-mysql debian/$@/usr/lib/ndoutils/file2sock
+ install -m 755 src/log2ndo-mysql debian/$@/usr/lib/ndoutils/log2ndo
+
+ # use debhelper
+ dh_installchangelogs -p$@ -P$(b)/$@
+ dh_installdebconf -p$@ -P$(b)/$@
+ dh_installdocs -p$@ -P$(b)/$@ --all
+ dh_installman -p$@ -P$(b)/$@ --all
+ dh_link -p$@ -P$(b)/$@ \
+ usr/lib/ndoutils/sockdebug usr/sbin/sockdebug \
+ usr/lib/ndoutils/file2sock usr/sbin/file2sock \
+ usr/lib/ndoutils/log2ndo usr/sbin/log2ndo
+ dh_strip -p$@ -P$(b)/$@
+ dh_compress -p$@ -P$(b)/$@
+ dh_fixperms -p$@ -P$(b)/$@
+ dh_makeshlibs -p$@ -P$(b)/$@ -V
+ dh_installdeb -p$@ -P$(b)/$@
+ dh_shlibdeps -p$@ -P$(b)/$@
+ dh_gencontrol -p$@ -P$(b)/$@
+ dh_md5sums -p$@ -P$(b)/$@
+ dh_builddeb -p$@ -P$(b)/$@
+
+#ndoutils-pgsql: build-ndoutils-pgsql
+# @echo " ### Doing $@"
+# dh_installdirs -p$@ -P$(b)/$@
+# # install the binaries
+# install -m 755 src/ndomod-pgsql-2x.o debian/$@/usr/lib/ndoutils/ndomod.o
+# install -m 755 src/ndo2db-pgsql-2x debian/$@/usr/sbin/ndo2db
+# install -m 755 src/sockdebug-pgsql debian/$@/usr/sbin/sockdebug
+# install -m 755 src/file2sock-pgsql debian/$@/usr/sbin/file2sock
+# install -m 755 src/log2ndo-pgsql debian/$@/usr/sbin/log2ndo
+# # install the config templates
+# install -m 644 config/ndomod.cfg debian/$@/usr/share/$@/tmpl
+# install -m 644 config/ndo2db.cfg debian/$@/usr/share/$@/tmpl
+# # there are NO SQL scheme to install
+#
+# # TODO: manpages!
+# #for binary in log2ndo ndo2db ndomod sockdebug file2sock; do \
+# # ln -s /usr/share/man/man7/undocumented.7.gz debian/$${binary}.7.gz; \
+# #done
+#
+# sed "s/@@DB@@/pgsql/g; s/@@PACKAGE@@/$@/g; s/@@DBPORT@@/5432/g" < debian/ndoutils-DB.preinst.in > debian/$@.preinst
+# sed "s/@@DB@@/pgsql/g; s/@@PACKAGE@@/$@/g; s/@@DBPORT@@/5432/g" < debian/ndoutils-DB.postinst.in > debian/$@.postinst
+# sed "s/@@DB@@/pgsql/g; s/@@PACKAGE@@/$@/g; s/@@DBPORT@@/5432/g" < debian/ndoutils-DB.prerm.in > debian/$@.prerm
+# sed "s/@@DB@@/pgsql/g; s/@@PACKAGE@@/$@/g; s/@@DBPORT@@/5432/g" < debian/ndoutils-DB.postrm.in > debian/$@.postrm
+#
+# # use debhelper
+# dh_installchangelogs -p$@ -P$(b)/$@
+# dh_installdebconf -p$@ -P$(b)/$@
+# dh_installdocs -p$@ -P$(b)/$@
+# dh_installinit -p$@ -P$(b)/$@ --name=ndoutils
+# #dh_installman -p$@ -P$(b)/$@ # TODO: manpages!
+# dh_link -p$@ -P$(b)/$@
+# dh_strip -p$@ -P$(b)/$@
+# dh_compress -p$@ -P$(b)/$@
+# dh_fixperms -p$@ -P$(b)/$@
+# dh_makeshlibs -p$@ -P$(b)/$@ -V
+# dh_installdeb -p$@ -P$(b)/$@
+# dh_shlibdeps -p$@ -P$(b)/$@
+# dh_gencontrol -p$@ -P$(b)/$@
+# dh_md5sums -p$@ -P$(b)/$@
+# dh_builddeb -p$@ -P$(b)/$@
+
+ndoutils-doc:
+ @echo " ### Doing $@"
+ dh_installdirs -p$@ -P$(b)/$@
+ mkdir -p debian/$@/usr/share/doc/ndoutils-doc
+ install -m 644 docs/*.pdf debian/$@/usr/share/doc/ndoutils-doc
+ # use debhelper
+ dh_installchangelogs -p$@ -P$(b)/$@
+ dh_installdocs -p$@ -P$(b)/$@
+ dh_compress -p$@ -P$(b)/$@ -X.pdf
+ dh_fixperms -p$@ -P$(b)/$@
+ dh_installdeb -p$@ -P$(b)/$@
+ dh_gencontrol -p$@ -P$(b)/$@
+ dh_md5sums -p$@ -P$(b)/$@
+ dh_builddeb -p$@ -P$(b)/$@
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+#binary-common:
+# dh_testdir
+# dh_testroot
+# dh_installchangelogs
+# dh_installdocs
+# dh_installexamples
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit --name=ndoutils
+# dh_installcron
+# dh_installinfo
+# dh_installman
+# dh_link
+# dh_strip
+# dh_compress
+# dh_fixperms
+# dh_perl
+# dh_makeshlibs
+# dh_installdeb
+# dh_shlibdeps
+# dh_gencontrol
+# dh_md5sums
+# dh_builddeb
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
--- ndoutils-1.4b9.orig/debian/copyright
+++ ndoutils-1.4b9/debian/copyright
@@ -0,0 +1,28 @@
+This package was debianized by Hendrik Frenzel <hfrenzel@scunc.net>
+
+Files: *
+Copyright: © 2005-2008 Ethan Galstad <nagios@nagios.org>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'.
+
+Files: debian/*
+Copyright: © 2007-2008 Hendrik Frenzel <hfrenzel@scunc.net>
+License: GPL-2+
+ The Debian packaging information is under the GPL, version 2 or later.
+ See above.
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.ndoutils.init.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.ndoutils.init.in
@@ -0,0 +1,96 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: ndoutils-@@NGV@@
+# Required-Start: $syslog
+# Required-Stop: $syslog
+# Should-Start: $local_fs
+# Should-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts ndo2db daemon for @@NG@@ at boot time
+# Description: This will start the ndo2db daemon for @@NG@@ at boot time
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/ndo2db
+NAME=ndoutils
+DESC=ndoutils
+SOCKET="/var/cache/nagios3/ndo.sock"
+
+test -x $DAEMON || exit 0
+
+# Include ndoutils defaults if available
+if [ -f /etc/default/ndoutils ] ; then
+ . /etc/default/ndoutils
+fi
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ test ! "$ENABLE_NDOUTILS" = 1 && { echo "Not enabled in /etc/default/ndoutils"; exit 0; }
+ if pgrep -u nagios -f "$DAEMON $DAEMON_OPTS"; then
+ echo "Socket exists. $NAME is already running."
+ exit 0
+ else
+ rm -f $SOCKET
+ fi
+
+ start-stop-daemon --start --quiet --user nagios --group nagios --exec $DAEMON --background -- $DAEMON_OPTS
+ echo "$NAME."
+
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
+ echo "$NAME."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # echo "Reloading $DESC configuration files."
+ # start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+ #;;
+ force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart" except that it does nothing if the
+ # daemon isn't already running.
+ # check wether $DAEMON is running. If so, restart
+ start-stop-daemon --stop --test --quiet --exec $DAEMON \
+ && $0 restart \
+ || exit 0
+ ;;
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
+ sleep 1
+ echo "$NAME."
+ test ! "$ENABLE_NDOUTILS" = 1 && { echo "Not enabled in /etc/defaults/ndoutils"; exit 0; }
+ if `pgrep -u nagios -f "$DAEMON $DAEMON_OPTS"`; then
+ echo "Socket still exists. $NAME is already running."
+ exit 1
+ else
+ rm -f $SOCKET
+ fi
+
+ start-stop-daemon --start --quiet --exec $DAEMON --background -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- ndoutils-1.4b9.orig/debian/watch
+++ ndoutils-1.4b9/debian/watch
@@ -0,0 +1,22 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php ndoutils-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/ndoutils-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/ndoutils-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge, for debscripts >= 2.9
+http://sf.net/nagios/ndoutils-(\d+\..*)\.tar\.gz
+
+
--- ndoutils-1.4b9.orig/debian/ndoutils-common.manpages
+++ ndoutils-1.4b9/debian/ndoutils-common.manpages
@@ -0,0 +1,4 @@
+debian/manpages/file2sock.1
+debian/manpages/sockdebug.1
+debian/manpages/log2ndo.1
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.ndoutils.default.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.ndoutils.default.in
@@ -0,0 +1,17 @@
+# Defaults for @@PACKAGE@@ initscript
+# sourced by /etc/init.d/ndoutils
+# installed at /etc/default/ndoutils by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# You have to enable ndoutils broker module first to use ndoutils.
+# (see /usr/share/doc/@@PACKAGE@@/README.Debian)
+ENABLE_NDOUTILS=0
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS="-c /etc/@@NG@@/ndo2db.cfg"
+
+# Path to the socket. Default: /var/cache/nagios3/ndo.sock
+#SOCKET=/var/cache/nagios3/ndo.sock
--- ndoutils-1.4b9.orig/debian/control
+++ ndoutils-1.4b9/debian/control
@@ -0,0 +1,50 @@
+Source: ndoutils
+Section: net
+Priority: extra
+Maintainer: Hendrik Frenzel <hfrenzel@scunc.net>
+Build-Depends: debhelper (>= 5), dpatch, autotools-dev, libmysqlclient15-dev | libmysqlclient-dev
+Uploaders: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
+Standards-Version: 3.8.4
+Homepage: http://www.nagios.org
+Vcs-Svn: svn://svn.debian.org/svn/pkg-nagios/ndoutils/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-nagios/ndoutils/trunk/
+Dm-Upload-Allowed: yes
+
+Package: ndoutils-nagios3-mysql
+Architecture: any
+Provides: ndoutils, ndoutils-mysql
+Conflicts: ndoutils-nagios2-mysql (<= ${source:Version}), ndoutils-pgsql
+Depends: ndoutils-common (>= ${source:Version}), nagios3, mysql-client, ucf, debconf, dbconfig-common, ${shlibs:Depends}, ${misc:Depends}
+Recommends: mysql-server
+Suggests: ndoutils-doc
+Description: This provides the NDOUtils for Nagios with MySQL support
+ The NDOUtils (Nagios Data Output Utils) addon allows you to move status
+ and event information from Nagios to a database for later retrieval and
+ processing.
+ .
+ This package uses Nagios 3 and MySQL databases.
+
+Package: ndoutils-common
+Architecture: any
+Conflicts: ndoutils-nagios2-mysql (<= ${source:Version})
+Depends: ndoutils | ndoutils-nagios3, ucf, dbconfig-common, ${shlibs:Depends}, ${misc:Depends}
+Suggests: ndoutils-doc
+Description: NDOUtils common files
+ The NDOUtils (Nagios Data Output Utils) addon allows you to move status
+ and event information from Nagios to a database for later retrieval and
+ processing.
+ .
+ This package contains common shared files for NDOUtils.
+
+Package: ndoutils-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: ndoutils
+Description: Documentation for ndoutils
+ The NDOUtils (Nagios Data Output Utils) addon allows you to move status
+ and event information from Nagios to a database for later retrieval and
+ processing.
+ .
+ This is the documentation package.
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.postinst.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.postinst.in
@@ -0,0 +1,52 @@
+#!/bin/sh
+# postinst script for @@PACKAGE@@
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+if [ -f /usr/share/dbconfig-common/dpkg/postinst.@@DB@@ ]; then
+ . /usr/share/dbconfig-common/dpkg/postinst.@@DB@@
+ dbc_generate_include='template:/etc/@@NG@@/ndo2db.cfg'
+ dbc_generate_include_owner='nagios:nagios'
+ dbc_generate_include_args='--ucf -o template_infile=/usr/share/@@PACKAGE@@/tmpl/ndo2db.cfg-sample'
+ dbc_go @@PKG_SHORT@@ $@
+fi
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+ configure)
+ ucf --debconf-ok /usr/share/@@PACKAGE@@/tmpl/ndomod.cfg-sample /etc/@@NG@@/ndomod.cfg
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+db_stop
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ndoutils-1.4b9.orig/debian/ndoutils-doc.docs
+++ ndoutils-1.4b9/debian/ndoutils-doc.docs
@@ -0,0 +1,2 @@
+#DOCS#
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.prerm.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.prerm.in
@@ -0,0 +1,44 @@
+#!/bin/sh
+# prerm script for @@PACKAGE@@
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/prerm.@@DB@@
+dbc_go @@PKG_SHORT@@ $@
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.preinst.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.preinst.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+# preinst script for @@PACKAGE@@
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ndoutils-1.4b9.orig/debian/ndoutils-common.dirs
+++ ndoutils-1.4b9/debian/ndoutils-common.dirs
@@ -0,0 +1,2 @@
+/usr/lib/ndoutils
+
--- ndoutils-1.4b9.orig/debian/ndoutils-doc.install
+++ ndoutils-1.4b9/debian/ndoutils-doc.install
@@ -0,0 +1,2 @@
+#DOCS#
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.dirs.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.dirs.in
@@ -0,0 +1,6 @@
+/usr/sbin
+/usr/lib/ndoutils
+/usr/share/@@PACKAGE@@/tmpl
+/usr/share/dbconfig-common/data/@@PKG_SHORT@@/install
+/usr/share/dbconfig-common/data/@@PKG_SHORT@@/upgrade/@@DB@@
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.postrm.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.postrm.in
@@ -0,0 +1,57 @@
+#!/bin/sh
+# postrm script for @@PACKAGE@@
+#
+# see: dh_installdeb(1)
+
+set -e
+
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.@@DB@@ ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.@@DB@@
+ dbc_go @@PKG_SHORT@@ $@
+fi
+
+if [ "$1" = "purge" ]; then
+ db_purge
+ for f in ndomod.cfg ndo2db.cfg; do
+ rm -f /etc/@@NG@@/$f
+ ucf --purge /etc/@@NG@@/$f
+ done
+fi
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.manpages.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.manpages.in
@@ -0,0 +1,2 @@
+debian/manpages/ndo2db-@@NGV@@.1
+
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.README.Debian.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.README.Debian.in
@@ -0,0 +1,27 @@
+ndoutils for Debian
+-------------------
+
+The NDO utilities includes a Nagios event broker module (NDOMOD.O) that exports
+data from the Nagios daemon. You have to enable it after installing the package.
+
+Edit /etc/@@NG@@/nagios.cfg and change or append the following line:
+
+ broker_module=/usr/lib/ndoutils/ndomod-@@DB@@-@@NGV@@.o config_file=/etc/@@NG@@/ndomod.cfg
+
+Don't forget to restart Nagios after changing the configuration:
+
+ invoke-rc.d @@NG@@ restart
+
+After configuring Nagios to use the NDO utilities broker module, you have to
+enable the NDO utilities daemon in /etc/default/ndoutils by setting
+
+ ENABLE_NDOUTILS=1
+
+and start the daemon
+
+ invoke-rc.d ndoutils start
+
+For more information and a detailed documentation about the NDO utilities
+install the ndoutils-doc package.
+
+ -- Hendrik Frenzel <hfrenzel@scunc.net> Mon, 09 Jul 2007 19:27:42 +0200
--- ndoutils-1.4b9.orig/debian/ndoutils-NG-DB.docs.in
+++ ndoutils-1.4b9/debian/ndoutils-NG-DB.docs.in
@@ -0,0 +1,2 @@
+README
+TODO
--- ndoutils-1.4b9.orig/debian/patches/01-pathnames.dpatch
+++ ndoutils-1.4b9/debian/patches/01-pathnames.dpatch
@@ -0,0 +1,102 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-pathnames.dpatch by <hfrenzel@assos.scunc.home>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changes the pathnames to the right ones
+
+@DPATCH@
+diff -urNad ndoutils-1.4b7~/include/nagios-2x/locations.h ndoutils-1.4b7/include/nagios-2x/locations.h
+--- ndoutils-1.4b7~/include/nagios-2x/locations.h 2007-10-31 19:17:05.000000000 +0100
++++ ndoutils-1.4b7/include/nagios-2x/locations.h 2008-04-08 21:52:20.000000000 +0200
+@@ -18,22 +18,22 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ************************************************************************/
+
+-#define DEFAULT_TEMP_FILE "/usr/local/nagios/var/tempfile"
+-#define DEFAULT_STATUS_FILE "/usr/local/nagios/var/status.dat"
+-#define DEFAULT_LOG_FILE "/usr/local/nagios/var/nagios.log"
+-#define DEFAULT_LOG_ARCHIVE_PATH "/usr/local/nagios/var/archives/"
+-#define DEFAULT_COMMENT_FILE "/usr/local/nagios/var/comments.dat"
+-#define DEFAULT_DOWNTIME_FILE "/usr/local/nagios/var/downtime.dat"
+-#define DEFAULT_RETENTION_FILE "/usr/local/nagios/var/retention.dat"
+-#define DEFAULT_COMMAND_FILE "/usr/local/nagios/var/rw/nagios.cmd"
+-#define DEFAULT_CONFIG_FILE "/usr/local/nagios/etc/nagios.cfg"
+-#define DEFAULT_PHYSICAL_HTML_PATH "/usr/local/nagios/share"
+-#define DEFAULT_URL_HTML_PATH "/nagios"
+-#define DEFAULT_PHYSICAL_CGIBIN_PATH "/usr/local/nagios/sbin"
+-#define DEFAULT_URL_CGIBIN_PATH "/nagios/cgi-bin"
+-#define DEFAULT_CGI_CONFIG_FILE "/usr/local/nagios/etc/cgi.cfg"
+-#define DEFAULT_LOCK_FILE "/usr/local/nagios/var/nagios.lock"
+-#define DEFAULT_OBJECT_CACHE_FILE "/usr/local/nagios/var/objects.cache"
+-#define DEFAULT_EVENT_BROKER_FILE "/usr/local/nagios/var/broker.socket"
+-#define DEFAULT_P1_FILE "/usr/local/nagios/bin/p1.pl" /**** EMBEDDED PERL ****/
++#define DEFAULT_TEMP_FILE "/var/cache/nagios2/tempfile"
++#define DEFAULT_STATUS_FILE "/var/cache/nagios2/status.dat"
++#define DEFAULT_LOG_FILE "/var/log/nagios2/nagios.log"
++#define DEFAULT_LOG_ARCHIVE_PATH "/var/log/nagios2/archives/"
++#define DEFAULT_COMMENT_FILE "/var/lib/nagios2/comments.dat"
++#define DEFAULT_DOWNTIME_FILE "/var/lib/nagios2/downtime.dat"
++#define DEFAULT_RETENTION_FILE "/var/lib/nagiod2/retention.dat"
++#define DEFAULT_COMMAND_FILE "/var/lib/nagios2/rw/nagios.cmd"
++#define DEFAULT_CONFIG_FILE "/etc/nagios2/nagios.cfg"
++#define DEFAULT_PHYSICAL_HTML_PATH "/usr/share/nagios2/htdocs"
++#define DEFAULT_URL_HTML_PATH "/nagios2"
++#define DEFAULT_PHYSICAL_CGIBIN_PATH "/usr/lib/cgi-bin/nagios2"
++#define DEFAULT_URL_CGIBIN_PATH "/cgi-bin/nagios2"
++#define DEFAULT_CGI_CONFIG_FILE "/etc/nagios2/cgi.cfg"
++#define DEFAULT_LOCK_FILE "/var/lock/nagios2/nagios.lock"
++#define DEFAULT_OBJECT_CACHE_FILE "/var/cache/nagios2/objects.cache"
++#define DEFAULT_EVENT_BROKER_FILE "/var/cache/nagios2/broker.socket"
++#define DEFAULT_P1_FILE "/usr/lib/nagios2/bin/p1.pl" /**** EMBEDDED PERL ****/
+ #define DEFAULT_AUTH_FILE "" /**** EMBEDDED PERL - IS THIS USED? ****/
+diff -urNad ndoutils-1.4b7~/include/nagios-3x/locations.h ndoutils-1.4b7/include/nagios-3x/locations.h
+--- ndoutils-1.4b7~/include/nagios-3x/locations.h 2007-06-20 01:20:39.000000000 +0200
++++ ndoutils-1.4b7/include/nagios-3x/locations.h 2008-04-08 22:08:37.000000000 +0200
+@@ -18,26 +18,26 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ************************************************************************/
+
+-#define DEFAULT_TEMP_FILE "/usr/local/nagios/var/tempfile"
++#define DEFAULT_TEMP_FILE "/var/cache/nagios3/tempfile"
+ #define DEFAULT_TEMP_PATH "/tmp"
+-#define DEFAULT_CHECK_RESULT_PATH "/usr/local/nagios/var/spool/checkresults"
+-#define DEFAULT_STATUS_FILE "/usr/local/nagios/var/status.dat"
+-#define DEFAULT_LOG_FILE "/usr/local/nagios/var/nagios.log"
+-#define DEFAULT_LOG_ARCHIVE_PATH "/usr/local/nagios/var/archives/"
+-#define DEFAULT_DEBUG_FILE "/usr/local/nagios/var/nagios.debug"
+-#define DEFAULT_COMMENT_FILE "/usr/local/nagios/var/comments.dat"
+-#define DEFAULT_DOWNTIME_FILE "/usr/local/nagios/var/downtime.dat"
+-#define DEFAULT_RETENTION_FILE "/usr/local/nagios/var/retention.dat"
+-#define DEFAULT_COMMAND_FILE "/usr/local/nagios/var/rw/nagios.cmd"
+-#define DEFAULT_CONFIG_FILE "/usr/local/nagios/etc/nagios.cfg"
+-#define DEFAULT_PHYSICAL_HTML_PATH "/usr/local/nagios/share"
+-#define DEFAULT_URL_HTML_PATH "/nagios"
+-#define DEFAULT_PHYSICAL_CGIBIN_PATH "/usr/local/nagios/sbin"
+-#define DEFAULT_URL_CGIBIN_PATH "/nagios/cgi-bin"
+-#define DEFAULT_CGI_CONFIG_FILE "/usr/local/nagios/etc/cgi.cfg"
+-#define DEFAULT_LOCK_FILE "/usr/local/nagios/var/nagios.lock"
+-#define DEFAULT_OBJECT_CACHE_FILE "/usr/local/nagios/var/objects.cache"
+-#define DEFAULT_PRECACHED_OBJECT_FILE "/usr/local/nagios/var/objects.precache"
+-#define DEFAULT_EVENT_BROKER_FILE "/usr/local/nagios/var/broker.socket"
+-#define DEFAULT_P1_FILE "/usr/local/nagios/bin/p1.pl" /**** EMBEDDED PERL ****/
++#define DEFAULT_CHECK_RESULT_PATH "/var/spool/nagios3/checkresults"
++#define DEFAULT_STATUS_FILE "/var/cache/nagios3/status.dat"
++#define DEFAULT_LOG_FILE "/var/log/nagios3/nagios.log"
++#define DEFAULT_LOG_ARCHIVE_PATH "/var/log/nagios3/archives/"
++#define DEFAULT_DEBUG_FILE "/var/log/nagios3/nagios.debug"
++#define DEFAULT_COMMENT_FILE "/var/lib/nagios3/comments.dat"
++#define DEFAULT_DOWNTIME_FILE "/var/lib/nagios3/downtime.dat"
++#define DEFAULT_RETENTION_FILE "/var/lib/nagiod3/retention.dat"
++#define DEFAULT_COMMAND_FILE "/var/lib/nagios3/rw/nagios.cmd"
++#define DEFAULT_CONFIG_FILE "/etc/nagios3/nagios.cfg"
++#define DEFAULT_PHYSICAL_HTML_PATH "/usr/share/nagios3/htdocs"
++#define DEFAULT_URL_HTML_PATH "/nagios3"
++#define DEFAULT_PHYSICAL_CGIBIN_PATH "/usr/lib/cgi-bin/nagios3"
++#define DEFAULT_URL_CGIBIN_PATH "/cgi-bin/nagios3"
++#define DEFAULT_CGI_CONFIG_FILE "/etc/nagios3/cgi.cfg"
++#define DEFAULT_LOCK_FILE "/var/lock/nagios3/nagios.lock"
++#define DEFAULT_OBJECT_CACHE_FILE "/var/cache/nagios3/objects.cache"
++#define DEFAULT_PRECACHED_OBJECT_FILE "/var/cache/nagios3/objects.precache"
++#define DEFAULT_EVENT_BROKER_FILE "/var/cache/nagios3/broker.socket"
++#define DEFAULT_P1_FILE "/usr/lib/nagios3/bin/p1.pl" /**** EMBEDDED PERL ****/
+ #define DEFAULT_AUTH_FILE "" /**** EMBEDDED PERL - IS THIS USED? ****/
--- ndoutils-1.4b9.orig/debian/patches/02-makefiles.dpatch
+++ ndoutils-1.4b9/debian/patches/02-makefiles.dpatch
@@ -0,0 +1,79 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02-makefiles.dpatch by <hfrenzel@assos.scunc.home>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adds CPPFLAGS to compile arguments
+
+@DPATCH@
+diff -urNad ndoutils-1.4b7~/src/Makefile.in ndoutils-1.4b7/src/Makefile.in
+--- ndoutils-1.4b7~/src/Makefile.in 2007-10-03 03:02:58.000000000 +0200
++++ ndoutils-1.4b7/src/Makefile.in 2008-01-07 17:57:50.000000000 +0100
+@@ -11,6 +11,7 @@
+ CC=@CC@
+
+ CFLAGS=@CFLAGS@ @DEFS@
++CPPFLAGS=@CPPFLAGS@
+
+ # We don't like ANSI because ANSI doesn't like us! phhht!
+ #CFLAGS=-g -Wall -ansi -pedantic -DHAVE_CONFIG_H
+@@ -43,48 +44,48 @@
+ all: file2sock log2ndo ndo2db ndomod sockdebug
+
+ file2sock: file2sock.c $(COMMON_INC) $(COMMON_OBJS)
+- $(CC) $(CFLAGS) -o $@ file2sock.c $(COMMON_OBJS) $(LDFLAGS) $(LIBS) $(MATHLIBS) $(SOCKETLIBS) $(OTHERLIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ file2sock.c $(COMMON_OBJS) $(LDFLAGS) $(LIBS) $(MATHLIBS) $(SOCKETLIBS) $(OTHERLIBS)
+
+ log2ndo: log2ndo.c $(COMMON_INC) $(COMMON_OBJS)
+- $(CC) $(CFLAGS) -o $@ log2ndo.c $(COMMON_OBJS) $(LDFLAGS) $(LIBS) $(MATHLIBS) $(SOCKETLIBS) $(OTHERLIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ log2ndo.c $(COMMON_OBJS) $(LDFLAGS) $(LIBS) $(MATHLIBS) $(SOCKETLIBS) $(OTHERLIBS)
+
+ ndo2db:
+ $(MAKE) ndo2db-2x
+ $(MAKE) ndo2db-3x
+
+ ndo2db-2x: ndo2db.c $(NDO_INC) $(NDO_OBJS) $(COMMON_INC) $(COMMON_OBJS) dbhandlers-2x.o
+- $(CC) $(CFLAGS) $(DBCFLAGS) -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c dbhandlers-2x.o $(COMMON_OBJS) $(NDO_OBJS) $(LDFLAGS) $(DBLDFLAGS) $(LIBS) $(SOCKETLIBS) $(DBLIBS) $(MATHLIBS) $(OTHERLIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(DBCFLAGS) -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c dbhandlers-2x.o $(COMMON_OBJS) $(NDO_OBJS) $(LDFLAGS) $(DBLDFLAGS) $(LIBS) $(SOCKETLIBS) $(DBLIBS) $(MATHLIBS) $(OTHERLIBS)
+
+ ndo2db-3x: ndo2db.c $(NDO_INC) $(NDO_OBJS) $(COMMON_INC) $(COMMON_OBJS) dbhandlers-3x.o
+- $(CC) $(CFLAGS) $(DBCFLAGS) -D BUILD_NAGIOS_3X -o ndo2db-3x ndo2db.c dbhandlers-3x.o $(COMMON_OBJS) $(NDO_OBJS) $(LDFLAGS) $(DBLDFLAGS) $(LIBS) $(SOCKETLIBS) $(DBLIBS) $(MATHLIBS) $(OTHERLIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(DBCFLAGS) -D BUILD_NAGIOS_3X -o ndo2db-3x ndo2db.c dbhandlers-3x.o $(COMMON_OBJS) $(NDO_OBJS) $(LDFLAGS) $(DBLDFLAGS) $(LIBS) $(SOCKETLIBS) $(DBLIBS) $(MATHLIBS) $(OTHERLIBS)
+
+ ndomod:
+ $(MAKE) ndomod-2x.o
+ $(MAKE) ndomod-3x.o
+
+ ndomod-2x.o: ndomod.c $(COMMON_INC) $(COMMON_OBJS)
+- $(CC) $(MOD_CFLAGS) $(CFLAGS) -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c $(COMMON_OBJS) $(MOD_LDFLAGS) $(LDFLAGS) $(LIBS) $(SOCKETLIBS) $(OTHERLIBS)
++ $(CC) $(MOD_CFLAGS) $(CFLAGS) $(CPPFLAGS) -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c $(COMMON_OBJS) $(MOD_LDFLAGS) $(LDFLAGS) $(LIBS) $(SOCKETLIBS) $(OTHERLIBS)
+
+ ndomod-3x.o: ndomod.c $(COMMON_INC) $(COMMON_OBJS)
+- $(CC) $(MOD_CFLAGS) $(CFLAGS) -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c $(COMMON_OBJS) $(MOD_LDFLAGS) $(LDFLAGS) $(LIBS) $(SOCKETLIBS) $(OTHERLIBS)
++ $(CC) $(MOD_CFLAGS) $(CFLAGS) $(CPPFLAGS) -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c $(COMMON_OBJS) $(MOD_LDFLAGS) $(LDFLAGS) $(LIBS) $(SOCKETLIBS) $(OTHERLIBS)
+
+ sockdebug: sockdebug.c $(COMMON_INC) $(COMMON_OBJS)
+- $(CC) $(CFLAGS) -o $@ sockdebug.c $(COMMON_OBJS) $(LDFLAGS) $(LIBS) $(MATHLIBS) $(SOCKETLIBS) $(OTHERLIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ sockdebug.c $(COMMON_OBJS) $(LDFLAGS) $(LIBS) $(MATHLIBS) $(SOCKETLIBS) $(OTHERLIBS)
+
+ io.o: io.c $(SRC_INCLUDE)/io.h
+- $(CC) $(MOD_CFLAGS) $(CFLAGS) -c -o $@ io.c
++ $(CC) $(MOD_CFLAGS) $(CFLAGS) $(CPPFLAGS) -c -o $@ io.c
+
+ utils.o: utils.c $(SRC_INCLUDE)/utils.h
+- $(CC) $(MOD_CFLAGS) $(CFLAGS) -c -o $@ utils.c
++ $(CC) $(MOD_CFLAGS) $(CFLAGS) $(CPPFLAGS) -c -o $@ utils.c
+
+ db.o: db.c $(SRC_INCLUDE)/db.h
+- $(CC) $(CFLAGS) -c -o $@ db.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ db.c
+
+ dbhandlers-2x.o: dbhandlers.c $(SRC_INCLUDE)/dbhandlers.h
+- $(CC) $(CFLAGS) -D BUILD_NAGIOS_2X -c -o $@ dbhandlers.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -D BUILD_NAGIOS_2X -c -o $@ dbhandlers.c
+
+ dbhandlers-3x.o: dbhandlers.c $(SRC_INCLUDE)/dbhandlers.h
+- $(CC) $(CFLAGS) -D BUILD_NAGIOS_3X -c -o $@ dbhandlers.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -D BUILD_NAGIOS_3X -c -o $@ dbhandlers.c
+
+ clean:
+ rm -f core file2sock log2ndo ndo2db-2x ndo2db-3x sockdebug *.o
--- ndoutils-1.4b9.orig/debian/patches/00list
+++ ndoutils-1.4b9/debian/patches/00list
@@ -0,0 +1,2 @@
+01-pathnames
+02-makefiles
--- ndoutils-1.4b9.orig/debian/manpages/sockdebug.1
+++ ndoutils-1.4b9/debian/manpages/sockdebug.1
@@ -0,0 +1,11 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
+.TH SOCKDEBUG "1" "July 2007" "sockdebug" "User Commands"
+.SH NAME
+sockdebug \- Creates a UNIX domain socket prints all received data to STDOUT.
+.SH SYNOPSIS
+.B sockdebug
+\fI<socketname>\fR
+.SH DESCRIPTION
+Creates a UNIX domain socket with name <socketname>, waits for a
+client to connect and then prints all received data to stdout.
+Only one client connection is processed at any given time.
--- ndoutils-1.4b9.orig/debian/manpages/ndo2db-2x.1
+++ ndoutils-1.4b9/debian/manpages/ndo2db-2x.1
@@ -0,0 +1,13 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
+.TH NDO2DB "1" "July 2007" "ndo2db" "User Commands"
+.SH NAME
+ndo2db \- Stores Nagios event and configuration data to a database.
+.SH SYNOPSIS
+.B ndo2db
+\fI-c <config_file> \fR[\fI-i\fR]
+.SH DESCRIPTION
+Stores Nagios event and configuration data to a database for later retrieval
+and processing. Clients that are capable of sending data to the NDO2DB daemon
+include the LOG2NDO utility and NDOMOD event broker module.
+.PP
+\fB\-i\fR = Run under INETD/XINETD.
--- ndoutils-1.4b9.orig/debian/manpages/ndo2db-3x.1
+++ ndoutils-1.4b9/debian/manpages/ndo2db-3x.1
@@ -0,0 +1,13 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
+.TH NDO2DB "1" "July 2007" "ndo2db" "User Commands"
+.SH NAME
+ndo2db \- Stores Nagios event and configuration data to a database.
+.SH SYNOPSIS
+.B ndo2db
+\fI-c <config_file> \fR[\fI-i\fR]
+.SH DESCRIPTION
+Stores Nagios event and configuration data to a database for later retrieval
+and processing. Clients that are capable of sending data to the NDO2DB daemon
+include the LOG2NDO utility and NDOMOD event broker module.
+.PP
+\fB\-i\fR = Run under INETD/XINETD.
--- ndoutils-1.4b9.orig/debian/manpages/file2sock.1
+++ ndoutils-1.4b9/debian/manpages/file2sock.1
@@ -0,0 +1,21 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
+.TH FILE2SOCK "1" "July 2007" "file2sock" "User Commands"
+.SH NAME
+file2sock \- Sends the contents of a file to a TCP or UNIX domain socket.
+.SH SYNOPSIS
+.B file2sock
+\fI-s <source> -d <dest> \fR[\fI-t <type>\fR] [\fI-p <port>\fR]
+.SH DESCRIPTION
+Sends the contents of a file to a TCP or UNIX domain socket. The contents of
+the file are sent in their original format \- no conversion, encapsulation, or
+other processing is done before sending the contents to the destination socket.
+.PP
+<source> Name of the file to read from. Use '\-' to read from stdin.
+.PP
+<dest> If destination is a TCP socket, the address/hostname to connect to.
+ If destination is a Unix domain socket, the path to the socket.
+.PP
+<type> Specifies the type of destination socket.
+ Valid values include: tcp unix (default)
+.PP
+<port> Port number to connect to if destination is TCP socket.
--- ndoutils-1.4b9.orig/debian/manpages/log2ndo.1
+++ ndoutils-1.4b9/debian/manpages/log2ndo.1
@@ -0,0 +1,22 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
+.TH LOG2NDO "1" "July 2007" "log2ndo" "User Commands"
+.SH NAME
+log2ndo \- Sends the contents of an archived Nagios or NetSaint log file.
+.SH SYNOPSIS
+.B log2ndo
+\fI-s <source> -d <dest> -i <instance> \fR[\fI-t <type>\fR] [\fI-p <port>\fR]
+.SH DESCRIPTION
+Sends the contents of an archived Nagios or NetSaint log file to STDOUT,
+a TCP socket, or a Unix domain socket in a format that is understood by the
+NDO2DB daemon.
+.PP
+<source> Name of the Nagios/NetSaint log file to read from.
+.PP
+<dest> If destination is a TCP socket, the address/hostname to connect to.
+ If destination is a Unix domain socket, the path to the socket.
+ If destination is STDOUT (for redirection, etc), a single dash (\-).
+.PP
+<type> Specifies the type of destination socket.
+ Valid values include: tcp unix (default)
+.PP
+<port> Port number to connect to if destination is TCP socket.