Improve python eclass usage wrt #316963 by Arfrever Frehtes Taifersar Arahesis.
authorSamuli Suominen <ssuominen@gentoo.org>
Sun, 2 May 2010 21:48:04 +0000 (21:48 +0000)
committerSamuli Suominen <ssuominen@gentoo.org>
Sun, 2 May 2010 21:48:04 +0000 (21:48 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

sys-power/cpuspeedy/ChangeLog
sys-power/cpuspeedy/Manifest
sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild

index a340db921eeffefffd0fbf223e74b62aaabead1f..e0552a92025eba071deadaf7116ce23b3c56207c 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for sys-power/cpuspeedy
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/cpuspeedy/ChangeLog,v 1.4 2008/05/29 18:11:15 hawking Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpuspeedy/ChangeLog,v 1.5 2010/05/02 21:48:04 ssuominen Exp $
+
+  02 May 2010; Samuli Suominen <ssuominen@gentoo.org>
+  cpuspeedy-0.4.1.ebuild:
+  Improve python eclass usage wrt #316963 by Arfrever Frehtes Taifersar
+  Arahesis.
 
   29 May 2008; Ali Polatel <hawking@gentoo.org> cpuspeedy-0.4.1.ebuild:
   python_mod_{cleanup,optimize} are ROOT aware. Quoting.
index a201af21d79dff1fd6f65127bf550427b7cd7415..b495fad5362a6ff5a070e551723ea40ffb736c5b 100644 (file)
@@ -1,14 +1,4 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 DIST cpuspeedy-0.4.1.tar.gz 17174 RMD160 248e647905e6b8fe961e25548076d8ff016609a3 SHA1 2a17d572ce8aa38bc99845d751e51179f37b8773 SHA256 5e9ff675b7895e2fa7186ec54c154dcdef7ca1153cf1fe5ef0df10fecb5846b0
-EBUILD cpuspeedy-0.4.1.ebuild 968 RMD160 f848621d3a164d8e867e0762fc87ebd5e996e3ba SHA1 744a4a17427febc278410da4b75580631731a73d SHA256 e85ba321c622e38d292800fdc6acdaddc860d5f1a8baa7887313733d93d88169
-MISC ChangeLog 3045 RMD160 211b0a3fcb3b5613145b4164717d201eb34e4b47 SHA1 a964f5a2cf4a569dda739370b546c822ecdf93aa SHA256 35f2109439ca9a01c325c11d3e959641c773775c88580292063a07acfa42874f
+EBUILD cpuspeedy-0.4.1.ebuild 923 RMD160 ef518e765367444c583a1189db66d6a8b9607b2c SHA1 273c219f01b1814794b618b75048e480c3e9768e SHA256 1b88a66c39af45c6175d84a2e3dda3c8f05737780233cdc9da450e8105ca1933
+MISC ChangeLog 3212 RMD160 64983190e4bd8465551066213c3b38bb2d032a7b SHA1 a86051bd475f5e50673e623912946cc77e6cfb6c SHA256 7fa32ba0dc8effa82743e0ba898871ee43b48a22289638bd296cc3265d9b2e56
 MISC metadata.xml 530 RMD160 a7c2aa3a8caa92512dac3af062c9c971f693801e SHA1 3f738948f85031cabffc9d3e70168820180e038f SHA256 e3b31d9525773cf9a1ad42db33e3b255bf295e9cf5084a58670f8cafaab94475
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.9 (GNU/Linux)
-
-iEYEARECAAYFAkg+8cYACgkQQU4yORhF8iD/ggCfQEy23u8+uoykwaNGws6t9sIP
-YhYAnAq3ZpnCwOwzaDDqdYtKbjh4puG+
-=uv38
------END PGP SIGNATURE-----
index 68888403445369d3b5b58f3963dd8f35962fbba4..ab0cade9ddd54c9acd4ad3805b6642c4f4c63a3d 100644 (file)
@@ -1,34 +1,42 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild,v 1.3 2008/05/29 18:11:15 hawking Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild,v 1.4 2010/05/02 21:48:04 ssuominen Exp $
 
-inherit python multilib
+EAPI=3
+PYTHON_DEPEND="2"
+inherit python
 
 DESCRIPTION="A simple and easy to use program to control the speed and the voltage of CPUs on the fly."
-SRC_URI="mirror://sourceforge/cpuspeedy/${P}.tar.gz"
 HOMEPAGE="http://cpuspeedy.sourceforge.net/"
-KEYWORDS="~amd64 ppc x86"
-SLOT="0"
+SRC_URI="mirror://sourceforge/cpuspeedy/${P}.tar.gz"
+
 LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
 IUSE=""
-RDEPEND="virtual/python"
 
-src_compile() {
-       einfo "There is nothing to compile."
+pkg_setup() {
+       python_set_active_version 2
+}
+
+src_prepare() {
+       rm -f Makefile || die
 }
 
 src_install() {
-       emake install PREFIX="${D}"/usr || die "make install failed"
-       sed -i -e "s:${D}::" "${D}"/usr/sbin/cpuspeedy
-       mv "${D}"/usr/share/doc/cpuspeedy "${D}"/usr/share/doc/${PF}
-       dodir /usr/share
-       mv "${D}"/usr/man "${D}"/usr/share
+       exeinto "$(python_get_sitedir)"/${PN}
+       doexe src/*.py || die
+
+       dodoc AUTHORS ChangeLog README || die
+       doman doc/*.1 || die
+
+       dosym "$(python_get_sitedir)"/${PN}/${PN}.py /usr/sbin/${PN} || die
 }
 
 pkg_postinst() {
-       python_mod_optimize /usr/$(get_libdir)/${PN}
+       python_mod_optimize ${PN}
 }
 
 pkg_postrm() {
-       python_mod_cleanup /usr/$(get_libdir)/${PN}
+       python_mod_cleanup ${PN}
 }