summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2013-02-27 20:44:11 +0000
committerChristian Ruppert <idl0r@gentoo.org>2013-02-27 20:44:11 +0000
commit74238c414c1692087649d83eccdc81343e459118 (patch)
tree28695d726cd694f608cf1f04b01d2e6bd4a7bcbe /net-analyzer/nagstamon
parentReplace patch with simpler version, submitted upstream. (diff)
downloadgentoo-2-74238c414c1692087649d83eccdc81343e459118.tar.gz
gentoo-2-74238c414c1692087649d83eccdc81343e459118.tar.bz2
gentoo-2-74238c414c1692087649d83eccdc81343e459118.zip
Version bump
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)
Diffstat (limited to 'net-analyzer/nagstamon')
-rw-r--r--net-analyzer/nagstamon/ChangeLog8
-rw-r--r--net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch73
-rw-r--r--net-analyzer/nagstamon/nagstamon-0.9.10_p20130222.ebuild77
3 files changed, 157 insertions, 1 deletions
diff --git a/net-analyzer/nagstamon/ChangeLog b/net-analyzer/nagstamon/ChangeLog
index 7ac61de20872..4b746d4464c4 100644
--- a/net-analyzer/nagstamon/ChangeLog
+++ b/net-analyzer/nagstamon/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-analyzer/nagstamon
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/ChangeLog,v 1.36 2013/02/25 20:45:24 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/ChangeLog,v 1.37 2013/02/27 20:44:10 idl0r Exp $
+
+*nagstamon-0.9.10_p20130222 (27 Feb 2013)
+
+ 27 Feb 2013; Christian Ruppert <idl0r@gentoo.org>
+ +nagstamon-0.9.10_p20130222.ebuild, +files/nagstamon-0.9.10_p20130222.patch:
+ Version bump
25 Feb 2013; Christian Ruppert <idl0r@gentoo.org> nagstamon-0.9.9.ebuild,
nagstamon-0.9.9-r1.ebuild:
diff --git a/net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch b/net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch
new file mode 100644
index 000000000000..ca97c101d7cc
--- /dev/null
+++ b/net-analyzer/nagstamon/files/nagstamon-0.9.10_p20130222.patch
@@ -0,0 +1,73 @@
+From a0c44eac2a152291e2ce04bb7c320da896c77af2 Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@gentoo.org>
+Date: Tue, 26 Feb 2013 22:59:21 +0100
+Subject: [PATCH] Fix BeautifulSoup import
+
+
+Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
+---
+ Nagstamon/Nagstamon/Server/Ninja.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Nagstamon/Nagstamon/Server/Ninja.py b/Nagstamon/Nagstamon/Server/Ninja.py
+index dd53cbe..4cee123 100644
+--- a/Nagstamon/Nagstamon/Server/Ninja.py
++++ b/Nagstamon/Nagstamon/Server/Ninja.py
+@@ -13,7 +13,7 @@ import cookielib
+ from Nagstamon import Actions
+ from Nagstamon.Objects import *
+ from Nagstamon.Server.Generic import GenericServer, not_empty
+-from Nagstamon.BeautifulSoup import BeautifulSoup
++from BeautifulSoup import BeautifulSoup
+
+ class NinjaServer(GenericServer):
+ """
+--
+1.7.12.4
+
+diff --git a/Nagstamon/nagstamon.py b/Nagstamon/nagstamon.py
+index 2206db5..66da87e 100755
+--- a/Nagstamon/nagstamon.py
++++ b/Nagstamon/nagstamon.py
+@@ -33,40 +33,7 @@ conf.Convert_Conf_to_Multiple_Servers()
+ conf.Convert_Conf_to_Custom_Actions()
+
+ # try to get resources path if nagstamon got be installed by setup.py
+-Resources = ""
+-try:
+- import pkg_resources
+- Resources = pkg_resources.resource_filename("Nagstamon", "resources")
+-except Exception, err:
+- # get resources directory from current directory - only if not being set before by pkg_resources
+- # try-excepts necessary for platforms like Windows .EXE
+- join = os.path.join
+- normcase = os.path.normcase
+- paths_to_check = [normcase(join(os.getcwd(), "Nagstamon", "resources")),
+- normcase(join(os.getcwd(), "resources"))]
+- try:
+- # if resources dir is not available in CWD, try the
+- # libs dir (site-packages) for the current Python
+- from distutils.sysconfig import get_python_lib
+- paths_to_check.append(normcase(join(get_python_lib(), "Nagstamon", "resources")))
+- except:
+- pass
+-
+- #if we're still out of luck, maybe this was a user scheme install
+- try:
+- import site
+- site.getusersitepackages() #make sure USER_SITE is set
+- paths_to_check.append(normcase(join(site.USER_SITE, "Nagstamon", "resources")))
+- except:
+- pass
+-
+- # add directory nagstamon.py where nagstamon.py resides for cases like 0install without installed pkg-resources
+- paths_to_check.append(os.sep.join(sys.argv[0].split(os.sep)[:-1] + ["Nagstamon", "resources"]))
+-
+- for path in paths_to_check:
+- if os.path.exists(path):
+- Resources = path
+- break
++Resources = "/usr/share/nagstamon/resources"
+
+ # initialize GUI and actions
+ # if modules are not available from central python install try the ones in the same directory
diff --git a/net-analyzer/nagstamon/nagstamon-0.9.10_p20130222.ebuild b/net-analyzer/nagstamon/nagstamon-0.9.10_p20130222.ebuild
new file mode 100644
index 000000000000..aa0695ec43da
--- /dev/null
+++ b/net-analyzer/nagstamon/nagstamon-0.9.10_p20130222.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/nagstamon-0.9.10_p20130222.ebuild,v 1.1 2013/02/27 20:44:10 idl0r Exp $
+
+EAPI="5"
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit eutils python
+
+MY_P="${PN}_${PV/_/-}"
+MY_PN="Nagstamon"
+
+DESCRIPTION="Nagstamon is a Nagios status monitor for a systray and displays a realtime status of a Nagios box"
+HOMEPAGE="http://nagstamon.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnome sound"
+
+DEPEND=""
+RDEPEND="dev-python/pygobject:2
+ dev-python/pygtk
+ dev-python/lxml
+ dev-python/beautifulsoup:python-2
+ gnome-base/librsvg
+ gnome? ( dev-python/egg-python )
+ sound? ( media-sound/sox )"
+
+S="${WORKDIR}/Nagstamon"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}.patch"
+
+ python_convert_shebangs 2 nagstamon.py
+
+ rm Nagstamon/resources/LICENSE
+ rm Nagstamon/BeautifulSoup.py
+}
+
+src_install() {
+ # setup.py is broken
+ cd Nagstamon/
+
+ doman resources/nagstamon.1 || die
+ rm resources/nagstamon.1
+
+ nagstamon_install() {
+ exeinto $(python_get_sitedir)/${MY_PN}
+ doexe ../nagstamon.py || die
+ dosym $(python_get_sitedir)/${MY_PN}/${PN}.py /usr/bin/${PN} || die
+
+ insinto $(python_get_sitedir)/${MY_PN}
+ doins {GUI,Config,Objects,Custom,Actions}.py || die
+ touch "${D}/$(python_get_sitedir)/${MY_PN}/__init__.py" || die
+ doins -r Server/ || die
+
+ insinto /usr/share/${PN}/resources
+ doins resources/* || die
+
+ domenu "${FILESDIR}"/${PN}.desktop || die
+ }
+
+ python_execute_function nagstamon_install
+}
+
+pkg_postinst() {
+ python_mod_optimize ${MY_PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${MY_PN}
+}