summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Scherbaum <dertobi123@gentoo.org>2007-09-28 17:54:53 +0000
committerTobias Scherbaum <dertobi123@gentoo.org>2007-09-28 17:54:53 +0000
commit44ee7056c75a040482959de38922524fe62dbded (patch)
tree32548e833f0ef3de051120843abe46a3289781af
parentAlready merged to the tree (diff)
downloaddertobi123-44ee7056c75a040482959de38922524fe62dbded.tar.gz
dertobi123-44ee7056c75a040482959de38922524fe62dbded.tar.bz2
dertobi123-44ee7056c75a040482959de38922524fe62dbded.zip
Import Nagios 3 (Beta 4), support lighttpd
svn path=/; revision=12
-rw-r--r--net-analyzer/nagios-core/Manifest65
-rw-r--r--net-analyzer/nagios-core/files/2.x-series-nsca.patch18
-rw-r--r--net-analyzer/nagios-core/files/99_nagios.conf15
-rw-r--r--net-analyzer/nagios-core/files/conf.d10
-rw-r--r--net-analyzer/nagios-core/files/digest-nagios-core-1.4.14
-rw-r--r--net-analyzer/nagios-core/files/digest-nagios-core-1.4.1-r14
-rw-r--r--net-analyzer/nagios-core/files/digest-nagios-core-2.9-r15
-rw-r--r--net-analyzer/nagios-core/files/digest-nagios-core-3.0_beta46
-rw-r--r--net-analyzer/nagios-core/files/lighttpd_nagios.conf23
-rw-r--r--net-analyzer/nagios-core/files/nagios57
-rw-r--r--net-analyzer/nagios-core/files/nagios-1.x-Makefile-asneeded.diff110
-rw-r--r--net-analyzer/nagios-core/files/nagios.conf19
-rw-r--r--net-analyzer/nagios-core/files/submit_check_result_via_nsca.patch14
-rw-r--r--net-analyzer/nagios-core/nagios-core-1.4.1-r1.ebuild257
-rw-r--r--net-analyzer/nagios-core/nagios-core-1.4.1.ebuild257
-rw-r--r--net-analyzer/nagios-core/nagios-core-2.9-r1.ebuild227
-rw-r--r--net-analyzer/nagios-core/nagios-core-3.0_beta4.ebuild254
-rw-r--r--net-analyzer/nagios/Manifest21
-rw-r--r--net-analyzer/nagios/files/digest-nagios-1.4.10
-rw-r--r--net-analyzer/nagios/files/digest-nagios-2.90
-rw-r--r--net-analyzer/nagios/files/digest-nagios-3.0_beta40
-rw-r--r--net-analyzer/nagios/nagios-1.4.1.ebuild30
-rw-r--r--net-analyzer/nagios/nagios-2.9.ebuild29
-rw-r--r--net-analyzer/nagios/nagios-3.0_beta4.ebuild29
24 files changed, 1454 insertions, 0 deletions
diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest
new file mode 100644
index 0000000..ec99e69
--- /dev/null
+++ b/net-analyzer/nagios-core/Manifest
@@ -0,0 +1,65 @@
+AUX 2.x-series-nsca.patch 767 RMD160 69c3916842953666037dcf258906c15a9ce0047a SHA1 5f376bd65bf74eeb3cc00efde4fadf7f8962d06c SHA256 04ecb77abfe7618d036a2b598ea30df6704a82285b2210055eda4dd6414c94d3
+MD5 446906907cccdbf195442373c6f17f77 files/2.x-series-nsca.patch 767
+RMD160 69c3916842953666037dcf258906c15a9ce0047a files/2.x-series-nsca.patch 767
+SHA256 04ecb77abfe7618d036a2b598ea30df6704a82285b2210055eda4dd6414c94d3 files/2.x-series-nsca.patch 767
+AUX 99_nagios.conf 350 RMD160 d9818e29cd119b2cc185c75dcd374b3851eaa739 SHA1 fa4b438c1d06f2d00cd2bff4fefc448a59d1cdec SHA256 2e8448d5e38969f0eee4306611e9592e9cec93506ad055cd27ef8e211cfe9f71
+MD5 673bda0ac6ab9230d23331e7f3846b7b files/99_nagios.conf 350
+RMD160 d9818e29cd119b2cc185c75dcd374b3851eaa739 files/99_nagios.conf 350
+SHA256 2e8448d5e38969f0eee4306611e9592e9cec93506ad055cd27ef8e211cfe9f71 files/99_nagios.conf 350
+AUX conf.d 409 RMD160 8b08c01284fc590a2291164589da42515d1a0586 SHA1 dd7bf46facd6a3069794ad9623cddd854198520e SHA256 a5122b19248c375b7b7c80bb5568fcaf334de316c611a85795960c2b9f6a6d5a
+MD5 f2947dec6b9a839da79606bcc394036b files/conf.d 409
+RMD160 8b08c01284fc590a2291164589da42515d1a0586 files/conf.d 409
+SHA256 a5122b19248c375b7b7c80bb5568fcaf334de316c611a85795960c2b9f6a6d5a files/conf.d 409
+AUX lighttpd_nagios.conf 436 RMD160 9de8b24fe9566a6900bbc47ac497c245678a3d5e SHA1 456346017cd85f1e1c47b158d9b8e44795772d26 SHA256 8bcd8437e023db108900c676031e81d50a5e34edfe6245fac0b9a347b520d339
+MD5 2ac0ec70ded7bf5991ee038d5d7eee42 files/lighttpd_nagios.conf 436
+RMD160 9de8b24fe9566a6900bbc47ac497c245678a3d5e files/lighttpd_nagios.conf 436
+SHA256 8bcd8437e023db108900c676031e81d50a5e34edfe6245fac0b9a347b520d339 files/lighttpd_nagios.conf 436
+AUX nagios 1459 RMD160 522be9fa5e31accbba9778ced996e23e6c261284 SHA1 8d8cf21a2e1c4e6b4ba52aa5db2e30b71798afa5 SHA256 beb6682352f42496ed527c7d60b33d0e9c3d1e74681a013dc73d128a0139acb1
+MD5 2f120511fbf8d89ea76566872e409ef5 files/nagios 1459
+RMD160 522be9fa5e31accbba9778ced996e23e6c261284 files/nagios 1459
+SHA256 beb6682352f42496ed527c7d60b33d0e9c3d1e74681a013dc73d128a0139acb1 files/nagios 1459
+AUX nagios-1.x-Makefile-asneeded.diff 5460 RMD160 589bc81bb2fe0148acb0d9e6c76d63b6ca6ae34c SHA1 ced005ab9d100af6cd84508cddc1d6d4450aa509 SHA256 679482075dfdecd58948ed479adf306ed02bff5cf661f605d01193b2a11ef503
+MD5 354f5aeb0e831ee8e218962eb85d07e4 files/nagios-1.x-Makefile-asneeded.diff 5460
+RMD160 589bc81bb2fe0148acb0d9e6c76d63b6ca6ae34c files/nagios-1.x-Makefile-asneeded.diff 5460
+SHA256 679482075dfdecd58948ed479adf306ed02bff5cf661f605d01193b2a11ef503 files/nagios-1.x-Makefile-asneeded.diff 5460
+AUX nagios.conf 362 RMD160 ea642c44b8450cfc67a1675f3dc558d36eccabcb SHA1 a06e53b6c634171c09bb36f1ef460053f7e542c3 SHA256 8d57d761efd4057e15430462e1233715c1472155ae181a2d5d364948bbcb1848
+MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362
+RMD160 ea642c44b8450cfc67a1675f3dc558d36eccabcb files/nagios.conf 362
+SHA256 8d57d761efd4057e15430462e1233715c1472155ae181a2d5d364948bbcb1848 files/nagios.conf 362
+AUX submit_check_result_via_nsca.patch 585 RMD160 1dc2b0a10b0c824b3e0026c26d17f931703e7a98 SHA1 3c00221ae86402dcae93b71abb92cd88e14acb03 SHA256 2770e3988ce05a63866e4b32c029f3ef13d64d7da3791747014378391d5d8d3e
+MD5 cee7d66cc61be3558af44ab177d99e1f files/submit_check_result_via_nsca.patch 585
+RMD160 1dc2b0a10b0c824b3e0026c26d17f931703e7a98 files/submit_check_result_via_nsca.patch 585
+SHA256 2770e3988ce05a63866e4b32c029f3ef13d64d7da3791747014378391d5d8d3e files/submit_check_result_via_nsca.patch 585
+DIST nagios-1.4.1.tar.gz 1643386 RMD160 f79f6ec943e820562263d62b5e0fb8ab090f8d69 SHA1 27a1e46479f526aaf218d4dc8f90b29e8a6d9ace SHA256 8383ba2d76dc94d677987b23bd0a6cf241d3cde6dd93920ee69a6841edc71898
+DIST nagios-1.x-Makefile-distclean-gentoo.diff.bz2 1133 RMD160 62a627f54b878bdad8347138935ec7875bf39857 SHA1 2063a2d629e88f2e6b536d4eafe4e0f815c4fdb1 SHA256 1f6a1d76d589c5a5ae5bb68367a410ea984f6dccf766a6a76229c1014f872084
+DIST nagios-2.0b.cfg-sample.gz 8990 RMD160 5c1f02e13351f46214d032936dd1ecef3c2449c2 SHA1 7a27bcf4be959424b688f52e31887862b863ec23 SHA256 d1397cef03c96eca2bcce85675d2db2b94ddafd439e63c6463f7f11536564c12
+DIST nagios-2.9.tar.gz 1738698 RMD160 e60268efc59046b6b5884c920366e98c4badc122 SHA1 83c6b13004399cfa76c049243429286055e2d068 SHA256 f60a72dec1edef308a899734eff4f7e5167522f1afeb5c24fd1852e2749c5d9d
+DIST nagios-3.0b4.tar.gz 2723707 RMD160 0f70e5516114de3090e8e60fa947decba43542ea SHA1 bcb0d3756b6d56bbbd424ea4b3952ca3a5610520 SHA256 6fd804fb6785ae7cb5c9f8171ed6d418bf55848c52061abb457c24539c99d6e8
+EBUILD nagios-core-1.4.1-r1.ebuild 7240 RMD160 0973c892dd1d6e0e8ab17bf5e7ddc67b94291ebf SHA1 424785d45415df90820fdf57e8215b50f17e36fe SHA256 4d0b569c3d2a8642cba55c3f1b916be3fc796dd2925419f201eb3f2a592067cb
+MD5 a271dc74aa33fef5a8430d763c4fa92a nagios-core-1.4.1-r1.ebuild 7240
+RMD160 0973c892dd1d6e0e8ab17bf5e7ddc67b94291ebf nagios-core-1.4.1-r1.ebuild 7240
+SHA256 4d0b569c3d2a8642cba55c3f1b916be3fc796dd2925419f201eb3f2a592067cb nagios-core-1.4.1-r1.ebuild 7240
+EBUILD nagios-core-1.4.1.ebuild 7234 RMD160 c525d1a1ac628ad73adc38e43a2c7c47d2f45f9d SHA1 ab3afde51021323e455b9fa1c07cc544c5a1d857 SHA256 a300320f0664d2c5ff22c75115f542829ae0e56e64bdd5ae8d4bfea6b6f20dde
+MD5 0a6d86e563534b51f626f6421d7ca90d nagios-core-1.4.1.ebuild 7234
+RMD160 c525d1a1ac628ad73adc38e43a2c7c47d2f45f9d nagios-core-1.4.1.ebuild 7234
+SHA256 a300320f0664d2c5ff22c75115f542829ae0e56e64bdd5ae8d4bfea6b6f20dde nagios-core-1.4.1.ebuild 7234
+EBUILD nagios-core-2.9-r1.ebuild 6327 RMD160 b9779566877185e6319cffc161d4bd0873b5e3ee SHA1 58d2e13f5a1e5bbca893806026821dac9f867fd1 SHA256 0e9368096603d86e7a9f831e56e856ae9a1d974df34ec10469bd0b9b862d2d61
+MD5 6a810e8dc39b59b02c1a868ba75303af nagios-core-2.9-r1.ebuild 6327
+RMD160 b9779566877185e6319cffc161d4bd0873b5e3ee nagios-core-2.9-r1.ebuild 6327
+SHA256 0e9368096603d86e7a9f831e56e856ae9a1d974df34ec10469bd0b9b862d2d61 nagios-core-2.9-r1.ebuild 6327
+EBUILD nagios-core-3.0_beta4.ebuild 7176 RMD160 e7bd0d98b64de409af5ba6652c9b27314773c9e5 SHA1 cb4451ddbc8da797022a82ecab1dcd607fba4c83 SHA256 55db8b2591a56a440be708a89445da20af02b3371f29cdabd6de10fb10369dce
+MD5 e51b8cd2412e15e65147b90fa2f1c698 nagios-core-3.0_beta4.ebuild 7176
+RMD160 e7bd0d98b64de409af5ba6652c9b27314773c9e5 nagios-core-3.0_beta4.ebuild 7176
+SHA256 55db8b2591a56a440be708a89445da20af02b3371f29cdabd6de10fb10369dce nagios-core-3.0_beta4.ebuild 7176
+MD5 ef84263e27625b48156346efd2d64888 files/digest-nagios-core-1.4.1 398
+RMD160 664058040de4c5d738feb55a4da8c91ff17ffa86 files/digest-nagios-core-1.4.1 398
+SHA256 d06116a1f6bb6d6b252cebbc2a6af90f64268a1516a9f5079befd6959818e6ce files/digest-nagios-core-1.4.1 398
+MD5 ef84263e27625b48156346efd2d64888 files/digest-nagios-core-1.4.1-r1 398
+RMD160 664058040de4c5d738feb55a4da8c91ff17ffa86 files/digest-nagios-core-1.4.1-r1 398
+SHA256 d06116a1f6bb6d6b252cebbc2a6af90f64268a1516a9f5079befd6959818e6ce files/digest-nagios-core-1.4.1-r1 398
+MD5 5fed197505e78375bac5f711d2c1f78b files/digest-nagios-core-2.9-r1 422
+RMD160 f07edfb62698ec8873376651cfc3ef2d339f61b8 files/digest-nagios-core-2.9-r1 422
+SHA256 483d670ab17ccb1aafc809662186b525f42b49e3c4d2f91747020215debdbef3 files/digest-nagios-core-2.9-r1 422
+MD5 3a8d5d69f599383518c051cdd8c7147a files/digest-nagios-core-3.0_beta4 491
+RMD160 0c195a3ff77d1021b37d9b764785e5d69badfef3 files/digest-nagios-core-3.0_beta4 491
+SHA256 9b13758eec3c1e8115904a61d8ee6ee1367aee3d5fbd7ad5426a0d12ed9b6200 files/digest-nagios-core-3.0_beta4 491
diff --git a/net-analyzer/nagios-core/files/2.x-series-nsca.patch b/net-analyzer/nagios-core/files/2.x-series-nsca.patch
new file mode 100644
index 0000000..faae90c
--- /dev/null
+++ b/net-analyzer/nagios-core/files/2.x-series-nsca.patch
@@ -0,0 +1,18 @@
+--- contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca.orig 2005-01-28 12:57:11.537852344 +0930
++++ contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2005-01-28 12:57:45.877631904 +0930
+@@ -28,9 +28,12 @@
+
+ printfcmd="/bin/printf"
+
+-NscaBin="/usr/local/nagios/libexec/send_nsca"
+-NscaCfg="/usr/local/nagios/etc/send_nsca.cfg"
+-NagiosHost="nagioshost"
++NscaBin="/usr/nagios/libexec/send_nsca"
++NscaCfg="/etc/nagios/send_nsca.cfg"
++
++# Gentoo Linux Users: configure the hostname in /etc/conf.d/nagios
++source /etc/conf.d/nagios
++NagiosHost="${NAGIOS_NSCA_HOST}"
+
+ # Fire the data off to the NSCA daemon using the send_nsca script
+ $printfcmd "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" | $NscaBin $NagiosHost -c $NscaCfg
diff --git a/net-analyzer/nagios-core/files/99_nagios.conf b/net-analyzer/nagios-core/files/99_nagios.conf
new file mode 100644
index 0000000..b41cdee
--- /dev/null
+++ b/net-analyzer/nagios-core/files/99_nagios.conf
@@ -0,0 +1,15 @@
+<IfDefine NAGIOS>
+ ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/
+ <Directory "/usr/nagios/sbin/">
+ AllowOverride AuthConfig
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+ </Directory>
+ Alias /nagios /usr/nagios/share/
+ <Directory "/usr/nagios/share">
+ AllowOverride AuthConfig
+ Order allow,deny
+ Allow from all
+ </Directory>
+</IfDefine>
diff --git a/net-analyzer/nagios-core/files/conf.d b/net-analyzer/nagios-core/files/conf.d
new file mode 100644
index 0000000..338311a
--- /dev/null
+++ b/net-analyzer/nagios-core/files/conf.d
@@ -0,0 +1,10 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/conf.d,v 1.1 2004/08/20 13:38:13 eldad Exp $
+
+# Distributed monitoring users will want to configure here the ip/hostname of the central server.
+# It will be used by submit_check_result_via_nsca.
+NAGIOS_NSCA_HOST="localhost"
+
+
+
diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-1.4.1 b/net-analyzer/nagios-core/files/digest-nagios-core-1.4.1
new file mode 100644
index 0000000..1eb23eb
--- /dev/null
+++ b/net-analyzer/nagios-core/files/digest-nagios-core-1.4.1
@@ -0,0 +1,4 @@
+RMD160 f79f6ec943e820562263d62b5e0fb8ab090f8d69 nagios-1.4.1.tar.gz 1643386
+SHA256 8383ba2d76dc94d677987b23bd0a6cf241d3cde6dd93920ee69a6841edc71898 nagios-1.4.1.tar.gz 1643386
+RMD160 62a627f54b878bdad8347138935ec7875bf39857 nagios-1.x-Makefile-distclean-gentoo.diff.bz2 1133
+SHA256 1f6a1d76d589c5a5ae5bb68367a410ea984f6dccf766a6a76229c1014f872084 nagios-1.x-Makefile-distclean-gentoo.diff.bz2 1133
diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-1.4.1-r1 b/net-analyzer/nagios-core/files/digest-nagios-core-1.4.1-r1
new file mode 100644
index 0000000..1eb23eb
--- /dev/null
+++ b/net-analyzer/nagios-core/files/digest-nagios-core-1.4.1-r1
@@ -0,0 +1,4 @@
+RMD160 f79f6ec943e820562263d62b5e0fb8ab090f8d69 nagios-1.4.1.tar.gz 1643386
+SHA256 8383ba2d76dc94d677987b23bd0a6cf241d3cde6dd93920ee69a6841edc71898 nagios-1.4.1.tar.gz 1643386
+RMD160 62a627f54b878bdad8347138935ec7875bf39857 nagios-1.x-Makefile-distclean-gentoo.diff.bz2 1133
+SHA256 1f6a1d76d589c5a5ae5bb68367a410ea984f6dccf766a6a76229c1014f872084 nagios-1.x-Makefile-distclean-gentoo.diff.bz2 1133
diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-2.9-r1 b/net-analyzer/nagios-core/files/digest-nagios-core-2.9-r1
new file mode 100644
index 0000000..1af7769
--- /dev/null
+++ b/net-analyzer/nagios-core/files/digest-nagios-core-2.9-r1
@@ -0,0 +1,5 @@
+MD5 6b679390ce57974a0f69145e0918372f nagios-2.0b.cfg-sample.gz 8990
+RMD160 5c1f02e13351f46214d032936dd1ecef3c2449c2 nagios-2.0b.cfg-sample.gz 8990
+SHA256 d1397cef03c96eca2bcce85675d2db2b94ddafd439e63c6463f7f11536564c12 nagios-2.0b.cfg-sample.gz 8990
+RMD160 e60268efc59046b6b5884c920366e98c4badc122 nagios-2.9.tar.gz 1738698
+SHA256 f60a72dec1edef308a899734eff4f7e5167522f1afeb5c24fd1852e2749c5d9d nagios-2.9.tar.gz 1738698
diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-3.0_beta4 b/net-analyzer/nagios-core/files/digest-nagios-core-3.0_beta4
new file mode 100644
index 0000000..7aab01b
--- /dev/null
+++ b/net-analyzer/nagios-core/files/digest-nagios-core-3.0_beta4
@@ -0,0 +1,6 @@
+MD5 6b679390ce57974a0f69145e0918372f nagios-2.0b.cfg-sample.gz 8990
+RMD160 5c1f02e13351f46214d032936dd1ecef3c2449c2 nagios-2.0b.cfg-sample.gz 8990
+SHA256 d1397cef03c96eca2bcce85675d2db2b94ddafd439e63c6463f7f11536564c12 nagios-2.0b.cfg-sample.gz 8990
+MD5 82582adcea2dbd785ae946cdb1e4be00 nagios-3.0b4.tar.gz 2723707
+RMD160 0f70e5516114de3090e8e60fa947decba43542ea nagios-3.0b4.tar.gz 2723707
+SHA256 6fd804fb6785ae7cb5c9f8171ed6d418bf55848c52061abb457c24539c99d6e8 nagios-3.0b4.tar.gz 2723707
diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios.conf b/net-analyzer/nagios-core/files/lighttpd_nagios.conf
new file mode 100644
index 0000000..d512255
--- /dev/null
+++ b/net-analyzer/nagios-core/files/lighttpd_nagios.conf
@@ -0,0 +1,23 @@
+server.modules += ("mod_cgi")
+server.modules += ("mod_auth")
+
+auth.require = ( "/nagios" =>
+ (
+ "method" => "digest",
+ "realm" => "nagios",
+ "require" => "valid-user",
+ )
+)
+
+$HTTP["url"] =~ "^/nagios/cgi-bin/" {
+ dir-listing.activate = "disable"
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => ""
+ )
+}
+
+alias.url += (
+ "/nagios/cgi-bin" => "/usr/nagios/sbin",
+ "/nagios" => "/usr/nagios/share"
+)
diff --git a/net-analyzer/nagios-core/files/nagios b/net-analyzer/nagios-core/files/nagios
new file mode 100644
index 0000000..c78279d
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.10 2007/05/08 21:36:14 dertobi123 Exp $
+
+opts="${opts} reload checkconfig"
+
+depend() {
+ need net
+ use dns logger firewall
+ after mysql postgresql
+}
+
+reload()
+{
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ killall -HUP nagios &>/dev/null
+ eend $?
+}
+
+checkconfig() {
+ # Silent Check
+ /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0
+
+ # Now we know there's problem - run again and display errors
+ /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting nagios"
+ touch /var/nagios/nagios.log /var/nagios/status.sav
+ chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav
+ rm -f /var/nagios/rw/nagios.cmd
+ start-stop-daemon --quiet --start --startas /usr/nagios/bin/nagios \
+ -e HOME="/var/nagios/home" --pidfile /var/nagios/nagios.lock \
+ -- -d /etc/nagios/nagios.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nagios"
+ start-stop-daemon --quiet --stop --pidfile /var/nagios/nagios.lock
+ rm -f /var/nagios/status.log /var/nagios/nagios.tmp /var/nagios/nagios.lock /var/nagios/rw/nagios.cmd
+ eend $?
+}
+
+svc_restart() {
+ checkconfig || return 1
+ ebegin "Restarting nagios"
+ svc_stop
+ svc_start
+ eend $?
+}
+
diff --git a/net-analyzer/nagios-core/files/nagios-1.x-Makefile-asneeded.diff b/net-analyzer/nagios-core/files/nagios-1.x-Makefile-asneeded.diff
new file mode 100644
index 0000000..b24c9fc
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-1.x-Makefile-asneeded.diff
@@ -0,0 +1,110 @@
+--- nagios-1.3/base/Makefile.in.orig 2006-04-30 00:22:59.000000000 +0300
++++ nagios-1.3/base/Makefile.in 2006-04-30 00:23:01.000000000 +0300
+@@ -12,7 +12,8 @@
+ CC=@CC@
+ CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE
+ #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCORE
+-LDFLAGS=@LDFLAGS@ @LIBS@
++LDFLAGS=@LDFLAGS@
++LDADD=@LIBS@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+@@ -88,7 +89,7 @@
+ OBJS=checks.o config.o commands.o flapping.o logging.o notifications.o sehandlers.o utils.o $(RDATALIBS) $(CDATALIBS) $(ODATALIBS) $(SDATALIBS) $(PDATALIBS) $(DDATALIBS) $(BASEEXTRALIBS) $(SNPRINTF_O)
+
+ nagios: nagios.c $(OBJS) nagios.h $(SRC_COMMON)/locations.h
+- $(CC) $(CFLAGS) $(LDFLAGS) nagios.c $(OBJS) $(PERLLIBS) $(MATHLIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) nagios.c $(OBJS) $(PERLLIBS) $(MATHLIBS) $(LDADD) -o $@
+
+ #$(SRC_COMMON)/locations.h: $(SRC_COMMON)/locations.sub
+ # perl -pe 's|\$${prefix}|${prefix}|g;s|\$${exec_prefix}|${exec_prefix}|g;s|\$${htmurl}|$(HTMURL)|g;s|\$${cgiurl}|$(CGIURL)|g;' $(SRC_COMMON)/locations.sub > $(SRC_COMMON)/locations.h
+--- nagios-1.3/cgi/Makefile.in.orig 2006-04-30 00:37:36.000000000 +0300
++++ nagios-1.3/cgi/Makefile.in 2006-04-30 00:38:56.000000000 +0300
+@@ -27,7 +27,8 @@
+ CC=@CC@
+ CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI
+ #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -DHAVE_CONFIG_H -DNSCGI
+-LDFLAGS=@LDFLAGS@ @LIBS@
++LDFLAGS=@LDFLAGS@
++LDADD=@LIBS@
+
+ CGIS=avail.cgi cmd.cgi config.cgi extinfo.cgi history.cgi notifications.cgi outages.cgi showlog.cgi status.cgi statuswml.cgi summary.cgi tac.cgi $(CGIEXTRAS)
+
+@@ -95,58 +96,58 @@
+ $(COMMENTLIBS): $(COMMENTHDRS)
+
+ avail.cgi: avail.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) avail.c $(CGILIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) avail.c $(CGILIBS) $(LDADD) -o $@
+
+ checksanity.cgi: checksanity.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) checksanity.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) checksanity.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) $(LDADD) -o $@
+
+ cmd.cgi: cmd.c $(CGIDEPS) $(CDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) cmd.c $(CGILIBS) $(CDATALIBS) $(DDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) cmd.c $(CGILIBS) $(CDATALIBS) $(DDATALIBS) $(LDADD) -o $@
+
+ config.cgi: config.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) config.c $(CGILIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) config.c $(CGILIBS) $(LDADD) -o $@
+
+ extinfo.cgi: extinfo.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) extinfo.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) extinfo.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) $(LDADD) -o $@
+
+ history.cgi: history.c $(CGIDEPS) $(LIFODEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) history.c $(CGILIBS) $(LIFOLIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) history.c $(CGILIBS) $(LIFOLIBS) $(LDADD) -o $@
+
+ ministatus.cgi: ministatus.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) ministatus.c $(CGILIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) ministatus.c $(CGILIBS) $(LDADD) -o $@
+
+ notifications.cgi: notifications.c $(CGIDEPS) $(LIFODEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) notifications.c $(CGILIBS) $(LIFOLIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) notifications.c $(CGILIBS) $(LIFOLIBS) $(LDADD) -o $@
+
+ outages.cgi: outages.c $(CGIDEPS) $(CDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) outages.c $(CGILIBS) $(CDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) outages.c $(CGILIBS) $(CDATALIBS) $(LDADD) -o $@
+
+ showlog.cgi: showlog.c $(CGIDEPS) $(LIFODEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) showlog.c $(CGILIBS) $(LIFOLIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) showlog.c $(CGILIBS) $(LIFOLIBS) $(LDADD) -o $@
+
+ status.cgi: status.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) status.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) status.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(LDADD) -o $@
+
+ statuswml.cgi: statuswml.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) statuswml.c $(CGILIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) statuswml.c $(CGILIBS) $(LDADD) -o $@
+
+ statusmap.cgi: statusmap.c $(CGIDEPS) $(EDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) statusmap.c $(CGILIBS) $(GDLIBS) $(EDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) statusmap.c $(CGILIBS) $(GDLIBS) $(EDATALIBS) $(LDADD) -o $@
+
+ statuswrl.cgi: statuswrl.c $(CGIDEPS) $(EDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) statuswrl.c $(CGILIBS) $(MATHLIBS) $(EDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) statuswrl.c $(CGILIBS) $(MATHLIBS) $(EDATALIBS) $(LDADD) -o $@
+
+ summary.cgi: summary.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) summary.c $(CGILIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) summary.c $(CGILIBS) $(LDADD) -o $@
+
+ tac.cgi: tac.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) tac.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) tac.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(LDADD) -o $@
+
+ trends.cgi: trends.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) trends.c $(CGILIBS) $(GDLIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) trends.c $(CGILIBS) $(GDLIBS) $(LDADD) -o $@
+
+ histogram.cgi: histogram.c $(CGIDEPS)
+- $(CC) $(CFLAGS) $(LDFLAGS) histogram.c $(CGILIBS) $(GDLIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) histogram.c $(CGILIBS) $(GDLIBS) $(LDADD) -o $@
+
+ clean:
+ rm -f $(CGIS) *.o *.cfg *.sub core
diff --git a/net-analyzer/nagios-core/files/nagios.conf b/net-analyzer/nagios-core/files/nagios.conf
new file mode 100644
index 0000000..76abed1
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios.conf
@@ -0,0 +1,19 @@
+<IfDefine NAGIOS>
+
+ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/
+<Directory "/usr/nagios/sbin/">
+ AllowOverride AuthConfig
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+</Directory>
+
+
+Alias /nagios /usr/nagios/share/
+<Directory "/usr/nagios/share">
+ AllowOverride AuthConfig
+ Order allow,deny
+ Allow from all
+</Directory>
+
+</IfDefine>
diff --git a/net-analyzer/nagios-core/files/submit_check_result_via_nsca.patch b/net-analyzer/nagios-core/files/submit_check_result_via_nsca.patch
new file mode 100644
index 0000000..5f819e2
--- /dev/null
+++ b/net-analyzer/nagios-core/files/submit_check_result_via_nsca.patch
@@ -0,0 +1,14 @@
+--- contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca.orig 2004-08-20 14:57:38.462260008 +0300
++++ contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2004-08-20 15:06:46.647923120 +0300
+@@ -32,7 +32,10 @@
+
+ NscaBin="/usr/local/nagios/libexec/send_nsca"
+ NscaCfg="/usr/local/nagios/etc/send_nsca.cfg"
+-NagiosHost="nagioshost"
++
++# Gentoo Linux Users: configure the hostname in /etc/conf.d/nagios
++source /etc/conf.d/nagios
++NagiosHost="${NAGIOS_NSCA_HOST}"
+
+ # create the command line to add to the command file
+ cmdline="$1;$2;$3;$4"
diff --git a/net-analyzer/nagios-core/nagios-core-1.4.1-r1.ebuild b/net-analyzer/nagios-core/nagios-core-1.4.1-r1.ebuild
new file mode 100644
index 0000000..f8e2098
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-1.4.1-r1.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-1.4.1-r1.ebuild,v 1.4 2007/06/26 02:21:22 mr_bones_ Exp $
+
+inherit eutils apache-module toolchain-funcs
+
+MY_P=${P/-core}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ mirror://gentoo/nagios-1.x-Makefile-distclean-gentoo.diff.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="noweb mysql postgres perl debug"
+
+DEPEND="virtual/mailx
+ !noweb? (
+ >=media-libs/jpeg-6b-r3
+ >=media-libs/libpng-1.2.5-r4
+ >=media-libs/gd-1.8.3-r5
+ ${NEED_APACHE_DEPEND}
+ )
+ perl? ( >=dev-lang/perl-5.6.1-r7 )
+ mysql? ( virtual/mysql )
+ postgres? ( !mysql? ( >=dev-db/postgresql-7.3.2 ) )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # If there's a gd lib on the system, it will try to build with it.
+ # check if gdlib-config is on, and then check its output.
+ if [[ -x /usr/bin/gdlib-config ]]; then
+ if [[ ! $(gdlib-config --libs | grep -- -ljpeg) ]]; then
+ eerror "Your gd has been compiled without jpeg support."
+ eerror "Please re-emerge gd:"
+ eerror "# USE="jpeg" emerge gd"
+ die "pkg_setup failed"
+ fi
+ fi
+
+ enewgroup nagios
+
+ if use noweb; then
+ enewuser nagios -1 /bin/bash /dev/null nagios
+ else
+ enewuser nagios -1 /bin/bash /dev/null nagios,apache
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/nagios-1.x-Makefile-asneeded.diff
+ epatch ${WORKDIR}/nagios-1.x-Makefile-distclean-gentoo.diff
+
+ # libpq-fe.h isnt in psgql/
+ cd xdata/
+ sed -i -e "s:pgsql/::" *.c
+}
+
+src_compile() {
+ local myconf
+
+ if use mysql && use postgres; then
+ ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time."
+ ewarn "Using MySQL as default."
+
+ has_version ">=sys-apps/portage-2.0.50" && (
+ einfo "You can add -"
+ echo
+ einfo "net-analyzer/nagios-core [use flags]"
+ echo
+ einfo "to /etc/portage/package.use to permanently set this package's USE flags"
+ einfo "More info on package.use is available on:"
+ einfo " man 5 portage"
+ )
+ elif use postgres ; then
+ myconf="${myconf} \
+ --with-pgsql-xdata \
+ --with-pgsql-status \
+ --with-pgsql-comments \
+ --with-pgsql-extinfo \
+ --with-pgsql-retention \
+ --with-pgsql-downtime"
+
+ if [ -r /usr/include/postgresql/libpq-fe.h ] ; then
+ myconf="${myconf} --with-pgsql-inc=/usr/include/postgresql"
+ fi
+ fi
+
+ use mysql && myconf="${myconf} \
+ --with-file-perfdata \
+ --with-template-extinfo \
+ --with-mysql-xdata \
+ --with-mysql-status \
+ --with-mysql-comments \
+ --with-mysql-retention \
+ --with-mysql-downtime"
+
+ use perl && myconf="${myconf} \
+ --enable-embedded-perl \
+ --with-perlcache"
+
+ if use debug; then
+ myconf="${myconf} --enable-DEBUG0"
+ myconf="${myconf} --enable-DEBUG1"
+ myconf="${myconf} --enable-DEBUG2"
+ myconf="${myconf} --enable-DEBUG3"
+ myconf="${myconf} --enable-DEBUG4"
+ myconf="${myconf} --enable-DEBUG5"
+ fi
+
+ if use noweb; then
+ myconf="${myconf} --with-command-grp=nagios"
+ else
+ myconf="${myconf} --with-command-grp=apache"
+ fi
+
+ ./configure ${myconf} \
+ --host=${CHOST} \
+ --prefix=/usr/nagios \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ ${myconf} || die "./configure failed"
+
+ make CC=$(tc-getCC) DESTDIR=${D} nagios contrib || die "make failed"
+
+ if use !noweb ; then
+ # Only compile the CGI's if "noweb" useflag is not set.
+ make CC=$(tc-getCC) DESTDIR=${D} cgis || die
+ fi
+
+ emake -C contrib all || "contrib make filed"
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING contrib/htaccess.sample
+ docinto contrib
+ dodoc contrib/README
+
+ if use noweb; then
+ sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile
+ sed -i -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile
+ fi
+
+ make DESTDIR=${D} install
+ make DESTDIR=${D} install-config
+ make DESTDIR=${D} install-commandmode
+
+ docinto sample-configs
+ dodoc ${D}/etc/nagios/*
+ rm ${D}/etc/nagios/*
+
+ # contribs are not configured by the configure script, we'll configure them overselves...
+ find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
+ s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
+ s:/usr/local/nagios/etc:/etc/nagios:;
+ s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
+
+ insinto /usr/share/doc/${PF}/contrib
+ doins -r contrib/database contrib/eventhandlers
+
+ doinitd ${FILESDIR}/nagios
+ newconfd ${FILESDIR}/conf.d nagios
+
+ chmod 644 ${S}/contrib/*.cgi
+ into /usr/nagios
+ for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
+ dobin $bin
+ done
+
+ # Apache Module
+ if use !noweb; then
+ insinto ${APACHE2_MODULES_CONFDIR}
+ doins ${FILESDIR}/99_nagios.conf
+
+ if use perl; then
+ into /usr/nagios
+ for cgi in `find contrib/ -name "*.cgi" -maxdepth 1` ; do
+ dosbin $cgi
+ done
+ fi
+ fi
+
+ for dir in etc/nagios usr/nagios var/nagios ; do
+ chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}"
+ done
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /usr/nagios/share/ssi
+ keepdir /var/nagios/rw
+
+ if use noweb; then
+ chown nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ else
+ chown nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ fi
+
+ chmod 2750 ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
+}
+
+pkg_postinst() {
+ einfo
+ einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/."
+ einfo
+ einfo "Also, if you want nagios to start at boot time"
+ einfo "remember to execute:"
+ einfo " rc-update add nagios default"
+ einfo
+
+ if use !noweb; then
+ einfo "This does not include cgis that are perl-dependent"
+ einfo "Currently traceroute.cgi is perl-dependent"
+ einfo "To have ministatus.cgi requires copying of ministatus.c"
+ einfo "to cgi directory for compiling."
+
+ einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\""
+
+ einfo
+ einfo "That will make nagios's web front end visable via"
+ einfo "http://localhost/nagios/"
+ einfo
+
+ else
+ einfo "Please note that you have installed Nagios without web interface."
+ einfo "Please don't file any bugs about having no web interface when you do this."
+ einfo "Thank you!"
+ fi
+
+ if use mysql && use postgres; then
+ ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time."
+ ewarn "as a default, MySQL support was built."
+ ewarn "To build nagios with PostgreSQL you'll have to emerge nagios without the mysql useflag."
+ fi
+
+ einfo
+ einfo "If you are using distributed monitoring, check the contrib scripts."
+ einfo "configure the central nagios server for the nsca in /etc/conf.d/nagios."
+ einfo
+ einfo "If your kernel has /proc protection, nagios"
+ einfo "will not be happy as it relies on accessing the proc"
+ einfo "filesystem. You can fix this by adding nagios into"
+ einfo "the group wheel, but this is not recomended."
+ einfo
+}
+
+pkg_prerm() {
+ /etc/init.d/nagios stop
+}
diff --git a/net-analyzer/nagios-core/nagios-core-1.4.1.ebuild b/net-analyzer/nagios-core/nagios-core-1.4.1.ebuild
new file mode 100644
index 0000000..ea9714e
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-1.4.1.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-1.4.1.ebuild,v 1.9 2007/06/26 02:21:22 mr_bones_ Exp $
+
+inherit eutils apache-module toolchain-funcs
+
+MY_P=${P/-core}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ mirror://gentoo/nagios-1.x-Makefile-distclean-gentoo.diff.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ppc64 sparc x86"
+IUSE="noweb mysql postgres perl debug"
+
+DEPEND="virtual/mailx
+ !noweb? (
+ >=media-libs/jpeg-6b-r3
+ >=media-libs/libpng-1.2.5-r4
+ >=media-libs/gd-1.8.3-r5
+ ${NEED_APACHE_DEPEND}
+ )
+ perl? ( >=dev-lang/perl-5.6.1-r7 )
+ mysql? ( virtual/mysql )
+ postgres? ( !mysql? ( >=dev-db/postgresql-7.3.2 ) )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # If there's a gd lib on the system, it will try to build with it.
+ # check if gdlib-config is on, and then check its output.
+ if [[ -x /usr/bin/gdlib-config ]]; then
+ if [[ ! $(gdlib-config --libs | grep -- -ljpeg) ]]; then
+ eerror "Your gd has been compiled without jpeg support."
+ eerror "Please re-emerge gd:"
+ eerror "# USE="jpeg" emerge gd"
+ die "pkg_setup failed"
+ fi
+ fi
+
+ enewgroup nagios
+
+ if use noweb; then
+ enewuser nagios -1 /bin/bash /dev/null nagios
+ else
+ enewuser nagios -1 /bin/bash /dev/null nagios,apache
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/nagios-1.x-Makefile-asneeded.diff
+ epatch ${WORKDIR}/nagios-1.x-Makefile-distclean-gentoo.diff
+
+ # libpq-fe.h isnt in psgql/
+ cd xdata/
+ sed -i -e "s:pgsql/::" *.c
+}
+
+src_compile() {
+ local myconf
+
+ if use mysql && use postgres; then
+ ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time."
+ ewarn "Using MySQL as default."
+
+ has_version ">=sys-apps/portage-2.0.50" && (
+ einfo "You can add -"
+ echo
+ einfo "net-analyzer/nagios-core [use flags]"
+ echo
+ einfo "to /etc/portage/package.use to permanently set this package's USE flags"
+ einfo "More info on package.use is available on:"
+ einfo " man 5 portage"
+ )
+ elif use postgres ; then
+ myconf="${myconf} \
+ --with-pgsql-xdata \
+ --with-pgsql-status \
+ --with-pgsql-comments \
+ --with-pgsql-extinfo \
+ --with-pgsql-retention \
+ --with-pgsql-downtime"
+
+ if [ -r /usr/include/postgresql/libpq-fe.h ] ; then
+ myconf="${myconf} --with-pgsql-inc=/usr/include/postgresql"
+ fi
+ fi
+
+ use mysql && myconf="${myconf} \
+ --with-file-perfdata \
+ --with-template-extinfo \
+ --with-mysql-xdata \
+ --with-mysql-status \
+ --with-mysql-comments \
+ --with-mysql-retention \
+ --with-mysql-downtime"
+
+ use perl && myconf="${myconf} \
+ --enable-embedded-perl \
+ --with-perlcache"
+
+ if use debug; then
+ myconf="${myconf} --enable-DEBUG0"
+ myconf="${myconf} --enable-DEBUG1"
+ myconf="${myconf} --enable-DEBUG2"
+ myconf="${myconf} --enable-DEBUG3"
+ myconf="${myconf} --enable-DEBUG4"
+ myconf="${myconf} --enable-DEBUG5"
+ fi
+
+ if use noweb; then
+ myconf="${myconf} --with-command-grp=nagios"
+ else
+ myconf="${myconf} --with-command-grp=apache"
+ fi
+
+ ./configure ${myconf} \
+ --host=${CHOST} \
+ --prefix=/usr/nagios \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ ${myconf} || die "./configure failed"
+
+ make CC=$(tc-getCC) DESTDIR=${D} nagios contrib || die "make failed"
+
+ if use !noweb ; then
+ # Only compile the CGI's if "noweb" useflag is not set.
+ make CC=$(tc-getCC) DESTDIR=${D} cgis || die
+ fi
+
+ emake -C contrib all || "contrib make filed"
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING contrib/htaccess.sample
+ docinto contrib
+ dodoc contrib/README
+
+ if use noweb; then
+ sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile
+ sed -i -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile
+ fi
+
+ make DESTDIR=${D} install
+ make DESTDIR=${D} install-config
+ make DESTDIR=${D} install-commandmode
+
+ docinto sample-configs
+ dodoc ${D}/etc/nagios/*
+ rm ${D}/etc/nagios/*
+
+ # contribs are not configured by the configure script, we'll configure them overselves...
+ find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
+ s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
+ s:/usr/local/nagios/etc:/etc/nagios:;
+ s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
+
+ insinto /usr/share/doc/${PF}/contrib
+ doins -r contrib/database contrib/eventhandlers
+
+ doinitd ${FILESDIR}/nagios
+ newconfd ${FILESDIR}/conf.d nagios
+
+ chmod 644 ${S}/contrib/*.cgi
+ into /usr/nagios
+ for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
+ dobin $bin
+ done
+
+ # Apache Module
+ if use !noweb; then
+ insinto ${APACHE2_MODULES_CONFDIR}
+ doins ${FILESDIR}/99_nagios.conf
+
+ if use perl; then
+ into /usr/nagios
+ for cgi in `find contrib/ -name "*.cgi" -maxdepth 1` ; do
+ dosbin $cgi
+ done
+ fi
+ fi
+
+ for dir in etc/nagios usr/nagios var/nagios ; do
+ chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}"
+ done
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /usr/nagios/share/ssi
+ keepdir /var/nagios/rw
+
+ if use noweb; then
+ chown nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ else
+ chown nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ fi
+
+ chmod 2750 ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
+}
+
+pkg_postinst() {
+ einfo
+ einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/."
+ einfo
+ einfo "Also, if you want nagios to start at boot time"
+ einfo "remember to execute:"
+ einfo " rc-update add nagios default"
+ einfo
+
+ if use !noweb; then
+ einfo "This does not include cgis that are perl-dependent"
+ einfo "Currently traceroute.cgi is perl-dependent"
+ einfo "To have ministatus.cgi requires copying of ministatus.c"
+ einfo "to cgi directory for compiling."
+
+ einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\""
+
+ einfo
+ einfo "That will make nagios's web front end visable via"
+ einfo "http://localhost/nagios/"
+ einfo
+
+ else
+ einfo "Please note that you have installed Nagios without web interface."
+ einfo "Please don't file any bugs about having no web interface when you do this."
+ einfo "Thank you!"
+ fi
+
+ if use mysql && use postgres; then
+ ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time."
+ ewarn "as a default, MySQL support was built."
+ ewarn "To build nagios with PostgreSQL you'll have to emerge nagios without the mysql useflag."
+ fi
+
+ einfo
+ einfo "If you are using distributed monitoring, check the contrib scripts."
+ einfo "configure the central nagios server for the nsca in /etc/conf.d/nagios."
+ einfo
+ einfo "If your kernel has /proc protection, nagios"
+ einfo "will not be happy as it relies on accessing the proc"
+ einfo "filesystem. You can fix this by adding nagios into"
+ einfo "the group wheel, but this is not recomended."
+ einfo
+}
+
+pkg_prerm() {
+ /etc/init.d/nagios stop
+}
diff --git a/net-analyzer/nagios-core/nagios-core-2.9-r1.ebuild b/net-analyzer/nagios-core/nagios-core-2.9-r1.ebuild
new file mode 100644
index 0000000..5d1d156
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-2.9-r1.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.9-r1.ebuild,v 1.4 2007/08/01 21:00:26 marineam Exp $
+
+inherit eutils apache-module toolchain-funcs
+
+MY_P=${PN/-core}-${PV/_}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ mirror://gentoo/nagios-2.0b.cfg-sample.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="noweb perl debug"
+# mysql postgres
+DEPEND="virtual/mailx
+ !noweb? (
+ >=media-libs/jpeg-6b-r3
+ >=media-libs/libpng-1.2.5-r4
+ >=media-libs/gd-1.8.3-r5
+ ${NEED_APACHE_DEPEND}
+ perl? ( net-analyzer/traceroute )
+ )
+ perl? ( >=dev-lang/perl-5.6.1-r7 )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # Check if gd has been compiled with jpeg and png support
+ if ! use noweb; then
+ if ! built_with_use media-libs/gd jpeg png; then
+ eerror "Your gd has been compiled without jpeg and/or png support."
+ eerror "Please re-emerge gd:"
+ eerror "# USE="jpeg png" emerge gd"
+ die "pkg_setup failed"
+ fi
+ fi
+
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/2.x-series-nsca.patch
+
+ local strip="$(echo '$(MAKE) strip-post-install')"
+ sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in"
+}
+
+src_compile() {
+ local myconf
+
+ if use perl
+ then
+ myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ fi
+
+ if use debug; then
+ myconf="${myconf} --enable-DEBUG0"
+ myconf="${myconf} --enable-DEBUG1"
+ myconf="${myconf} --enable-DEBUG2"
+ myconf="${myconf} --enable-DEBUG3"
+ myconf="${myconf} --enable-DEBUG4"
+ myconf="${myconf} --enable-DEBUG5"
+ fi
+
+ if use noweb; then
+ myconf="${myconf} --with-command-grp=nagios"
+ else
+ myconf="${myconf} --with-command-grp=apache"
+ fi
+
+ econf ${myconf} \
+ --prefix=/usr/nagios \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --datadir=/usr/nagios/share \
+ || die "./configure failed"
+
+ emake CC=$(tc-getCC) nagios || die "make failed"
+
+ if use !noweb ; then
+ # Only compile the CGI's if "noweb" useflag is not set.
+ make CC=$(tc-getCC) DESTDIR="${D}" cgis || die
+ fi
+
+ emake -C contrib all || "contrib make filed"
+
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING
+ docinto contrib
+ dodoc contrib/README
+
+ if use noweb; then
+ sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \
+ -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' \
+ Makefile
+ fi
+
+ sed -i -e 's/^contactgroups$//g' Makefile
+
+ make DESTDIR="${D}" install
+ make DESTDIR="${D}" install-config
+ make DESTDIR="${D}" install-commandmode
+
+ docinto sample-configs
+ dodoc "${D}"/etc/nagios/*
+ rm "${D}"/etc/nagios/*
+
+ newdoc ${WORKDIR}/nagios-2.0b.cfg-sample nagios.cfg-sample
+
+ #contribs are not configured by the configure script, we'll configure them overselves...
+ find "${S}"/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
+ s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
+ s:/usr/local/nagios/etc:/etc/nagios:;
+ s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
+
+ insinto /usr/share/doc/${PF}/contrib
+ doins -r contrib/eventhandlers
+
+ doinitd "${FILESDIR}"/nagios
+ newconfd "${FILESDIR}"/conf.d nagios
+
+ chmod 644 "${S}"/contrib/*.cgi
+ into /usr/nagios
+ for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
+ dobin "$bin"
+ done
+
+ # Apache Module
+ if use !noweb; then
+ insinto "${APACHE2_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/99_nagios.conf
+
+ if use perl; then
+ into /usr/nagios ; dosbin contrib/traceroute.cgi
+ fi
+ fi
+
+ for dir in etc/nagios var/nagios ; do
+ chown -R nagios:nagios "${D}/${dir}" || die "Failed chown of ${D}/${dir}"
+ done
+
+ chown -R root:root "${D}"/usr/nagios
+ find "${D}"/usr/nagios -type d -print0 | xargs -0 chmod 755
+ find "${D}"/usr/nagios/*bin -type f -print0 | xargs -0 chmod 755
+ find "${D}"/usr/nagios/share -type f -print0 | xargs -0 chmod 644
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /usr/nagios/share/ssi
+ keepdir /var/nagios/rw
+
+ if use noweb; then
+ chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ else
+ chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ fi
+
+ chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
+
+ cat << EOF > "${T}"/55-nagios-core-revdep
+SEARCH_DIRS="/usr/nagios/bin /usr/nagios/libexec"
+EOF
+
+ insinto /etc/revdep-rebuild
+ doins "${T}"/55-nagios-core-revdep
+}
+
+pkg_postinst() {
+ einfo
+ einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/."
+ einfo
+ einfo "Also, if you want nagios to start at boot time"
+ einfo "remember to execute:"
+ einfo " rc-update add nagios default"
+ einfo
+
+ if use !noweb; then
+ einfo "This does not include cgis that are perl-dependent"
+ einfo "Currently traceroute.cgi is perl-dependent"
+ einfo "To have ministatus.cgi requires copying of ministatus.c"
+ einfo "to cgi directory for compiling."
+
+ einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\""
+
+ einfo
+ einfo "That will make nagios's web front end visable via"
+ einfo "http://localhost/nagios/"
+ einfo
+ einfo "Note that the user your webserver is running at needs"
+ einfo "read-access to /etc/nagios. There are several possible"
+ einfo "solutions to accomplish this, choose the one you are"
+ einfo "most comfortable with:"
+ einfo " usermod -G nagios apache"
+ einfo "or"
+ einfo " chown nagios:apache /etc/nagios"
+
+ else
+ einfo "Please note that you have installed Nagios without web interface."
+ einfo "Please don't file any bugs about having no web interface when you do this."
+ einfo "Thank you!"
+ fi
+
+ einfo
+ einfo "If your kernel has /proc protection, nagios"
+ einfo "will not be happy as it relies on accessing the proc"
+ einfo "filesystem. You can fix this by adding nagios into"
+ einfo "the group wheel, but this is not recomended."
+ einfo
+
+ einfo
+ ewarn "Use /usr/nagios/bin/convertcfg for configuration file conversion"
+}
+
+pkg_prerm() {
+ /etc/init.d/nagios stop
+}
diff --git a/net-analyzer/nagios-core/nagios-core-3.0_beta4.ebuild b/net-analyzer/nagios-core/nagios-core-3.0_beta4.ebuild
new file mode 100644
index 0000000..4b5c907
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-3.0_beta4.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.9-r1.ebuild,v 1.4 2007/08/01 21:00:26 marineam Exp $
+
+inherit eutils apache-module toolchain-funcs
+
+MY_P=${PN/-core}-${PV/_beta/b}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ mirror://gentoo/nagios-2.0b.cfg-sample.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="apache lighttpd perl debug"
+# mysql postgres
+DEPEND="virtual/mailx
+ apache? (
+ ${NEED_APACHE_DEPEND}
+ >=media-libs/jpeg-6b-r3
+ >=media-libs/libpng-1.2.5-r4
+ >=media-libs/gd-1.8.3-r5
+ perl? ( net-analyzer/traceroute )
+ )
+ lighttpd? (
+ www-servers/lighttpd )
+ >=media-libs/jpeg-6b-r3
+ >=media-libs/libpng-1.2.5-r4
+ >=media-libs/gd-1.8.3-r5
+ perl? ( net-analyzer/traceroute )
+ perl? ( >=dev-lang/perl-5.6.1-r7 )
+ >=dev-libs/glib-2"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # Check if gd has been compiled with jpeg and png support
+ if use apache || lighttpd; then
+ if ! built_with_use media-libs/gd jpeg png; then
+ eerror "Your gd has been compiled without jpeg and/or png support."
+ eerror "Please re-emerge gd:"
+ eerror "# USE="jpeg png" emerge gd"
+ die "pkg_setup failed"
+ fi
+ fi
+
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/2.x-series-nsca.patch
+
+ local strip="$(echo '$(MAKE) strip-post-install')"
+ sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in"
+}
+
+src_compile() {
+ local myconf
+
+ if use perl
+ then
+ myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ fi
+
+ if use debug; then
+ myconf="${myconf} --enable-DEBUG0"
+ myconf="${myconf} --enable-DEBUG1"
+ myconf="${myconf} --enable-DEBUG2"
+ myconf="${myconf} --enable-DEBUG3"
+ myconf="${myconf} --enable-DEBUG4"
+ myconf="${myconf} --enable-DEBUG5"
+ fi
+
+ if use !apache && use !lighttpd ; then
+ myconf="${myconf} --with-command-grp=nagios"
+ else
+ if use apache ; then
+ myconf="${myconf} --with-command-grp=apache"
+ fi
+ if use lighttpd ; then
+ myconf="${myconf} --with-command-grp=lighttpd"
+ fi
+ fi
+
+ econf ${myconf} \
+ --prefix=/usr/nagios \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --datadir=/usr/nagios/share \
+ || die "./configure failed"
+
+ emake CC=$(tc-getCC) nagios || die "make failed"
+
+ if use apache || use lighttpd ; then
+ # Only compile the CGI's if "noweb" useflag is not set.
+ make CC=$(tc-getCC) DESTDIR="${D}" cgis || die
+ fi
+
+ emake -C contrib all || "contrib make filed"
+
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING
+ docinto contrib
+ dodoc contrib/README
+
+ if use !apache && use !lighttpd; then
+ sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to use flag/' \
+ -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to use flag/' \
+ Makefile
+ fi
+
+ sed -i -e 's/^contactgroups$//g' Makefile
+
+ make DESTDIR="${D}" install
+ make DESTDIR="${D}" install-config
+ make DESTDIR="${D}" install-commandmode
+
+# docinto sample-configs
+# dodoc "${D}"/etc/nagios/*
+# rm "${D}"/etc/nagios/*
+
+# newdoc ${WORKDIR}/nagios-2.0b.cfg-sample nagios.cfg-sample
+
+ #contribs are not configured by the configure script, we'll configure them overselves...
+ find "${S}"/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
+ s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
+ s:/usr/local/nagios/etc:/etc/nagios:;
+ s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
+
+ insinto /usr/share/doc/${PF}/contrib
+ doins -r contrib/eventhandlers
+
+ doinitd "${FILESDIR}"/nagios
+ newconfd "${FILESDIR}"/conf.d nagios
+
+ chmod 644 "${S}"/contrib/*.cgi
+ into /usr/nagios
+ for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
+ dobin "$bin"
+ done
+
+ # Apache Module
+ if use apache; then
+ insinto "${APACHE2_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/99_nagios.conf
+
+ if use perl; then
+ into /usr/nagios ; dosbin contrib/traceroute.cgi
+ fi
+ fi
+
+ # Lighttpd Module
+ if use lighttpd; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}/lighttpd_nagios.conf" nagios.conf
+ fi
+
+ for dir in etc/nagios var/nagios ; do
+ chown -R nagios:nagios "${D}/${dir}" || die "Failed chown of ${D}/${dir}"
+ done
+
+ chown -R root:root "${D}"/usr/nagios
+ find "${D}"/usr/nagios -type d -print0 | xargs -0 chmod 755
+ find "${D}"/usr/nagios/*bin -type f -print0 | xargs -0 chmod 755
+ find "${D}"/usr/nagios/share -type f -print0 | xargs -0 chmod 644
+
+ chown nagios:nagios "${D}"/var/nagios/spool/checkresults
+ chmod 640 "${D}"/var/nagios/spool/checkresults
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /usr/nagios/share/ssi
+ keepdir /var/nagios/rw
+ keepdir /var/nagios/spool/checkresults
+
+ if use !apache && use !lighttpd; then
+ chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ else
+ if use apache ; then
+ chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ fi
+ if use lighttpd ; then
+ chown -R nagios:lighttpd "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ fi
+ fi
+
+ chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
+
+ cat << EOF > "${T}"/55-nagios-core-revdep
+SEARCH_DIRS="/usr/nagios/bin /usr/nagios/libexec"
+EOF
+
+ insinto /etc/revdep-rebuild
+ doins "${T}"/55-nagios-core-revdep
+}
+
+pkg_postinst() {
+ einfo
+ einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/."
+ einfo
+ einfo "Also, if you want nagios to start at boot time"
+ einfo "remember to execute:"
+ einfo " rc-update add nagios default"
+ einfo
+
+ if use !apache || use !lighttpd; then
+ einfo "This does not include cgis that are perl-dependent"
+ einfo "Currently traceroute.cgi is perl-dependent"
+ einfo "To have ministatus.cgi requires copying of ministatus.c"
+ einfo "to cgi directory for compiling."
+
+ einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\""
+
+ einfo
+ einfo "That will make nagios's web front end visable via"
+ einfo "http://localhost/nagios/"
+ einfo
+ einfo "Note that the user your webserver is running at needs"
+ einfo "read-access to /etc/nagios. There are several possible"
+ einfo "solutions to accomplish this, choose the one you are"
+ einfo "most comfortable with:"
+ einfo " usermod -G nagios apache"
+ einfo "or"
+ einfo " chown nagios:apache /etc/nagios"
+
+ else
+ einfo "Please note that you have installed Nagios without web interface."
+ einfo "Please don't file any bugs about having no web interface when you do this."
+ einfo "Thank you!"
+ fi
+
+ einfo
+ einfo "If your kernel has /proc protection, nagios"
+ einfo "will not be happy as it relies on accessing the proc"
+ einfo "filesystem. You can fix this by adding nagios into"
+ einfo "the group wheel, but this is not recomended."
+ einfo
+
+ einfo
+ ewarn "Use /usr/nagios/bin/convertcfg for configuration file conversion"
+}
+
+pkg_prerm() {
+ /etc/init.d/nagios stop
+}
diff --git a/net-analyzer/nagios/Manifest b/net-analyzer/nagios/Manifest
new file mode 100644
index 0000000..293d362
--- /dev/null
+++ b/net-analyzer/nagios/Manifest
@@ -0,0 +1,21 @@
+EBUILD nagios-1.4.1.ebuild 857 RMD160 582c4f723cf4d9f264ea4885b65bc2fc566da93b SHA1 67334be000cb244ef0aefc9db2b6ee4759138d81 SHA256 34e8745216b56cb2703528096caecf9b92915ee2a3a16dc0313e63f979d359d7
+MD5 3b21751bed975a8d92ecdd65b873bf91 nagios-1.4.1.ebuild 857
+RMD160 582c4f723cf4d9f264ea4885b65bc2fc566da93b nagios-1.4.1.ebuild 857
+SHA256 34e8745216b56cb2703528096caecf9b92915ee2a3a16dc0313e63f979d359d7 nagios-1.4.1.ebuild 857
+EBUILD nagios-2.9.ebuild 862 RMD160 09641bbe8a1c4b7ebea59f20b229343e2aa76e67 SHA1 ebf093d56dab449cd9b9c506e9be3ca104b7e793 SHA256 a919dc8512a0b063ed57a95d08fb5b66fdb37f73b0c77579269514f4e1d9d63d
+MD5 50b6dd8d07f0941481e4ef6ff59dcae5 nagios-2.9.ebuild 862
+RMD160 09641bbe8a1c4b7ebea59f20b229343e2aa76e67 nagios-2.9.ebuild 862
+SHA256 a919dc8512a0b063ed57a95d08fb5b66fdb37f73b0c77579269514f4e1d9d63d nagios-2.9.ebuild 862
+EBUILD nagios-3.0_beta4.ebuild 862 RMD160 09641bbe8a1c4b7ebea59f20b229343e2aa76e67 SHA1 ebf093d56dab449cd9b9c506e9be3ca104b7e793 SHA256 a919dc8512a0b063ed57a95d08fb5b66fdb37f73b0c77579269514f4e1d9d63d
+MD5 50b6dd8d07f0941481e4ef6ff59dcae5 nagios-3.0_beta4.ebuild 862
+RMD160 09641bbe8a1c4b7ebea59f20b229343e2aa76e67 nagios-3.0_beta4.ebuild 862
+SHA256 a919dc8512a0b063ed57a95d08fb5b66fdb37f73b0c77579269514f4e1d9d63d nagios-3.0_beta4.ebuild 862
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-nagios-1.4.1 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-nagios-1.4.1 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-nagios-1.4.1 0
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-nagios-2.9 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-nagios-2.9 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-nagios-2.9 0
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-nagios-3.0_beta4 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-nagios-3.0_beta4 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-nagios-3.0_beta4 0
diff --git a/net-analyzer/nagios/files/digest-nagios-1.4.1 b/net-analyzer/nagios/files/digest-nagios-1.4.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/net-analyzer/nagios/files/digest-nagios-1.4.1
diff --git a/net-analyzer/nagios/files/digest-nagios-2.9 b/net-analyzer/nagios/files/digest-nagios-2.9
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/net-analyzer/nagios/files/digest-nagios-2.9
diff --git a/net-analyzer/nagios/files/digest-nagios-3.0_beta4 b/net-analyzer/nagios/files/digest-nagios-3.0_beta4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/net-analyzer/nagios/files/digest-nagios-3.0_beta4
diff --git a/net-analyzer/nagios/nagios-1.4.1.ebuild b/net-analyzer/nagios/nagios-1.4.1.ebuild
new file mode 100644
index 0000000..e3503f4
--- /dev/null
+++ b/net-analyzer/nagios/nagios-1.4.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios/nagios-1.4.1.ebuild,v 1.5 2007/05/01 18:02:19 genone Exp $
+
+DESCRIPTION="The Nagios metapackage - merge this to pull install all of the nagios packages"
+HOMEPAGE="http://www.nagios.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND=">=net-analyzer/nagios-core-${PV}
+ >=net-analyzer/nagios-plugins-1.3.1
+ >=net-analyzer/nagios-nrpe-1.8
+ >=net-analyzer/nagios-nsca-2.3
+ >=net-analyzer/nagios-imagepack-1.0"
+
+pkg_postrm() {
+
+ elog "Note: this is a META ebuild for ${P}."
+ elog "to remove it completely or before re-emerging"
+ elog "either use 'depclean', or remove/re-emerge these packages:"
+ elog
+ for dep in ${RDEPEND}; do
+ elog " ${dep}"
+ done
+ echo
+
+}
diff --git a/net-analyzer/nagios/nagios-2.9.ebuild b/net-analyzer/nagios/nagios-2.9.ebuild
new file mode 100644
index 0000000..c8f6581
--- /dev/null
+++ b/net-analyzer/nagios/nagios-2.9.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios/nagios-2.9.ebuild,v 1.2 2007/07/11 23:49:24 mr_bones_ Exp $
+
+DESCRIPTION="The Nagios metapackage - merge this to pull install all of the
+nagios packages"
+HOMEPAGE="http://www.nagios.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="~net-analyzer/nagios-core-${PV}
+ >=net-analyzer/nagios-plugins-1.4
+ >=net-analyzer/nagios-nrpe-1.8
+ >=net-analyzer/nagios-nsca-2.3
+ >=net-analyzer/nagios-imagepack-1.0"
+
+pkg_postrm() {
+ elog "Note: this is a META ebuild for ${P}."
+ elog "to remove it completely or before re-emerging"
+ elog "either use 'depclean', or remove/re-emerge these packages:"
+ elog
+ for dep in ${RDEPEND}; do
+ elog " ${dep}"
+ done
+ echo
+}
diff --git a/net-analyzer/nagios/nagios-3.0_beta4.ebuild b/net-analyzer/nagios/nagios-3.0_beta4.ebuild
new file mode 100644
index 0000000..c8f6581
--- /dev/null
+++ b/net-analyzer/nagios/nagios-3.0_beta4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios/nagios-2.9.ebuild,v 1.2 2007/07/11 23:49:24 mr_bones_ Exp $
+
+DESCRIPTION="The Nagios metapackage - merge this to pull install all of the
+nagios packages"
+HOMEPAGE="http://www.nagios.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="~net-analyzer/nagios-core-${PV}
+ >=net-analyzer/nagios-plugins-1.4
+ >=net-analyzer/nagios-nrpe-1.8
+ >=net-analyzer/nagios-nsca-2.3
+ >=net-analyzer/nagios-imagepack-1.0"
+
+pkg_postrm() {
+ elog "Note: this is a META ebuild for ${P}."
+ elog "to remove it completely or before re-emerging"
+ elog "either use 'depclean', or remove/re-emerge these packages:"
+ elog
+ for dep in ${RDEPEND}; do
+ elog " ${dep}"
+ done
+ echo
+}