summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-02-12 02:37:53 +0000
committerChristian Ruppert <idl0r@gentoo.org>2011-02-12 02:37:53 +0000
commit88b82dd7b18bac673ea7cce3c4a9a8e101d495da (patch)
tree7655d0760b994915888c5dc7797ef105442d6949 /net-analyzer/nagstamon
parentVersion bump to 0.9.5-rc1. (diff)
downloadgentoo-2-88b82dd7b18bac673ea7cce3c4a9a8e101d495da.tar.gz
gentoo-2-88b82dd7b18bac673ea7cce3c4a9a8e101d495da.tar.bz2
gentoo-2-88b82dd7b18bac673ea7cce3c4a9a8e101d495da.zip
Fix resource loading properly, Add missing __init__.py.
(Portage version: 2.2.0_alpha23/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/nagstamon')
-rw-r--r--net-analyzer/nagstamon/ChangeLog9
-rw-r--r--net-analyzer/nagstamon/files/nagstamon-0.9.5-resources.patch18
-rw-r--r--net-analyzer/nagstamon/nagstamon-0.9.5_rc1-r1.ebuild (renamed from net-analyzer/nagstamon/nagstamon-0.9.5_rc1.ebuild)18
3 files changed, 36 insertions, 9 deletions
diff --git a/net-analyzer/nagstamon/ChangeLog b/net-analyzer/nagstamon/ChangeLog
index e5d73a901e5e..bb0f6cdbf599 100644
--- a/net-analyzer/nagstamon/ChangeLog
+++ b/net-analyzer/nagstamon/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/nagstamon
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/ChangeLog,v 1.13 2011/02/12 02:12:55 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/ChangeLog,v 1.14 2011/02/12 02:37:53 idl0r Exp $
+
+*nagstamon-0.9.5_rc1-r1 (12 Feb 2011)
+
+ 12 Feb 2011; Christian Ruppert <idl0r@gentoo.org>
+ -nagstamon-0.9.5_rc1.ebuild, +nagstamon-0.9.5_rc1-r1.ebuild,
+ +files/nagstamon-0.9.5-resources.patch:
+ Fix resource loading properly, Add missing __init__.py.
*nagstamon-0.9.5_rc1 (12 Feb 2011)
diff --git a/net-analyzer/nagstamon/files/nagstamon-0.9.5-resources.patch b/net-analyzer/nagstamon/files/nagstamon-0.9.5-resources.patch
new file mode 100644
index 000000000000..8eef3a5be689
--- /dev/null
+++ b/net-analyzer/nagstamon/files/nagstamon-0.9.5-resources.patch
@@ -0,0 +1,18 @@
+--- nagstamon.py.old 2011-02-12 03:33:35.154930846 +0100
++++ nagstamon.py 2011-02-12 03:34:08.100522965 +0100
+@@ -32,13 +32,8 @@ conf = Config()
+ # check for old settings when upgrading from a nagstamon version < 0.8 and convert them
+ conf.Convert_Conf_to_Multiple_Servers()
+
+-# try to get resources path if nagstamon got be installed by setup.py
+-try:
+- import pkg_resources
+- Resources = pkg_resources.resource_filename("Nagstamon", "resources")
+-except Exception, err:
+- # set resources to "" in case there are no resources available from setup.py
+- Resources = ""
++# set resources to "" in case there are no resources available from setup.py
++Resources = "/usr/share/nagstamon/resources"
+
+ # Resources on MacOS X, environment variable _MEIPASS2 comes from pyinstaller packed executable
+ # - does not really work at the moment
diff --git a/net-analyzer/nagstamon/nagstamon-0.9.5_rc1.ebuild b/net-analyzer/nagstamon/nagstamon-0.9.5_rc1-r1.ebuild
index de124234c0f6..04e6739c9d2e 100644
--- a/net-analyzer/nagstamon/nagstamon-0.9.5_rc1.ebuild
+++ b/net-analyzer/nagstamon/nagstamon-0.9.5_rc1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/nagstamon-0.9.5_rc1.ebuild,v 1.1 2011/02/12 02:12:58 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagstamon/nagstamon-0.9.5_rc1-r1.ebuild,v 1.1 2011/02/12 02:37:53 idl0r Exp $
EAPI="3"
@@ -11,6 +11,7 @@ RESTRICT_PYTHON_ABIS="3.*"
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"
@@ -29,7 +30,7 @@ RDEPEND="dev-python/pygtk
S="${WORKDIR}/${MY_P}"
src_prepare() {
- sed -i -e 's:Resources = "":Resources = "/usr/share/nagstamon/resources":' nagstamon.py || die
+ epatch "${FILESDIR}/nagstamon-0.9.5-resources.patch"
python_convert_shebangs 2 nagstamon.py
}
@@ -42,12 +43,13 @@ src_install() {
rm resources/{LICENSE,nagstamon.1}
nagstamon_install() {
- exeinto $(python_get_sitedir)/${PN}
- newexe ../nagstamon.py nagstamon || die
- dosym $(python_get_sitedir)/${PN}/${PN} /usr/bin/${PN} || die
+ 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)/${PN}
+ insinto $(python_get_sitedir)/${MY_PN}
doins {GUI,Config,Objects,Custom,Actions}.py || die
+ touch $(python_get_sitedir)/${MY_PN}/__init__.py || die
doins -r Server/ || die
insinto /usr/share/${PN}/resources
@@ -61,9 +63,9 @@ src_install() {
}
pkg_postinst() {
- python_mod_optimize ${PN}
+ python_mod_optimize ${MY_PN}
}
pkg_postrm() {
- python_mod_cleanup ${PN}
+ python_mod_cleanup ${MY_PN}
}