check-mk (1.1.12p7-1) debian-dir only changes

Summary

 debian/README.Debian                    |   34 +++++++
 debian/README.source                    |    2 
 debian/apache.icinga                    |   41 ++++++++
 debian/apache.nagios3                   |   41 ++++++++
 debian/changelog                        |   66 +++++++++++++
 debian/check-mk-agent-logwatch.examples |    1 
 debian/check-mk-agent-logwatch.install  |    2 
 debian/check-mk-agent.dirs              |    6 +
 debian/check-mk-agent.install           |    1 
 debian/check-mk-agent.manpages          |    1 
 debian/check-mk-config-icinga.install   |    2 
 debian/check-mk-config-icinga.links     |    2 
 debian/check-mk-config-icinga.postinst  |   51 ++++++++++
 debian/check-mk-config-icinga.postrm    |   11 ++
 debian/check-mk-config-icinga.preinst   |   11 ++
 debian/check-mk-config-nagios3.install  |    2 
 debian/check-mk-config-nagios3.links    |    2 
 debian/check-mk-config-nagios3.postinst |   51 ++++++++++
 debian/check-mk-config-nagios3.postrm   |   10 ++
 debian/check-mk-config-nagios3.preinst  |   10 ++
 debian/check-mk-doc.install             |    1 
 debian/check-mk-livestatus.install      |    2 
 debian/check-mk-multisite.dirs          |    3 
 debian/check-mk-multisite.install       |    4 
 debian/check-mk-multisite.postinst      |   36 +++++++
 debian/check-mk-server.dirs             |    2 
 debian/check-mk-server.install          |   14 ++
 debian/check-mk-server.postinst         |   47 +++++++++
 debian/compat                           |    1 
 debian/control                          |  130 ++++++++++++++++++++++++++
 debian/copyright                        |   22 ++++
 debian/defaults.icinga                  |   50 ++++++++++
 debian/defaults.nagios3                 |   50 ++++++++++
 debian/patches/00list                   |    2 
 debian/patches/01_fix_livestatus.dpatch |   19 +++
 debian/patches/02_wato-sudoers.dpatch   |   44 +++++++++
 debian/rules                            |  155 ++++++++++++++++++++++++++++++++
 debian/source/format                    |    1 
 debian/waitmax.1                        |   24 ++++
 debian/watch                            |    2 
 40 files changed, 956 insertions(+)

    
download this patch

Patch contents

--- check-mk-1.1.12p7.orig/debian/check-mk-server.dirs
+++ check-mk-1.1.12p7/debian/check-mk-server.dirs
@@ -0,0 +1,2 @@
+etc/check_mk/conf.d
+var/lib/check_mk
--- check-mk-1.1.12p7.orig/debian/apache.icinga
+++ check-mk-1.1.12p7/debian/apache.icinga
@@ -0,0 +1,41 @@
+# Created by setup of check_mk version 1.1.6p1
+# This file will *not* be overwritten at the next setup
+# of check_mk. You may edit it as needed. In order to get
+# a new version, please delete it and re-run setup.sh.
+
+# Note for RedHat 5.3 users (and probably other version:
+# this file must be loaded *after* python.conf, otherwise
+# <IfModule mod_python.c> does not trigger! For that
+# reason, it is installed as zzz_.... Sorry for the
+# inconveniance.
+
+<IfModule mod_python.c>
+    Alias /check_mk /usr/share/check_mk/web/htdocs
+    <Directory /usr/share/check_mk/web/htdocs>
+        AddHandler mod_python .py
+        PythonHandler index
+        PythonDebug On 
+        DirectoryIndex index.py
+
+        # Need Nagios authentification. Please edit the
+        # following: Set AuthName and AuthUserFile to the
+        # same value that you use for your Nagios configuration!
+        Order deny,allow
+        allow from all
+        AuthName "Icinga Access"
+        AuthType Basic
+        AuthUserFile /etc/icinga/htpasswd.users
+        require valid-user
+
+        ErrorDocument 403 "<h1>Authentication Problem</h1>Either you've entered an invalid password or the authentication<br>configuration of your check_mk web pages is incorrect.<br><br>Please make sure that you've edited the file<br><tt>/etc/apache2/conf.d/check_mk</tt> and made it use the same<br>authentication settings as your Nagios web pages.<br>Restart Apache afterwards."
+        ErrorDocument 500 "<h1>Server or Configuration Problem</h1>A Server problem occurred. You'll find details in the error log of Apache. One possible reason is, that the file <tt>/etc/nagios/htpasswd.users</tt> is missing. You can create that file with <tt>htpasswd</tt> or <tt>htpasswd2</tt>. A better solution might be to use your existing htpasswd file from your Nagios installation. Please edit <tt>/etc/apache2/conf.d/check_mk</tt> and change the path there. Restart Apache afterwards."
+      </Directory>
+</IfModule>
+
+<IfModule !mod_python.c>
+    Alias /check_mk /usr/share/check_mk/web/htdocs
+    <Directory /usr/share/check_mk/web/htdocs>
+        Deny from all
+        ErrorDocument 403 "<h1>Check_mk: Incomplete Apache2 Installation</h1>You need mod_python in order to run the web interface of check_mk.<br> Please install mod_python and restart Apache."
+    </Directory>
+</IfModule>
--- check-mk-1.1.12p7.orig/debian/check-mk-config-icinga.links
+++ check-mk-1.1.12p7/debian/check-mk-config-icinga.links
@@ -0,0 +1,2 @@
+usr/share/check_mk/modules/defaults    usr/share/check_mk/web/htdocs/defaults.py
+
--- check-mk-1.1.12p7.orig/debian/watch
+++ check-mk-1.1.12p7/debian/watch
@@ -0,0 +1,2 @@
+version=2
+http://mathias-kettner.de/download/check_mk-([p\d\.]*)\.tar\.gz
--- check-mk-1.1.12p7.orig/debian/check-mk-agent.dirs
+++ check-mk-1.1.12p7/debian/check-mk-agent.dirs
@@ -0,0 +1,6 @@
+usr/bin
+etc/xinetd.d
+usr/lib
+usr/lib/check_mk_agent/plugins
+usr/lib/check_mk_agent/local
+usr/share/doc/check-mk-agent/examples
--- check-mk-1.1.12p7.orig/debian/check-mk-agent-logwatch.install
+++ check-mk-1.1.12p7/debian/check-mk-agent-logwatch.install
@@ -0,0 +1,2 @@
+usr/share/check_mk/agents/plugins/mk_logwatch usr/lib/check_mk_agent/plugins
+usr/share/check_mk/agents/logwatch.cfg etc/check_mk
--- check-mk-1.1.12p7.orig/debian/copyright
+++ check-mk-1.1.12p7/debian/copyright
@@ -0,0 +1,22 @@
+This package was debianized by Alexander Wirt <formorer@debian.org>
+and Sven Velt <sven@velt.de>.  
+
+It was downloaded from http://mathias-kettner.de/check_mk_download.html
+
+Current Debian Maintainers: The nagios packaging packaging team 
+			    http://alioth.debian.org/projects/pkg-nagios/
+
+Mailing-List: 	pkg-nagios-devel@lists.alioth.debian.org
+
+Upstream Author:  Mathias Kettner <mk@mathias-kettner.de>
+
+Copyright (c) 2009-2010 Mathias Kettner <mk@mathias-kettner.de>
+
+License:
+ 
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 2 as
+published by the Free Software Foundation.
+
+On Debian systems, the complete text of the GNU General Public
+License, version 2, can be found in /usr/share/common-licenses/GPL-2.
--- check-mk-1.1.12p7.orig/debian/waitmax.1
+++ check-mk-1.1.12p7/debian/waitmax.1
@@ -0,0 +1,24 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.39.4.
+.TH WAITMAX "1" "May 2011" "waitmax version 1.1" "User Commands"
+.SH NAME
+waitmax \- manual page for waitmax version 1.1
+.SH SYNOPSIS
+.B waitmax
+[\fI-s SIGNUM\fR] \fIMAXTIME PROGRAM \fR[\fIARGS\fR...]
+.SH DESCRIPTION
+Execute PROGRAM as a subprocess. If PROGRAM does not exit before MAXTIME
+seconds, it will be killed with SIGTERM or an alternative signal.
+.TP
+\fB\-s\fR, \fB\-\-signal\fR SIGNUM
+kill with SIGNUM on timeout
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+this help
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+show version an exit
+.SH COPYRIGHT
+Copyright Mathias Kettner 2008
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--- check-mk-1.1.12p7.orig/debian/check-mk-config-icinga.postrm
+++ check-mk-1.1.12p7/debian/check-mk-config-icinga.postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile \
+    /etc/icinga/objects/check_mk_templates.cfg \
+    /etc/icinga/objects/check_mk/check_mk_templates.cfg \
+    1.1.10-2 -- "$@"
+
+#DEBHELPER#
+
--- check-mk-1.1.12p7.orig/debian/check-mk-config-nagios3.preinst
+++ check-mk-1.1.12p7/debian/check-mk-config-nagios3.preinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile \
+    /etc/nagios3/conf.d/check_mk_templates.cfg \
+    /etc/nagios3/conf.d/check_mk/check_mk_templates.cfg \
+    1.1.10-2 -- "$@"
+
+#DEBHELPER#
--- check-mk-1.1.12p7.orig/debian/changelog
+++ check-mk-1.1.12p7/debian/changelog
@@ -0,0 +1,66 @@
+check-mk (1.1.12p7-1) unstable; urgency=low
+
+  * [b088706] Add Recommends for snmp to server part
+  * [1708000] Imported Upstream version 1.1.12p7
+  * [256e383] Recommends ethtool and smartmontools in check-mk-agent
+    (Closes: #649677)
+  * [5a4c4cc] Move manpages to -server and don't compress docs (Closes: #649676)
+  * [2f52423] Create /etc/check_mk/conf.d in multisite package (Closes: #649316)
+  * [c536571] Bump version for default files
+  * [688edf4] Fix usage of dpkg-maintscript-helper.
+    Thanks to Colin Watson for the patch (Closes: #659548)
+  * [98ce919] Call dh_* with -a or -i (Closes: #649162)
+  * [1107727] Add missing dh_ calls to binary-indep
+  * [b2f781c] Add missing -nagios3 preinst
+
+ -- Alexander Wirt <formorer@debian.org>  Thu, 05 Apr 2012 19:36:02 +0200
+
+check-mk (1.1.12-1) unstable; urgency=low
+
+  [ Bernd Zeimetz ]
+  * [791a318] Install necessary sudo permissions for WATO.
+  * [cb1f3c7] Fix lintian W: check-mk source:
+              brace-expansion-in-debhelper-config-file
+  * [b5562b4] Install /var/lib/check_mk/wato as required by wato.
+  * [571007f] /var/lib/check_mk/autochecks/ should be owned by nagios, too.
+  * [d6e7572] /var/lib/check_mk/precompiled should be owned by nagios:nagios.
+  * [5456d5c] Move check_mk nagios/icinga config files into check_mk subfolder.
+  * [bd0ea1d] Add a check-mk-doc package and configure defaults accordingly.
+
+  [ Alexander Wirt ]
+  * [559e8b7] Migrate configuration files to /etc/icinga/objects/check_mk
+  * [d5bad65] Fix typo in control file
+  * [11edf6f] Migrate check-mk objects for nagios
+  * [a6b822f] Add missing debhelper tokens
+  * [fd14d37] Add missing set -e
+  * [28a25ee] config postinst should depend on adduser
+  * [6b67884] Fix permissions for wato dirs
+  * [ba084b0] Also include versions like 1.10p2
+  * [6f0a194] Imported Upstream version 1.1.10p3
+  * [869f2a0] Install logwatch.cfg to examples (Closes: #639255)
+  * [cdfef39] Make check-mk web dir sgid nagios
+  * [3b7f02e] Imported Upstream version 1.1.12
+
+ -- Alexander Wirt <formorer@debian.org>  Fri, 11 Nov 2011 23:52:28 +0100
+
+check-mk (1.1.10-2) unstable; urgency=low
+
+  [ Christoph Berg ]
+  * [1163b0d] Add Vcs-* fields
+
+  [ Alexander Wirt ]
+  * [84fc3f7] Fix installation path for objects and templates in
+    *nagios3* package.
+    Thanks to Richard James Salts for the patch (Closes: #634016)
+  * [7c1720c] Bump standards version (no changes)
+  * [66132ef] Add missing build targets to rules file
+  * [96b686b] Add README.source file
+  * [15fa444] Add README.Debian to all binary packages
+
+ -- Alexander Wirt <formorer@debian.org>  Thu, 11 Aug 2011 07:56:01 +0200
+
+check-mk (1.1.10-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 30 May 2011 21:48:51 +0200
--- check-mk-1.1.12p7.orig/debian/defaults.icinga
+++ check-mk-1.1.12p7/debian/defaults.icinga
@@ -0,0 +1,50 @@
+# This file has been created during setup of check_mk at Sun Oct 17 17:18:15 CEST 2010.
+# Do not edit this file. Also do not try to override these settings
+# in main.mk since some of them are hardcoded into several files
+# during setup. 
+#
+# If you need to change these settings, you have to re-run setup.sh
+# and enter new values when asked, or edit ~/.check_mk_setup.conf and
+# run ./setup.sh --yes.
+
+check_mk_version            = '1.1.12p7'
+default_config_dir          = '/etc/check_mk'
+check_mk_configdir          = '/etc/check_mk/conf.d'
+checks_dir                  = '/usr/share/check_mk/checks'
+check_manpages_dir          = '/usr/share/check_mk/checks-man'
+modules_dir                 = '/usr/share/check_mk/modules'
+locale_dir                  = '/usr/share/check_mk/locale'
+agents_dir                  = '/usr/share/check_mk/agents'
+var_dir                     = '/var/lib/check_mk'
+lib_dir                     = '/usr/lib/check_mk'
+snmpwalks_dir               = '/var/lib/check_mk/snmpwalks'
+autochecksdir               = '/var/lib/check_mk/autochecks'
+precompiled_hostchecks_dir  = '/var/lib/check_mk/precompiled'
+counters_directory          = '/var/lib/check_mk/counters'
+tcp_cache_dir               = '/var/lib/check_mk/cache'
+logwatch_dir                = '/var/lib/check_mk/logwatch'
+nagios_objects_file         = '/etc/icinga/objects/check_mk/check_mk_objects.cfg'
+nagios_command_pipe_path    = '/var/lib/icinga/rw/icinga.cmd'
+nagios_status_file          = '/var/lib/icinga/status.dat'
+nagios_conf_dir             = '/etc/icinga/objects/check_mk'
+nagios_user                 = 'nagios'
+nagios_url                  = '/icinga'
+nagios_cgi_url              = '/cgi-bin/icinga'
+logwatch_notes_url          = '/check_mk/logwatch.py?host=%s&file=%s'
+www_group                   = 'nagios'
+nagios_config_file          = '/etc/icinga/icinga.cfg'
+nagios_startscript          = '/etc/init.d/icinga'
+nagios_binary               = '/usr/sbin/icinga'
+apache_config_dir           = '/etc/apache2/conf.d'
+htpasswd_file               = '/etc/icinga/htpasswd.users'
+nagios_auth_name            = 'Nagios Access'
+web_dir                     = '/usr/share/check_mk/web'
+checkmk_web_uri             = '/check_mk'
+livestatus_unix_socket      = '/var/lib/icinga/rw/live'
+livebackendsdir             = '/usr/share/check_mk/livestatus'
+url_prefix                  = '/'
+pnp_url                     = '/pnp4nagios/'
+pnp_templates_dir           = '/usr/share/check_mk/pnp-templates'
+pnp_rraconf_dir             = '/usr/share/check_mk/pnp-rraconf'
+doc_dir                     = '/usr/share/doc/check-mk-doc'
+check_mk_automation         = 'sudo -u nagios /usr/bin/check_mk --automation'
--- check-mk-1.1.12p7.orig/debian/defaults.nagios3
+++ check-mk-1.1.12p7/debian/defaults.nagios3
@@ -0,0 +1,50 @@
+# This file has been created during setup of check_mk at Sun Oct 17 17:18:15 CEST 2010.
+# Do not edit this file. Also do not try to override these settings
+# in main.mk since some of them are hardcoded into several files
+# during setup. 
+#
+# If you need to change these settings, you have to re-run setup.sh
+# and enter new values when asked, or edit ~/.check_mk_setup.conf and
+# run ./setup.sh --yes.
+
+check_mk_version            = '1.1.12p7'
+default_config_dir          = '/etc/check_mk'
+check_mk_configdir          = '/etc/check_mk/conf.d'
+checks_dir                  = '/usr/share/check_mk/checks'
+check_manpages_dir          = '/usr/share/check_mk/checks-man'
+modules_dir                 = '/usr/share/check_mk/modules'
+locale_dir                  = '/usr/share/check_mk/locale'
+agents_dir                  = '/usr/share/check_mk/agents'
+var_dir                     = '/var/lib/check_mk'
+lib_dir                     = '/usr/lib/check_mk'
+snmpwalks_dir               = '/var/lib/check_mk/snmpwalks'
+autochecksdir               = '/var/lib/check_mk/autochecks'
+precompiled_hostchecks_dir  = '/var/lib/check_mk/precompiled'
+counters_directory          = '/var/lib/check_mk/counters'
+tcp_cache_dir               = '/var/lib/check_mk/cache'
+logwatch_dir                = '/var/lib/check_mk/logwatch'
+nagios_objects_file         = '/etc/nagios3/conf.d/check_mk/check_mk_objects.cfg'
+nagios_command_pipe_path    = '/var/lib/nagios3/rw/nagios.cmd'
+nagios_status_file          = '/var/cache/nagios3/status.dat'
+nagios_conf_dir             = '/etc/nagios3/conf.d'
+nagios_user                 = 'nagios'
+nagios_url                  = '/nagios3'
+nagios_cgi_url              = '/cgi-bin/nagios3'
+logwatch_notes_url          = '/check_mk/logwatch.py?host=%s&file=%s'
+www_group                   = 'nagios'
+nagios_config_file          = '/etc/nagios3/nagios.cfg'
+nagios_startscript          = '/etc/init.d/nagios3'
+nagios_binary               = '/usr/sbin/nagios3'
+apache_config_dir           = '/etc/apache2/conf.d'
+htpasswd_file               = '/etc/nagios3/htpasswd.users'
+nagios_auth_name            = 'Nagios Access'
+web_dir                     = '/usr/share/check_mk/web'
+checkmk_web_uri             = '/check_mk'
+livestatus_unix_socket      = '/var/lib/nagios3/rw/live'
+livebackendsdir             = '/usr/share/check_mk/livestatus'
+url_prefix                  = '/'
+pnp_url                     = '/pnp4nagios/'
+pnp_templates_dir           = '/usr/share/check_mk/pnp-templates'
+pnp_rraconf_dir             = '/usr/share/check_mk/pnp-rraconf'
+doc_dir                     = '/usr/share/doc/check-mk-doc'
+check_mk_automation         = 'sudo -u nagios /usr/bin/check_mk --automation'
--- check-mk-1.1.12p7.orig/debian/check-mk-livestatus.install
+++ check-mk-1.1.12p7/debian/check-mk-livestatus.install
@@ -0,0 +1,2 @@
+usr/lib/check_mk/livestatus.o
+usr/bin/unixcat
--- check-mk-1.1.12p7.orig/debian/check-mk-config-icinga.install
+++ check-mk-1.1.12p7/debian/check-mk-config-icinga.install
@@ -0,0 +1,2 @@
+usr/share/doc/check_mk/check_mk_templates.cfg etc/icinga/objects/check_mk
+etc/check_mk/multisite.mk
--- check-mk-1.1.12p7.orig/debian/check-mk-config-nagios3.links
+++ check-mk-1.1.12p7/debian/check-mk-config-nagios3.links
@@ -0,0 +1,2 @@
+usr/share/check_mk/modules/defaults    usr/share/check_mk/web/htdocs/defaults.py
+
--- check-mk-1.1.12p7.orig/debian/check-mk-config-nagios3.install
+++ check-mk-1.1.12p7/debian/check-mk-config-nagios3.install
@@ -0,0 +1,2 @@
+usr/share/doc/check_mk/check_mk_templates.cfg etc/nagios3/conf.d/check_mk
+etc/check_mk/multisite.mk
--- check-mk-1.1.12p7.orig/debian/rules
+++ check-mk-1.1.12p7/debian/rules
@@ -0,0 +1,155 @@
+#!/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.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	mkdir agents
+	tar -xzf agents.tar.gz -C agents
+	mkdir docs
+	tar -xzf doc.tar.gz -C docs
+	mkdir config
+	tar -xzf conf.tar.gz -C config
+
+	touch configure-stamp
+
+
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+
+build-stamp: patch-stamp configure-stamp
+	dh_testdir
+
+	# Add here commands to compile the package.
+	#cd agents ; $(MAKE)
+	#docbook-to-man debian/check-mk.sgml > check-mk.1
+
+	touch $@
+
+clean: clean-patched unpatch
+clean-patched:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	rm -rf agents docs config livestatus.src livestatus.log
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	mkdir -p debian/tmp
+	DESTDIR=debian/tmp ./setup.sh --yes
+	#don't use the statically linked binary.
+	rm debian/tmp/usr/share/check_mk/agents/waitmax
+	gcc -s -o debian/tmp/usr/share/check_mk/agents/waitmax debian/tmp/usr/share/check_mk/agents/waitmax.c
+	cp -a livestatus.src/debian/tmp/* debian/tmp/
+	# We need 2 different "defaults" files for Icinga and Nagios3
+	rm debian/tmp/usr/share/check_mk/modules/defaults
+	rm debian/tmp/usr/share/check_mk/web/htdocs/defaults.py
+	mkdir -p debian/check-mk-config-icinga/usr/share/check_mk/modules/
+	cp debian/defaults.icinga debian/check-mk-config-icinga/usr/share/check_mk/modules/defaults
+	mkdir -p debian/check-mk-config-nagios3/usr/share/check_mk/modules/
+	cp debian/defaults.nagios3 debian/check-mk-config-nagios3/usr/share/check_mk/modules/defaults
+	# We need 2 different Apache configs
+	mkdir -p debian/check-mk-config-icinga/etc/apache2/conf.d/
+	cp debian/apache.icinga debian/check-mk-config-icinga/etc/apache2/conf.d/check-mk-multisite.conf
+	mkdir -p debian/check-mk-config-nagios3/etc/apache2/conf.d/
+	cp debian/apache.nagios3 debian/check-mk-config-nagios3/etc/apache2/conf.d/check-mk-multisite.conf
+	# Adjust path names
+	# sed -i 's#/nagios/cgi-bin/#/cgi-bin/icinga/#' debian/tmp/check-mk-config-icinga/etc/icinga/objects/check_mk_templates.cfg
+	# sed -i 's#/nagios/cgi-bin/#/cgi-bin/nagios3/#' debian/tmp/check-mk-config-nagios3/etc/nagios3/conf.d/check_mk_templates.cfg
+	# Prepare agent files
+	cp debian/tmp/usr/share/check_mk/agents/check_mk_agent.linux debian/check-mk-agent/usr/bin/check_mk_agent
+	chmod +x debian/check-mk-agent/usr/bin/check_mk_agent
+	cp debian/tmp/usr/share/check_mk/agents/xinetd.conf debian/check-mk-agent/etc/xinetd.d/check_mk
+	# xinetd: Disable service
+	sed -i 's#disable\s*=\s*no#disable        = yes#' debian/check-mk-agent/etc/xinetd.d/check_mk
+	# move checks manpages (to be installed in -server)
+	mv debian/tmp/usr/share/doc/check_mk/checks debian/tmp/usr/share/check_mk/checks-man
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i
+	dh_install -i
+	dh_installdocs -i debian/README.Debian
+	dh_installchangelogs -i ChangeLog
+	dh_installexamples -i
+	dh_install -i
+	dh_installman -i
+	dh_link -i
+	dh_strip -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_shlibdeps -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+	dh_installchangelogs -a ChangeLog
+	dh_installdocs -a debian/README.Debian
+	dh_installexamples -a
+	dh_install -a
+	chmod +x debian/check-mk-server/usr/share/check_mk/checks/*
+	sed -i -e 's/nagiosadmin/icingaadmin/g' debian/check-mk-config-icinga/etc/check_mk/multisite.mk
+#	dh_installmenu
+#	dh_installdebconf
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman -a
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+#	dh_perl
+#	dh_makeshlibs
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+patch: patch-stamp
+patch-stamp:
+	@echo "Doing $@"
+	dpatch  --with-cpp apply-all
+	dpatch  --with-cpp cat-all >patch-stamp
+
+unpatch:
+	@echo "Doing $@"
+	dpatch --with-cpp deapply-all
+	rm -rf patch-stamp debian/patched
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- check-mk-1.1.12p7.orig/debian/control
+++ check-mk-1.1.12p7/debian/control
@@ -0,0 +1,130 @@
+Source: check-mk
+Section: admin
+Priority: optional
+Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
+Uploaders: Alexander Wirt <formorer@debian.org>, Jan Wagner <waja@cyconet.org>, Sven Velt <sven@velt.de>
+Build-Depends: debhelper (>= 7), dpatch
+Standards-Version: 3.9.2
+Vcs-Git: git://anonscm.debian.org/pkg-nagios/pkg-check-mk.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-nagios/pkg-check-mk.git
+
+Package: check-mk-agent
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: xinetd, python
+Recommends: ethtool, smartmontools
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the agent part of check-mk.
+
+Package: check-mk-agent-logwatch
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, check-mk-agent
+Suggests: xinetd, python
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the logwatch plugin for the agent.
+
+
+Package: check-mk-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, python, check-mk-config-nagios3 | check-mk-config-icinga
+Recommends: check-mk-doc, snmp
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the server part of check_mk
+
+Package: check-mk-config-icinga
+Conflicts: check-mk-config-nagios3
+Architecture: any
+Pre-Depends: dpkg (>= 1.15.7.2~)
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the icinga specific part of check_mk
+
+Package: check-mk-config-nagios3
+Architecture: any
+Pre-Depends: dpkg (>= 1.15.7.2~)
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Conflicts: check-mk-config-icinga
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the nagios 3 specific part of check_mk
+
+Package: check-mk-livestatus
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: xinetd
+Conflicts: ucspi-unix
+Recommends: check-mk-doc
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains livestatus
+
+Package: check-mk-multisite
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libapache2-mod-python, check-mk-config-nagios3 | check-mk-config-icinga
+Recommends: sudo, check-mk-doc
+Suggests: check-mk-livestatus
+Description: general purpose nagios-plugin for retrieving data
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the webfrontend of check_mk also known as
+ "MK-Multisite"
+
+Package: check-mk-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Suggests: check-mk-livestatus, check-mk-server, check-mk-multisite
+Description: general purpose nagios-plugin for retrieving data (documentation)
+ Check_mk adopts a new a approach for collecting data from operating systems
+ and network components. It obsoletes NRPE, check_by_ssh, NSClient and
+ check_snmp. It has many benefits, the most important of which are:
+ .
+  * Significant reduction of CPU usage on the Nagios host.
+  * Automatic inventory of items to be checked on hosts.
+ .
+ This package contains the check_mk documentation.
--- check-mk-1.1.12p7.orig/debian/check-mk-doc.install
+++ check-mk-1.1.12p7/debian/check-mk-doc.install
@@ -0,0 +1 @@
+usr/share/doc/check_mk/* usr/share/doc/check-mk-doc
--- check-mk-1.1.12p7.orig/debian/README.Debian
+++ check-mk-1.1.12p7/debian/README.Debian
@@ -0,0 +1,34 @@
+check-mk-livestatus
+===================
+
+To load the event broker add the following lines to your Nagios/Icinga
+configuration:
+
+Nagios3:
+broker_module=/usr/lib/check_mk/livestatus.o /var/lib/nagios3/rw/live
+
+Icinga:
+broker_module=/usr/lib/check_mk/livestatus.o /var/lib/icinga/rw/live
+
+See http://mathias-kettner.de/checkmk_livestatus.html for more configuration
+options.
+
+
+logwatch
+========
+
+To install logwatch copy logwatch.cfg from
+/usr/share/doc/check-mk-agent/examples to /etc/check_mk/ on your client.
+See http://mathias-kettner.de/checkmk_logfiles.html for more information.
+
+On the server side you need multisite enabled to see the logs. If you also want
+to acknowledge the alarms (recommended) put www-data into the nagios group
+
+
+check-mk-config-nagios3 and check-mk-config-icinga
+==================================================
+
+Check-MK's web frontend "Multisite" (package "check-mk-multisite") and the
+server part of Check-MK ("check-mk-server") can only be used with either
+Nagios3 or Icinga. Please install the adequate "check-mk-config-*" package.
+
--- check-mk-1.1.12p7.orig/debian/apache.nagios3
+++ check-mk-1.1.12p7/debian/apache.nagios3
@@ -0,0 +1,41 @@
+# Created by setup of check_mk version 1.1.6p1
+# This file will *not* be overwritten at the next setup
+# of check_mk. You may edit it as needed. In order to get
+# a new version, please delete it and re-run setup.sh.
+
+# Note for RedHat 5.3 users (and probably other version:
+# this file must be loaded *after* python.conf, otherwise
+# <IfModule mod_python.c> does not trigger! For that
+# reason, it is installed as zzz_.... Sorry for the
+# inconveniance.
+
+<IfModule mod_python.c>
+    Alias /check_mk /usr/share/check_mk/web/htdocs
+    <Directory /usr/share/check_mk/web/htdocs>
+        AddHandler mod_python .py
+        PythonHandler index
+        PythonDebug On 
+        DirectoryIndex index.py
+
+        # Need Nagios authentification. Please edit the
+        # following: Set AuthName and AuthUserFile to the
+        # same value that you use for your Nagios configuration!
+        Order deny,allow
+        allow from all
+        AuthName "Nagios Access"
+        AuthType Basic
+        AuthUserFile /etc/nagios3/htpasswd.users
+        require valid-user
+
+        ErrorDocument 403 "<h1>Authentication Problem</h1>Either you've entered an invalid password or the authentication<br>configuration of your check_mk web pages is incorrect.<br><br>Please make sure that you've edited the file<br><tt>/etc/apache2/conf.d/check_mk</tt> and made it use the same<br>authentication settings as your Nagios web pages.<br>Restart Apache afterwards."
+        ErrorDocument 500 "<h1>Server or Configuration Problem</h1>A Server problem occurred. You'll find details in the error log of Apache. One possible reason is, that the file <tt>/etc/nagios/htpasswd.users</tt> is missing. You can create that file with <tt>htpasswd</tt> or <tt>htpasswd2</tt>. A better solution might be to use your existing htpasswd file from your Nagios installation. Please edit <tt>/etc/apache2/conf.d/check_mk</tt> and change the path there. Restart Apache afterwards."
+    </Directory>
+</IfModule>
+
+<IfModule !mod_python.c>
+    Alias /check_mk /usr/share/check_mk/web/htdocs
+    <Directory /usr/share/check_mk/web/htdocs>
+        Deny from all
+        ErrorDocument 403 "<h1>Check_mk: Incomplete Apache2 Installation</h1>You need mod_python in order to run the web interface of check_mk.<br> Please install mod_python and restart Apache."
+    </Directory>
+</IfModule>
--- check-mk-1.1.12p7.orig/debian/check-mk-config-icinga.postinst
+++ check-mk-1.1.12p7/debian/check-mk-config-icinga.postinst
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+set -e
+
+# a little helper for getting permissions right
+setperm() {
+    local user="$1"
+    local group="$2"
+    local mode="$3"
+    local file="$4"
+    shift 4
+    # only do something when no setting exists
+    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
+      chown "$user":"$group" "$file"
+      chmod "$mode" "$file"
+    fi
+}
+
+dpkg-maintscript-helper mv_conffile \
+    /etc/icinga/objects/check_mk_templates.cfg \
+    /etc/icinga/objects/check_mk/check_mk_templates.cfg \
+    1.1.10-2 -- "$@"
+
+if [ -e '/etc/icinga/objects/check_mk_objects.cfg' ];
+then
+    echo 'Migrate /etc/icinga/objects/check_mk_objects.cfg to /etc/icinga/objects/check_mk/check_mk_objects.cfg'
+    mv /etc/icinga/objects/check_mk_objects.cfg \
+    /etc/icinga/objects/check_mk/check_mk_objects.cfg
+fi
+
+case "$1" in
+	  configure)
+		#make sure our nagios user exists  
+		if ! getent passwd nagios > /dev/null ; then
+			echo 'Adding system-user for nagios' 1>&2
+			adduser --system --group --home /var/lib/nagios \
+			  --disabled-login --force-badname nagios > /dev/null
+		fi
+		#fix permissions for some directorys
+		test -d /etc/icinga/objects/check_mk || mkdir -p /etc/icinga/objects/check_mk
+		setperm root nagios 0775 /etc/icinga/objects/check_mk
+    ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+  *)
+    echo "postinst called with unknown argument \$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
--- check-mk-1.1.12p7.orig/debian/compat
+++ check-mk-1.1.12p7/debian/compat
@@ -0,0 +1 @@
+7
--- check-mk-1.1.12p7.orig/debian/check-mk-server.postinst
+++ check-mk-1.1.12p7/debian/check-mk-server.postinst
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+set -e
+
+# a little helper for getting permissions right
+setperm() {
+    local user="$1"
+    local group="$2"
+    local mode="$3"
+    local file="$4"
+    shift 4
+    # only do something when no setting exists
+    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
+      chown "$user":"$group" "$file"
+      chmod "$mode" "$file"
+    fi
+}
+
+case "$1" in
+	  configure)
+		#make sure our nagios user exists  
+		if ! getent passwd nagios > /dev/null ; then
+			echo 'Adding system-user for nagios' 1>&2
+			adduser --system --group --home /var/lib/nagios \
+			  --disabled-login --force-badname nagios > /dev/null
+		fi
+		#fix permissions for some directorys
+		test -d /var/lib/check_mk/cache || mkdir -p /var/lib/check_mk/cache
+		setperm nagios nagios 0750 /var/lib/check_mk/cache
+		test -d /var/lib/check_mk/autochecks || mkdir -p /var/lib/check_mk/autochecks
+		setperm nagios nagios 0750 /var/lib/check_mk/autochecks
+		test -d /var/lib/check_mk/precompiled || mkdir -p /var/lib/check_mk/precompiled
+		setperm nagios nagios 0750 /var/lib/check_mk/precompiled
+		test -d /var/lib/check_mk/counters/ || mkdir -p /var/lib/check_mk/counters/
+		setperm nagios nagios 0750 /var/lib/check_mk/counters/
+		test -d /var/lib/check_mk/logwatch/ || mkdir -p /var/lib/check_mk/logwatch/
+		setperm nagios www-data 0770 /var/lib/check_mk/logwatch/
+    ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+  *)
+    echo "postinst called with unknown argument \$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
--- check-mk-1.1.12p7.orig/debian/check-mk-agent-logwatch.examples
+++ check-mk-1.1.12p7/debian/check-mk-agent-logwatch.examples
@@ -0,0 +1 @@
+debian/tmp/usr/share/check_mk/agents/logwatch.cfg
--- check-mk-1.1.12p7.orig/debian/check-mk-config-nagios3.postinst
+++ check-mk-1.1.12p7/debian/check-mk-config-nagios3.postinst
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+set -e
+
+# a little helper for getting permissions right
+setperm() {
+    local user="$1"
+    local group="$2"
+    local mode="$3"
+    local file="$4"
+    shift 4
+    # only do something when no setting exists
+    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
+      chown "$user":"$group" "$file"
+      chmod "$mode" "$file"
+    fi
+}
+
+dpkg-maintscript-helper mv_conffile \
+    /etc/nagios3/conf.d/check_mk_templates.cfg \
+    /etc/nagios3/conf.d/check_mk/check_mk_templates.cfg \
+    1.1.10-2 -- "$@"
+
+if [ -e '/etc/nagios3/conf.d/check_mk_objects.cfg' ];
+then
+    echo 'Migrate /etc/nagios3/conf.d/check_mk_objects.cfg to /etc/nagios3/conf.d/objects/check_mk/check_mk_objects.cfg'
+    mv /etc/nagios3/conf.d/check_mk_objects.cfg \
+    /etc/nagios3/conf.d/check_mk/check_mk_objects.cfg
+fi
+
+case "$1" in
+	  configure)
+		#make sure our nagios user exists  
+		if ! getent passwd nagios > /dev/null ; then
+			echo 'Adding system-user for nagios' 1>&2
+			adduser --system --group --home /var/lib/nagios \
+			  --disabled-login --force-badname nagios > /dev/null
+		fi
+		#fix permissions for some directorys
+		test -d /etc/nagios3/conf.d/check_mk || mkdir -p /etc/nagios3/conf.d/check_mk
+		setperm root nagios 0775 /etc/nagios3/conf.d/check_mk
+    ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+  *)
+    echo "postinst called with unknown argument \$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
--- check-mk-1.1.12p7.orig/debian/check-mk-multisite.postinst
+++ check-mk-1.1.12p7/debian/check-mk-multisite.postinst
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+setperm() {
+    local user="$1"
+    local group="$2"
+    local mode="$3"
+    local file="$4"
+    shift 4
+    # only do something when no setting exists
+    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
+        chown "$user":"$group" "$file"
+        chmod "$mode" "$file"
+    fi
+}
+
+case "$1" in
+    configure)
+        # explicitly set permissions on some files
+        setperm www-data nagios 4770 /var/lib/check_mk/web
+        setperm www-data nagios 4770 /var/lib/check_mk/wato
+        setperm www-data nagios 4770 /etc/check_mk/conf.d
+    ;;
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+    *)
+        echo "postinst called with unknown argument \$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
--- check-mk-1.1.12p7.orig/debian/check-mk-config-nagios3.postrm
+++ check-mk-1.1.12p7/debian/check-mk-config-nagios3.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile \
+    /etc/nagios3/conf.d/check_mk_templates.cfg \
+    /etc/nagios3/conf.d/check_mk/check_mk_templates.cfg \
+    1.1.10-2 -- "$@"
+
+#DEBHELPER#
--- check-mk-1.1.12p7.orig/debian/check-mk-server.install
+++ check-mk-1.1.12p7/debian/check-mk-server.install
@@ -0,0 +1,14 @@
+etc/check_mk/main.mk
+etc/check_mk/conf.d/README
+var/lib/check_mk/autochecks
+var/lib/check_mk/cache
+var/lib/check_mk/counters
+var/lib/check_mk/logwatch
+var/lib/check_mk/packages
+var/lib/check_mk/precompiled
+usr/bin/check_mk
+usr/share/check_mk/checks
+usr/share/check_mk/checks-man
+usr/share/check_mk/modules
+usr/share/check_mk/pnp-rraconf
+usr/share/check_mk/pnp-templates
--- check-mk-1.1.12p7.orig/debian/check-mk-agent.install
+++ check-mk-1.1.12p7/debian/check-mk-agent.install
@@ -0,0 +1 @@
+usr/share/check_mk/agents/waitmax usr/bin
--- check-mk-1.1.12p7.orig/debian/check-mk-multisite.install
+++ check-mk-1.1.12p7/debian/check-mk-multisite.install
@@ -0,0 +1,4 @@
+usr/share/check_mk/web
+var/lib/check_mk/web
+var/lib/check_mk/wato
+etc/sudoers.d/check_mk_wato
--- check-mk-1.1.12p7.orig/debian/check-mk-config-icinga.preinst
+++ check-mk-1.1.12p7/debian/check-mk-config-icinga.preinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile \
+    /etc/icinga/objects/check_mk_templates.cfg \
+    /etc/icinga/objects/check_mk/check_mk_templates.cfg \
+    1.1.10-2 -- "$@"
+
+#DEBHELPER#
+
--- check-mk-1.1.12p7.orig/debian/README.source
+++ check-mk-1.1.12p7/debian/README.source
@@ -0,0 +1,2 @@
+We use dpatch for patch handling inside our nagios related packages.  Please see
+/usr/share/doc/dpatch/README.source.gz (if you have installed dpatch) for documentation about dpatch.
--- check-mk-1.1.12p7.orig/debian/check-mk-agent.manpages
+++ check-mk-1.1.12p7/debian/check-mk-agent.manpages
@@ -0,0 +1 @@
+debian/waitmax.1
--- check-mk-1.1.12p7.orig/debian/check-mk-multisite.dirs
+++ check-mk-1.1.12p7/debian/check-mk-multisite.dirs
@@ -0,0 +1,3 @@
+etc/check_mk
+var/lib/check_mk/
+etc/check_mk/conf.d
--- check-mk-1.1.12p7.orig/debian/patches/01_fix_livestatus.dpatch
+++ check-mk-1.1.12p7/debian/patches/01_fix_livestatus.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_fix_livestatus.dpatch by Alexander Wirt <formorer@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-check_mk~/setup.sh pkg-check_mk/setup.sh
+--- pkg-check_mk~/setup.sh	2011-05-28 13:21:38.000000000 +0200
++++ pkg-check_mk/setup.sh	2011-05-28 13:22:09.662237441 +0200
+@@ -535,6 +535,8 @@
+    rm -rf $D
+    mkdir -p $D
+    tar xvzf $SRCDIR/livestatus.tar.gz -C $D
++   sed -i '/Boston/ a\
++#include <cstddef>' livestatus.src/src/TableStatus.cc livestatus.src/src/TableLog.cc
+    pushd $D
+    ./configure --libdir=$libdir --bindir=$bindir &&
+    make clean &&
--- check-mk-1.1.12p7.orig/debian/patches/02_wato-sudoers.dpatch
+++ check-mk-1.1.12p7/debian/patches/02_wato-sudoers.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## wato-sudoers-location.dpatch by Bernd Zeimetz <bzed@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Install WATO sudoers line into /etc/sudoers.d/check_mk_WATO
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-check-mk~/setup.sh pkg-check-mk/setup.sh
+--- pkg-check-mk~/setup.sh	2011-11-10 09:50:10.000000000 +0100
++++ pkg-check-mk/setup.sh	2011-11-10 09:50:56.207820998 +0100
+@@ -571,28 +571,12 @@
+ 	return
+     fi
+  
+-    sudolines="Defaults:$wwwuser !requiretty\n$wwwuser ALL = (root) NOPASSWD: $bindir/check_mk --automation *"
+-
+-    if [ ! -e /etc/sudoers ] ; then
+-        echo "You do not have sudo installed. Please install sudo "
+-        echo "and add the following line to /etc/sudoers if you want"
+-        echo "to use WATO - the Check_MK Web Administration Tool"
+-        echo
+-        echo -e "$sudolines"
+-        echo 
+-        echo
+-        return
+-    fi
+-
+-    if fgrep -q 'check_mk --automation' /etc/sudoers 2>/dev/null
+-    then
+-        # already present. Do not touch.
+-        return
+-    fi
++    sudolines="Defaults:$wwwuser !requiretty\n$wwwuser ALL = (nagios) NOPASSWD: $bindir/check_mk --automation *"
+ 
+-    echo >> /etc/sudoers
+-    echo "# Needed for  WATO - the Check_MK Web Administration Tool" >> /etc/sudoers
+-    echo -e "$sudolines" >> /etc/sudoers
++    mkdir -p $DESTDIR/etc/sudoers.d
++    echo >> $DESTDIR/etc/sudoers.d/check_mk_wato
++    echo "# Needed for  WATO - the Check_MK Web Administration Tool" >> $DESTDIR/etc/sudoers.d/check_mk_wato
++    echo -e "$sudolines" >> $DESTDIR/etc/sudoers.d/check_mk_wato
+ }
+ 
+ while true
--- check-mk-1.1.12p7.orig/debian/patches/00list
+++ check-mk-1.1.12p7/debian/patches/00list
@@ -0,0 +1,2 @@
+01_fix_livestatus
+02_wato-sudoers
--- check-mk-1.1.12p7.orig/debian/source/format
+++ check-mk-1.1.12p7/debian/source/format
@@ -0,0 +1 @@
+1.0