blob: d64144ad945435e454771ddeb5dc9d6e3ab82687 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/cpufreqd-1.1.2-r1.ebuild,v 1.1 2005/03/14 22:48:38 ciaranm Exp $
inherit eutils flag-o-matic eutils
DESCRIPTION="Daemon to adjust CPU speed for power saving"
HOMEPAGE="http://sourceforge.net/projects/cpufreqd/"
SRC_URI="mirror://sourceforge/cpufreqd/${P}.tar.gz"
DEPEND=">=sys-apps/sed-4"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc amd64"
IUSE=""
src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/${PV}-prefer-sysfs.patch
}
src_compile() {
cd ${S}
# cpufreqd segfaults when built as PIE
filter-flags "-fpie" "-fPIE" "-Wl,-pie"
econf || die "econf failed for ${P}"
}
src_install() {
make DESTDIR=${D} install || die
dodoc README Authors TODO
exeinto /etc/init.d
newexe ${S}/scripts/gentoo/cpufreqd cpufreqd
}
pkg_postinst() {
echo
einfo "A default config file has been copied to /etc/cpufreqd.conf"
echo
einfo "CPUFreqd does not support using percentage frequencies on"
einfo "2.6 kernels where sysfs is used instead - please manually"
einfo "edit the config file to use an absolute value instead, if"
einfo "you are using a 2.6 series kernel."
echo
}
|