summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/nagvis
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/nagvis')
-rw-r--r--net-analyzer/nagvis/Manifest1
-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.xml13
-rw-r--r--net-analyzer/nagvis/nagvis-1.6.6.ebuild91
5 files changed, 148 insertions, 0 deletions
diff --git a/net-analyzer/nagvis/Manifest b/net-analyzer/nagvis/Manifest
new file mode 100644
index 00000000000..76187738df8
--- /dev/null
+++ b/net-analyzer/nagvis/Manifest
@@ -0,0 +1 @@
+DIST nagvis-1.6.6.tar.gz 3430714 SHA256 8aefe17ea7f43839fd5db4063fbac96eeedddbdcdf3789f4a75e9ca51c2833a8 SHA512 e5858b185dd5d31fc8d414df5b3464941769249ce582b10e155e89ba7aa0c45724550c44de9d7bfb23b96caa737e519f320e45050126feb94593cca2bfc583cb WHIRLPOOL 8af9d6c86ec84cc3630d0d93cd6cc55d2687a8b55f0f3b6eb2cadf946580af3a314daae9d5055ca41fd62f27fe06e188c9c319b42bd9118a1a6976815f2e18ad
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 00000000000..771076c4eaa
--- /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 00000000000..9786b970179
--- /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 00000000000..13794622b8f
--- /dev/null
+++ b/net-analyzer/nagvis/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <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 00000000000..35731f314f4
--- /dev/null
+++ b/net-analyzer/nagvis/nagvis-1.6.6.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils depend.apache
+
+DESCRIPTION="NagVis is a visualization addon for the well known 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"
+}