summaryrefslogtreecommitdiff
path: root/net-analyzer/nagvis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/nagvis
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/nagvis')
-rw-r--r--net-analyzer/nagvis/Manifest7
-rw-r--r--net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch13
-rw-r--r--net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch30
-rw-r--r--net-analyzer/nagvis/metadata.xml11
-rw-r--r--net-analyzer/nagvis/nagvis-1.6.6.ebuild90
5 files changed, 151 insertions, 0 deletions
diff --git a/net-analyzer/nagvis/Manifest b/net-analyzer/nagvis/Manifest
new file mode 100644
index 000000000000..7186fa5ce57b
--- /dev/null
+++ b/net-analyzer/nagvis/Manifest
@@ -0,0 +1,7 @@
+AUX nagvis-1.6.6-base-path.patch 799 SHA256 6b82254353595a8aab86bb65b46da0c7d7cfe1b15f69387f039a6049616c6a09 SHA512 54476998b1bf0b8ce25691fff558e3faa0aefaa4c1ba5d9804e809ae862f79cb96ea87fb7368a1100282bbc8d1f89902f8b4bca397df1ea24a840996889de1e0 WHIRLPOOL 01be41d6194945804f7e59401c9ddd703a1f10d9bbbf8b68762bcfa9587d7b6fa93d53c7caced4a33446fd402036305bb5b245c557d62d8e4f19ae3538f87335
+AUX nagvis-1.6.6-global-definitions.patch 1177 SHA256 dbfa2b300ffdf5fb3b8f48b7b5f0f9a577cff816b6323e2489456c6a9767f1ff SHA512 26d53a48852082010c660280ffef786a8713a02ba675b4b455de48c65136816772c8012ead282bd8da879b1696bf811e4ef091765cc3014d5b2fb1445166c79d WHIRLPOOL 75584f403eccbdc84e0a403e96891285e0bd3e1b14f05299fd2190b249e5ca357b8a037c760276c87466b197530d5ae97d7cf6c3710a9552f0d1e836704241a9
+DIST nagvis-1.6.6.tar.gz 3430714 SHA256 8aefe17ea7f43839fd5db4063fbac96eeedddbdcdf3789f4a75e9ca51c2833a8 SHA512 e5858b185dd5d31fc8d414df5b3464941769249ce582b10e155e89ba7aa0c45724550c44de9d7bfb23b96caa737e519f320e45050126feb94593cca2bfc583cb WHIRLPOOL 8af9d6c86ec84cc3630d0d93cd6cc55d2687a8b55f0f3b6eb2cadf946580af3a314daae9d5055ca41fd62f27fe06e188c9c319b42bd9118a1a6976815f2e18ad
+EBUILD nagvis-1.6.6.ebuild 2768 SHA256 63c201f69d2cda4d5fb8c7c8d06a1d50f27c0498f5903e2b6d4c716ffc3d0d5c SHA512 25566b1c0bcf9a097614001652588b174c88312aa12fec7b47be1171be5e08a095387fab6da7f250cfc31791be3e124ded3aa9d84a3330b2073608138e7ce24f WHIRLPOOL 45dd6a3146856df17cba62d13bf67259f9a210b6aa8d7f5716af3181b3806401f39f316b6a193db1f2f6ec530d084f11c6e9d81095fb970f0057aece850c37a2
+MISC ChangeLog 2610 SHA256 6dac0f57a50a48e08e954db8b7872b62591775230e4b3b6a64d9af6d69cb19e0 SHA512 d48a940f07a9200bcbe548fcf172c65365cd0c1af830a9fe9f73c0c1579c144860bbf1e06d1add63846db83fa5958963a229e03f3abe24036228d63d33a7e96e WHIRLPOOL 75013729c071b9c9b8be5ee56b3720b00c3bfd6ed5d74c53820b17e469d6d84203b025f4364efdf98ed807037efa05166a276941470e25f354d701ee235ef8fd
+MISC ChangeLog-2015 2698 SHA256 751354c703c0bd5bf866c7d9d4ed22a90da1bbabf2479bb4430d7a0a34317c64 SHA512 eabd677eca63730035756601ac8083b80fc36cfe12bc693a5b5b98bf8ef7f50b143767c9f7bc9b7bf4d577a152328947384ea05decf299b8cdbc17d16e7a1815 WHIRLPOOL 02e76b4b307f2ecd3e21f9252bac058e1a2594577bdd13b49ee9e7729798f29f3d60478021623b179d15cbb7fba113eef55826252bd896c84639a90b5da042d3
+MISC metadata.xml 365 SHA256 7b75923bdeebd1b276c680f5554303d783db0bd8321c846fdc1b1ac592c071f1 SHA512 3c0b10ae339027a59540557329d0a0316d6f82c791a6f915d06e6b19f7c12e26145e08845b9eb901d5fb2ca460953c6625978a701b552bc559f30a7eca0e18fd WHIRLPOOL 4a3c3d97fe801a7f196065132cd15919ee1bb49e837ff0dad688043ee2a2cde63134c380c20aecae413d98dda0c45287702e335b1c125ce53a81429bf2c06508
diff --git a/net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch b/net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch
new file mode 100644
index 000000000000..771076c4eaa7
--- /dev/null
+++ b/net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch
@@ -0,0 +1,13 @@
+--- a/share/server/core/classes/GlobalMainCfg.php 2012-05-31 11:14:23.000000000 -0400
++++ b/share/server/core/classes/GlobalMainCfg.php 2012-05-31 11:17:10.000000000 -0400
+@@ -1215,8 +1215,8 @@
+ * @author Roman Kyrylych <rkyrylych@op5.com>
+ */
+ private function getBasePath() {
+- // Go 3 levels up from nagvis/share/nagvis to nagvis base path
+- return realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../../..') . '/';
++ // Go 2 levels up from share/nagvis to nagvis base path
++ return realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../..') . '/';
+ // Note: the method below causes problems when <docroot>/nagvis is a symlink to <nagvis-base>/share
+ // return realpath(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])))).'/';
+ }
diff --git a/net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch b/net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch
new file mode 100644
index 000000000000..9786b970179f
--- /dev/null
+++ b/net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch
@@ -0,0 +1,30 @@
+--- a/share/server/core/defines/global.php 2012-05-13 05:44:27.000000000 -0400
++++ b/share/server/core/defines/global.php 2012-05-31 11:20:39.000000000 -0400
+@@ -64,7 +64,7 @@
+ define('DEBUGLEVEL', 6);
+
+ // Path to the debug file
+-define('DEBUGFILE', '../../../var/nagvis-debug.log');
++define('DEBUGFILE', '../../var/nagvis-debug.log');
+
+ // It is possible to define a conf.d directory for splitting the main
+ // configuration in several files. Only the values defined in the CONST_MAINCFG
+@@ -78,14 +78,14 @@
+ // The last value wins.
+ //
+ // Path to the main configuration file
+-define('CONST_MAINCFG', '../../../etc/nagvis.ini.php');
+-define('CONST_MAINCFG_CACHE', '../../../var/nagvis-conf');
++define('CONST_MAINCFG', '../../etc/nagvis.ini.php');
++define('CONST_MAINCFG_CACHE', '../../var/nagvis-conf');
+
+ // Path to the main configuration conf.d directory
+-define('CONST_MAINCFG_DIR', '../../../etc/conf.d');
++define('CONST_MAINCFG_DIR', '../../etc/conf.d');
+
+ // The directory below the NagVis root which is shared by the webserver
+-define('HTDOCS_DIR', 'share');
++define('HTDOCS_DIR', '');
+
+ // Needed minimal PHP version
+ define('CONST_NEEDED_PHP_VERSION', '5.0');
diff --git a/net-analyzer/nagvis/metadata.xml b/net-analyzer/nagvis/metadata.xml
new file mode 100644
index 000000000000..03cfbae2f915
--- /dev/null
+++ b/net-analyzer/nagvis/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-needed -->
+ <use>
+ <flag name="automap">Enable automated map generation using <pkg>media-gfx/graphviz</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nagvis</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagvis/nagvis-1.6.6.ebuild b/net-analyzer/nagvis/nagvis-1.6.6.ebuild
new file mode 100644
index 000000000000..19ce16533ff7
--- /dev/null
+++ b/net-analyzer/nagvis/nagvis-1.6.6.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils depend.apache
+
+DESCRIPTION="Visualization addon for the network managment system Nagios"
+HOMEPAGE="http://www.nagvis.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="apache2 automap"
+
+DEPEND="virtual/httpd-php"
+RDEPEND="|| ( net-analyzer/nagios net-analyzer/icinga )
+ automap? ( >=media-gfx/graphviz-2.14 )
+ apache2? ( dev-lang/php[apache2] )
+ net-analyzer/mk-livestatus
+ dev-lang/php[gd,nls,json,session,pdo,sqlite,sockets,mysql,unicode,xml]
+ virtual/httpd-php:*"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-base-path.patch
+ epatch "${FILESDIR}"/${P}-global-definitions.patch
+ grep -Rl "/usr/local" "${S}"/* | xargs sed -i s:/usr/local:/usr:g ||die
+ sed -i s:@NAGVIS_WEB@:/nagvis:g "${S}"/etc/apache2-nagvis.conf-sample ||die
+ sed -i s:@NAGVIS_PATH@:/usr/share/nagvis/:g "${S}"/etc/apache2-nagvis.conf-sample ||die
+ sed -i s:/usr/nagios/var/rw/live:/var/nagios/rw/live:g "${S}"/etc/nagvis.ini.php-sample ||die
+}
+
+src_install() {
+ dodoc README INSTALL
+
+ insinto /usr/share/nagvis
+ doins -r share/{config.php,index.php,frontend,netmap,server,userfiles}
+ doins -r docs
+
+ diropts -o apache -g root
+ dodir /var/nagvis/tmpl/{cache,compile}
+ diropts
+ dosym /var/nagvis /usr/share/nagvis/var
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins etc/apache2-nagvis.conf-sample 98_${PN}.conf
+ fi
+
+ insinto /etc/nagvis
+ doins -r etc/{conf.d,automaps,geomap,.htaccess,nagvis.ini.php-sample}
+ fowners apache:root /etc/nagvis
+ fperms 0664 /etc/nagvis/nagvis.ini.php-sample
+ dosym /etc/nagvis /usr/share/nagvis/etc
+
+ diropts -o apache -g root -m0775
+ insopts -o apache -g root -m0664
+ doins -r etc/maps
+ diropts
+ insopts
+
+ # move image maps dir from usr to var and symlink it back
+ dodir /var/nagvis/userfiles/images
+ mv "${D}"/usr/share/nagvis/userfiles/images/maps "${D}"/var/nagvis/userfiles/images/ ||die
+ fowners apache:root /var/nagvis/userfiles/images/maps
+ dosym /var/nagvis/userfiles/images/maps /usr/share/nagvis/userfiles/images/maps
+}
+
+pkg_postinst() {
+ elog "Before running NagVis for the first time, you will need to set up"
+ elog "/etc/nagvis/nagvis.ini.php"
+ elog "A sample is in"
+ elog "/etc/nagvis/nagvis.ini.php-sample"
+ if use apache2 ; then
+ elog
+ elog "For web interface make sure to add -D NAGVIS to APACHE2_OPTS in"
+ elog "/etc/conf.d/apache2 and to restart apache2. A default configuration"
+ elog "has been placed at /etc/apache2/modules.d/98_${PN}.conf"
+ fi
+ elog ""
+ elog "Default user/password are: nagiosadmin/nagiosadmin"
+ elog " guest/guest"
+}