summaryrefslogtreecommitdiff
path: root/net-analyzer/nsca
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nsca')
-rw-r--r--net-analyzer/nsca/Manifest3
-rw-r--r--net-analyzer/nsca/files/nsca.service12
-rw-r--r--net-analyzer/nsca/nsca-2.9.2.ebuild65
3 files changed, 80 insertions, 0 deletions
diff --git a/net-analyzer/nsca/Manifest b/net-analyzer/nsca/Manifest
new file mode 100644
index 0000000..8f3d1af
--- /dev/null
+++ b/net-analyzer/nsca/Manifest
@@ -0,0 +1,3 @@
+AUX nsca.service 201 BLAKE2B 2c1833d255b757891d72fd358a5e0c064475a4ca8b77c5961123e9dfe5cde1217cf675b1daf307a8bc1e5930900588c1ce233ff80765b4cb98a9b7b7c9441619 SHA512 b97e45b4ba6ed09cfc905920ebb7078e705ad54049c3032427a419cb0d7b29026b77b3be113331b5e44d19a4460b6b77374fa559080ac4d0e558b36211e6a1dc
+DIST nsca-2.9.2.tar.gz 117299 BLAKE2B 512ecf540d6c89072ea4b0653547150a724281901ae52a012b65c8d7aadeebeae8ae74fa8094113a106b2515111aea01ecf3deb245ef612014bbdd128a05e862 SHA512 a1efbb1c16d5cbfb656ba69305a089282c4de08f5d4cdbcdc499b31975bb690ddfb01c51c61a1e3c0eeb47aa91e97010bcf305c9dda07b45e8f0022c966baff8
+EBUILD nsca-2.9.2.ebuild 1366 BLAKE2B 78a0173f54ce0b959e2ae14223b9108fd0b3fd7a1cf28a1420a7087434684d8df797c74e53a10f0b1705ab9836c2b8d68c0216aae6c7a5272a1e29fdf3d17cca SHA512 707741281d76c908d120e7aebfb3f7f9efa81730228153768e502a3be6ff9210366a66d1f6d29678afc5ffe735084219fe2a90e22df13c815263b3a2302f2822
diff --git a/net-analyzer/nsca/files/nsca.service b/net-analyzer/nsca/files/nsca.service
new file mode 100644
index 0000000..11c8db1
--- /dev/null
+++ b/net-analyzer/nsca/files/nsca.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Nagios Service Check Acceptor
+
+[Service]
+Type=forking
+Restart=always
+ExecStart=/usr/libexec/nsca -c /etc/nagios/nsca.cfg
+PIDFile=/run/nsca.pid
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-analyzer/nsca/nsca-2.9.2.ebuild b/net-analyzer/nsca/nsca-2.9.2.ebuild
new file mode 100644
index 0000000..a9fa17b
--- /dev/null
+++ b/net-analyzer/nsca/nsca-2.9.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib user eutils systemd
+
+DESCRIPTION="Nagios Service Check Acceptor"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ppc ppc64 sparc x86"
+IUSE="tcpd +crypt minimal"
+
+DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 )
+ !minimal? (
+ acct-group/nagios
+ acct-user/nagios
+ tcpd? ( sys-apps/tcp-wrappers ) )"
+
+RDEPEND="${DEPEND}
+ !minimal? ( net-analyzer/nagios )"
+
+src_configure() {
+ use tcpd || export ac_cv_lib_wrap_main=no
+ use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false
+
+ econf \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nsca-user=nagios \
+ --with-nsca-grp=nagios
+}
+
+src_compile() {
+ emake -C src send_nsca $(use minimal || echo nsca)
+}
+
+src_install() {
+ dodoc LEGAL Changelog README SECURITY
+
+ dobin src/send_nsca
+
+ insinto /etc/nagios
+ doins "${S}"/sample-config/send_nsca.cfg
+
+ if ! use minimal; then
+ exeinto /usr/libexec
+ doexe src/nsca
+
+ insinto /etc/nagios
+ doins "${S}"/sample-config/nsca.cfg
+
+ systemd_dounit ${FILESDIR}/nsca.service
+ fi
+}
+
+pkg_postinst() {
+ if ! use minimal; then
+ elog "If you are using the nsca daemon, remember to edit"
+ elog "the config file /etc/nagios/nsca.cfg"
+ fi
+}