summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-05-02 21:48:04 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-05-02 21:48:04 +0000
commit7b8e7bac9ea9791f468160dabe4c9d3034ba04ef (patch)
treecff1c1384768c28c3f299771dc29a5c55418a095 /sys-power
parentVersion bump via perl-bump experimental tool. (diff)
downloadgentoo-2-7b8e7bac9ea9791f468160dabe4c9d3034ba04ef.tar.gz
gentoo-2-7b8e7bac9ea9791f468160dabe4c9d3034ba04ef.tar.bz2
gentoo-2-7b8e7bac9ea9791f468160dabe4c9d3034ba04ef.zip
Improve python eclass usage wrt #316963 by Arfrever Frehtes Taifersar Arahesis.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/cpuspeedy/ChangeLog9
-rw-r--r--sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild40
2 files changed, 31 insertions, 18 deletions
diff --git a/sys-power/cpuspeedy/ChangeLog b/sys-power/cpuspeedy/ChangeLog
index a340db921eef..e0552a92025e 100644
--- a/sys-power/cpuspeedy/ChangeLog
+++ b/sys-power/cpuspeedy/ChangeLog
@@ -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.
diff --git a/sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild b/sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild
index 688884034453..ab0cade9ddd5 100644
--- a/sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild
+++ b/sys-power/cpuspeedy/cpuspeedy-0.4.1.ebuild
@@ -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}
}