diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-04-02 19:42:10 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-04-02 19:42:10 +0000 |
commit | 5a5f9fe181aea509928945b6b3ab37ec332b4086 (patch) | |
tree | 8656c215039d4ee809a932d8a8175d8d83facebb /net-misc/nut-monitor | |
parent | x86 stable, see bug 368265 (diff) | |
download | gentoo-2-5a5f9fe181aea509928945b6b3ab37ec332b4086.tar.gz gentoo-2-5a5f9fe181aea509928945b6b3ab37ec332b4086.tar.bz2 gentoo-2-5a5f9fe181aea509928945b6b3ab37ec332b4086.zip |
Install pixmaps at proper paths, install fr translations when needed, let it work when python3 is main interpreter (bug #408149 by FSW). Remove old.
(Portage version: 2.1.10.54/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/nut-monitor')
-rw-r--r-- | net-misc/nut-monitor/ChangeLog | 13 | ||||
-rw-r--r-- | net-misc/nut-monitor/files/nut-monitor-1.3-glade.patch | 16 | ||||
-rw-r--r-- | net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch | 48 | ||||
-rw-r--r-- | net-misc/nut-monitor/nut-monitor-1.1.ebuild | 27 | ||||
-rw-r--r-- | net-misc/nut-monitor/nut-monitor-1.3-r1.ebuild (renamed from net-misc/nut-monitor/nut-monitor-1.3.ebuild) | 34 |
5 files changed, 85 insertions, 53 deletions
diff --git a/net-misc/nut-monitor/ChangeLog b/net-misc/nut-monitor/ChangeLog index 4e7bf17c424d..892087b3b4ca 100644 --- a/net-misc/nut-monitor/ChangeLog +++ b/net-misc/nut-monitor/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-misc/nut-monitor -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/nut-monitor/ChangeLog,v 1.3 2011/12/04 14:29:55 jlec Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/nut-monitor/ChangeLog,v 1.4 2012/04/02 19:42:10 pacho Exp $ + +*nut-monitor-1.3-r1 (02 Apr 2012) + + 02 Apr 2012; Pacho Ramos <pacho@gentoo.org> + +files/nut-monitor-1.3-paths.patch, +nut-monitor-1.3-r1.ebuild, + -files/nut-monitor-1.3-glade.patch, -nut-monitor-1.1.ebuild, + -nut-monitor-1.3.ebuild: + Install pixmaps at proper paths, install fr translations when needed, let it + work when python3 is main interpreter (bug #408149 by FSW). Remove old. 04 Dec 2011; Justin Lecher <jlec@gentoo.org> nut-monitor-1.3.ebuild, +files/nut-monitor-1.3-glade.patch: diff --git a/net-misc/nut-monitor/files/nut-monitor-1.3-glade.patch b/net-misc/nut-monitor/files/nut-monitor-1.3-glade.patch deleted file mode 100644 index 2bcb8509b132..000000000000 --- a/net-misc/nut-monitor/files/nut-monitor-1.3-glade.patch +++ /dev/null @@ -1,16 +0,0 @@ - NUT-Monitor | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/NUT-Monitor b/NUT-Monitor -index 283c4aa..d99f4fd 100755 ---- a/NUT-Monitor -+++ b/NUT-Monitor -@@ -70,7 +70,7 @@ class interface : - ( cmd_opts, args ) = opt_parser.parse_args() - - -- self.__glade_file = os.path.join( os.path.dirname( sys.argv[0] ), "gui-1.3.glade" ) -+ self.__glade_file = "/usr/share/nut-monitor/gui-1.3.glade" - - self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP ) - self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1") diff --git a/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch b/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch new file mode 100644 index 000000000000..00fd0ded3d3f --- /dev/null +++ b/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch @@ -0,0 +1,48 @@ +--- a/scripts/python/app/NUT-Monitor ++++ b/scripts/python/app/NUT-Monitor +@@ -70,7 +70,7 @@ + ( cmd_opts, args ) = opt_parser.parse_args() + + +- self.__glade_file = os.path.join( os.path.dirname( sys.argv[0] ), "gui-1.3.glade" ) ++ self.__glade_file = '/usr/share/nut-monitor/gui-1.3.glade' + + self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP ) + self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1") +@@ -103,11 +103,11 @@ + + # Create the tray icon and connect it to the show/hide method... + self.__widgets["status_icon"] = gtk.StatusIcon() +- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) ) ++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" ) + self.__widgets["status_icon"].set_visible( True ) + self.__widgets["status_icon"].connect( "activate", self.tray_activated ) + +- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) ) ++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" ) + + # Define interface callbacks actions + self.__callbacks = { "on_window1_destroy" : self.quit, +@@ -265,8 +265,8 @@ + #------------------------------------------------------------------- + # Change the status icon and tray icon + def change_status_icon( self, icon="on_line", blink=False ) : +- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) ) +- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) ) ++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon ) ++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon ) + self.__widgets["status_icon"].set_blinking( blink ) + + #------------------------------------------------------------------- +@@ -719,9 +719,9 @@ + + for k,v in vars.iteritems() : + if ( rwvars.has_key( k ) ) : +- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-rw.png" ) ++ icon_file = "/usr/share/nut-monitor/pixmaps/var-rw.png" + else : +- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-ro.png" ) ++ icon_file = "/usr/share/nut-monitor/pixmaps/var-ro.png" + + icon = gtk.gdk.pixbuf_new_from_file( icon_file ) + self.__widgets["ups_vars_tree_store"].append( [ icon, k, v ] ) diff --git a/net-misc/nut-monitor/nut-monitor-1.1.ebuild b/net-misc/nut-monitor/nut-monitor-1.1.ebuild deleted file mode 100644 index 9aee1f629e09..000000000000 --- a/net-misc/nut-monitor/nut-monitor-1.1.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/nut-monitor/nut-monitor-1.1.ebuild,v 1.2 2009/11/13 20:29:55 ssuominen Exp $ - -inherit eutils - -DESCRIPTION="A graphical application to monitor and manage UPSes connected to a NUT server" -HOMEPAGE="http://www.lestat.st/informatique/projets/nut-monitor-en/" -SRC_URI="http://www.lestat.st/_media/informatique/projets/${PN}/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="dev-python/pygtk - dev-python/pynut" - -src_install() { - dobin NUT-Monitor || die - insinto /usr/share/nut-monitor - doins gui.glade || die - dosym NUT-Monitor /usr/bin/${PN} - doicon ${PN}.png - domenu ${PN}.desktop - dodoc README -} diff --git a/net-misc/nut-monitor/nut-monitor-1.3.ebuild b/net-misc/nut-monitor/nut-monitor-1.3-r1.ebuild index 1facae43badb..374a7e56d94e 100644 --- a/net-misc/nut-monitor/nut-monitor-1.3.ebuild +++ b/net-misc/nut-monitor/nut-monitor-1.3-r1.ebuild @@ -1,10 +1,11 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/nut-monitor/nut-monitor-1.3.ebuild,v 1.2 2011/12/04 14:29:55 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/nut-monitor/nut-monitor-1.3-r1.ebuild,v 1.1 2012/04/02 19:42:10 pacho Exp $ EAPI=4 +PYTHON_DEPEND="2" -inherit eutils +inherit eutils python DESCRIPTION="A graphical application to monitor and manage UPSes connected to a NUT server" HOMEPAGE="http://www.lestat.st/informatique/projets/nut-monitor-en/" @@ -13,23 +14,40 @@ SRC_URI="http://www.lestat.st/_media/informatique/projets/${PN}/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="linguas_fr" -RDEPEND=" - dev-python/pygtk +RDEPEND="dev-python/pygtk dev-python/pynut" DEPEND="" +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + src_prepare() { - epatch "${FILESDIR}"/${P}-glade.patch + epatch "${FILESDIR}"/${P}-paths.patch + python_convert_shebangs -r 2 . } src_install() { dobin NUT-Monitor + dosym NUT-Monitor /usr/bin/${PN} + insinto /usr/share/nut-monitor doins gui-${PV}.glade - dosym NUT-Monitor /usr/bin/${PN} + + dodir /usr/share/nut-monitor/pixmaps + insinto /usr/share/nut-monitor/pixmaps + doins pixmaps/* + doicon ${PN}.png domenu ${PN}.desktop + dodoc README + + if use linguas_fr; then + insinto /usr/share/locale/fr/LC_MESSAGES/ + doins locale/fr/LC_MESSAGES/NUT-Monitor.mo + fi } |