summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2017-07-13 01:47:41 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2017-08-20 20:13:28 +0100
commite164c5adf3e59fa7a7bac516de24c897769f280a (patch)
treedac509674628fb750cf4ac299b547dc8ae822c84 /net-analyzer
parentmedia-gfx/wkhtmltopdf: Import from vanilla and make it depend on recommanded ... (diff)
downloadportage-e164c5adf3e59fa7a7bac516de24c897769f280a.tar.xz
net-analyzer/ndoutils: Version bump
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ndoutils/Manifest1
-rw-r--r--net-analyzer/ndoutils/files/ndo2db.init-nagios324
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-2.1.3-asprintf.patch10
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-2.1.3-sleep.patch10
-rw-r--r--net-analyzer/ndoutils/metadata.xml11
-rw-r--r--net-analyzer/ndoutils/ndoutils-2.1.3.ebuild66
6 files changed, 122 insertions, 0 deletions
diff --git a/net-analyzer/ndoutils/Manifest b/net-analyzer/ndoutils/Manifest
new file mode 100644
index 00000000..c6eecaf5
--- /dev/null
+++ b/net-analyzer/ndoutils/Manifest
@@ -0,0 +1 @@
+DIST ndoutils-2.1.3.tar.gz 2182958 SHA256 8f0bcc098e5098b8c048c42000fc08c17b36d8bb3cc4fb6972b7b8e8edfa91b7 WHIRLPOOL b10611680f20b9fc7c805580d0facead334bbc95543d7f705323efaf7a55b9341a201f21d39f30a884fb7bf9a3a558c8e5976474e10b00792a553480cad5c20c
diff --git a/net-analyzer/ndoutils/files/ndo2db.init-nagios3 b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
new file mode 100644
index 00000000..66f0f621
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depends() {
+ before nagios
+ need mysql
+}
+
+start() {
+ ebegin "Starting ndo2db"
+ if [ -S /var/nagios/ndo.sock ] ; then
+ rm -f /var/nagios/ndo.sock
+ fi
+ start-stop-daemon --start --quiet --exec /usr/bin/ndo2db \
+ -- -c /etc/nagios/ndo2db.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ndo2db"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ndo2db
+ eend $?
+}
diff --git a/net-analyzer/ndoutils/files/ndoutils-2.1.3-asprintf.patch b/net-analyzer/ndoutils/files/ndoutils-2.1.3-asprintf.patch
new file mode 100644
index 00000000..146132c2
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-2.1.3-asprintf.patch
@@ -0,0 +1,10 @@
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -9,6 +9,7 @@
+ #ifndef _CONFIG_H
+ #define _CONFIG_H
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+
diff --git a/net-analyzer/ndoutils/files/ndoutils-2.1.3-sleep.patch b/net-analyzer/ndoutils/files/ndoutils-2.1.3-sleep.patch
new file mode 100644
index 00000000..61694bae
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-2.1.3-sleep.patch
@@ -0,0 +1,10 @@
+--- a/src/queue.c
++++ b/src/queue.c
+@@ -8,6 +8,7 @@
+ #include "../include/queue.h"
+ #include <errno.h>
+ #include <time.h>
++#include <unistd.h> /* sleep() */
+
+ #define RETRY_LOG_INTERVAL 600 /* Seconds */
+ #define MAX_RETRIES 20 /* Max number of times to retry sending message */
diff --git a/net-analyzer/ndoutils/metadata.xml b/net-analyzer/ndoutils/metadata.xml
new file mode 100644
index 00000000..325efab1
--- /dev/null
+++ b/net-analyzer/ndoutils/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ndoutils/ndoutils-2.1.3.ebuild b/net-analyzer/ndoutils/ndoutils-2.1.3.ebuild
new file mode 100644
index 00000000..0533921c
--- /dev/null
+++ b/net-analyzer/ndoutils/ndoutils-2.1.3.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils user
+
+MY_P=${P/_beta/b}
+
+DESCRIPTION="Nagios addon to store Nagios data in a MySQL database"
+HOMEPAGE="https://www.nagios.org"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+
+DEPEND="dev-perl/DBD-mysql
+ dev-perl/DBI
+ virtual/mysql"
+RDEPEND="${DEPEND}
+ >=net-analyzer/nagios-core-3.0"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-asprintf.patch
+ "${FILESDIR}"/${P}-sleep.patch
+)
+
+DOCS=(
+ 'docs/NDOUTILS DB Model.pdf'
+ 'docs/NDOUtils Documentation.pdf'
+ Changelog
+ README
+ REQUIREMENTS
+ TODO
+ UPGRADING
+)
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/nagios \
+ --enable-mysql
+}
+
+src_compile() {
+ emake all
+}
+
+src_install() {
+ default
+ emake DESTDIR="${ED}" install-config
+
+ newinitd "${FILESDIR}"/ndo2db.init-nagios3 ndo2db
+}
+
+pkg_postinst() {
+ elog "To include NDO in your Nagios setup you'll need to activate the NDO broker module"
+ elog "in /etc/nagios/nagios.cfg:"
+ elog "\tbroker_module=/usr/bin/ndomod.o config_file=/etc/nagios/ndomod.cfg"
+}