summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiaran McCreesh <ciaranm@gentoo.org>2005-03-14 22:37:27 +0000
committerCiaran McCreesh <ciaranm@gentoo.org>2005-03-14 22:37:27 +0000
commit3f69c8391e8971e194ff6767ceb18831e84de363 (patch)
tree46fa5e14ac4e80c2084705674cfaf099b7b819da /sys-power
parentMoved sys-apps/nvram-reboot to sys-power/nvram-reboot (diff)
downloadhistorical-3f69c8391e8971e194ff6767ceb18831e84de363.tar.gz
historical-3f69c8391e8971e194ff6767ceb18831e84de363.tar.bz2
historical-3f69c8391e8971e194ff6767ceb18831e84de363.zip
Moved from sys-apps/cpudyn to sys-power/cpudyn.
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/cpudyn/ChangeLog80
-rw-r--r--sys-power/cpudyn/Manifest18
-rw-r--r--sys-power/cpudyn/cpudyn-0.99.0.ebuild45
-rw-r--r--sys-power/cpudyn/cpudyn-1.0.ebuild41
-rw-r--r--sys-power/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch29
-rw-r--r--sys-power/cpudyn/files/cpudyn.init102
-rw-r--r--sys-power/cpudyn/files/digest-cpudyn-0.99.01
-rw-r--r--sys-power/cpudyn/files/digest-cpudyn-1.01
-rw-r--r--sys-power/cpudyn/metadata.xml5
9 files changed, 322 insertions, 0 deletions
diff --git a/sys-power/cpudyn/ChangeLog b/sys-power/cpudyn/ChangeLog
new file mode 100644
index 000000000000..4ef4c946354b
--- /dev/null
+++ b/sys-power/cpudyn/ChangeLog
@@ -0,0 +1,80 @@
+# ChangeLog for sys-apps/cpudyn
+# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpudyn/ChangeLog,v 1.1 2005/03/14 22:37:27 ciaranm Exp $
+
+*cpudyn-1.0 (14 Mar 2005)
+*cpudyn-0.99.0 (14 Mar 2005)
+
+ 14 Mar 2005; Ciaran McCreesh <ciaranm@gentoo.org>
+ +files/cpudyn-0.99.0-init_conf_updates.patch, +files/cpudyn.init,
+ +metadata.xml, +cpudyn-0.99.0.ebuild, +cpudyn-1.0.ebuild:
+ Moved from sys-apps/cpudyn to sys-power/cpudyn.
+
+*cpudyn-1.0 (10 Oct 2004)
+
+ 10 Oct 2004; Mike Frysinger <vapier@gentoo.org> files/cpudyn.init,
+ +cpudyn-1.0.ebuild:
+ Version bump #53507 by Jakob Schiotz.
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ cpudyn-0.4.7-r1.ebuild, cpudyn-0.5.0.ebuild, cpudyn-0.6.1.ebuild,
+ cpudyn-0.99.0.ebuild:
+ Masked cpudyn-0.99.0.ebuild stable for ppc
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ cpudyn-0.4.7-r1.ebuild, cpudyn-0.5.0.ebuild, cpudyn-0.6.1.ebuild:
+ Masked cpudyn-0.6.1.ebuild stable for ppc
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ cpudyn-0.4.7-r1.ebuild, cpudyn-0.5.0.ebuild:
+ Masked cpudyn-0.5.0.ebuild stable for ppc
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ cpudyn-0.4.7-r1.ebuild:
+ Masked cpudyn-0.4.7-r1.ebuild stable for ppc
+
+ 27 Apr 2004; Aron Griffis <agriffis@gentoo.org> cpudyn-0.5.0.ebuild,
+ cpudyn-0.6.1.ebuild, cpudyn-0.99.0.ebuild:
+ Add inherit eutils
+
+ 18 Apr 2004; Travis Tilley <lv@gentoo.org> cpudyn-0.99.0.ebuild:
+ marking cpudyn stable on amd64, as its the preferred way to make use of the
+ cool n quiet support present in athlon64 processors and yet we didnt have a
+ single version marked stable until now...
+
+*cpudyn-0.99.0 (08 Mar 2004)
+
+ 08 Mar 2004; Robin H. Johnson <robbat2@gentoo.org> cpudyn-0.99.0.ebuild,
+ files/cpudyn-0.99.0-init_conf_updates.patch, files/cpudyn.init-0.99.0:
+ version bump. add in patch from bug #41825 for better cpufreq checking.
+
+ 01 Feb 2004; Jon Portnoy <avenj@gentoo.org> cpudyn-0.6.1.ebuild :
+ AMD64 keywords.
+
+*cpudyn-0.5.0 (19 Jan 2004)
+*cpudyn-0.6.1 (19 Jan 2004)
+
+ 19 Jan 2004; Robin H. Johnson <robbat2@gentoo.org> cpudyn-0.5.0.ebuild,
+ cpudyn-0.6.1.ebuild, files/cpudyn-0.5.0-init_conf_updates.patch:
+ fixed bugs #38482, #37619, #32523.
+
+*cpudyn-0.4.7-r1 (02 Dec 2003)
+
+ 02 Dec 2003; Robin H. Johnson <robbat2@gentoo.org> cpudyn-0.4.6.ebuild,
+ cpudyn-0.4.7-r1.ebuild, cpudyn-0.4.7.ebuild, files/cpudyn.conf.extra,
+ files/cpudyn.init:
+ fix bug 34891, move vars to conf file, backported to all ebuilds. -r1 moved to
+ x86.
+
+*cpudyn-0.4.7 (21 Oct 2003)
+
+ 21 Oct 2003; Robin H. Johnson <robbat2@gentoo.org> cpudyn-0.4.7.ebuild,
+ files/cpudyn.init, metadata.xml:
+ version bump and fix bug #31575. add metadata.xml.
+
+*cpudyn-0.4.6 (09 Oct 2003)
+
+ 09 Oct 2003; Robin H. Johnson <robbat2@gentoo.org> cpudyn-0.4.6.ebuild,
+ files/cpudyn.init:
+ initial commit, thanks to degrenier@easyconnect.fr bug #30558
+
diff --git a/sys-power/cpudyn/Manifest b/sys-power/cpudyn/Manifest
new file mode 100644
index 000000000000..f613cce32ec4
--- /dev/null
+++ b/sys-power/cpudyn/Manifest
@@ -0,0 +1,18 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 ebaa72137006892efca5a37e9e45507a ChangeLog 2667
+MD5 b82d65788ad9b14893f23d69e6ef6322 cpudyn-1.0.ebuild 986
+MD5 2c60519258a78ccd06d3bfe30cb50e73 cpudyn-0.99.0.ebuild 1071
+MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
+MD5 18c8ec21370d4ce089720fe94de89e6c files/digest-cpudyn-1.0 58
+MD5 7ffc3b456504f872563622cdb0413ac0 files/cpudyn.init 3045
+MD5 1d3f888c7c5af12d57517e8c7ebb27d8 files/cpudyn-0.99.0-init_conf_updates.patch 816
+MD5 14510794829fd0435f8342da60c5ba46 files/digest-cpudyn-0.99.0 61
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.10 (GNU/Linux)
+
+iD8DBQFBcVq+HTu7gpaalycRAo7aAJsHSNUEIe/kPOPFeJdt+wLOsBucRwCdFRUo
+4kTU9pdJZCg8pksXx6am2BM=
+=/1wB
+-----END PGP SIGNATURE-----
diff --git a/sys-power/cpudyn/cpudyn-0.99.0.ebuild b/sys-power/cpudyn/cpudyn-0.99.0.ebuild
new file mode 100644
index 000000000000..eecad06eebb5
--- /dev/null
+++ b/sys-power/cpudyn/cpudyn-0.99.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpudyn/cpudyn-0.99.0.ebuild,v 1.1 2005/03/14 22:37:27 ciaranm Exp $
+
+inherit eutils
+
+DESCRIPTION="A daemon to control laptop power consumption via cpufreq and disk standby"
+HOMEPAGE="http://mnm.uib.es/~gallir/${PN}/"
+SRC_URI="http://mnm.uib.es/~gallir/${PN}/download/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ppc amd64"
+IUSE=""
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ mkdir gentoo
+ cp debian/cpudyn.conf gentoo
+ cp ${FILESDIR}/cpudyn.init gentoo/cpudyn.init
+ epatch ${FILESDIR}/${PN}-0.99.0-init_conf_updates.patch
+}
+
+src_compile() {
+ emake cpudynd || die "Compilation failed."
+}
+
+src_install() {
+ into /
+ exeinto /etc/init.d
+ newexe gentoo/cpudyn.init cpudyn
+ insinto /etc/conf.d
+ newins gentoo/cpudyn.conf cpudyn
+
+ into /usr
+ doman cpudynd.8
+ dosbin cpudynd
+ dodoc INSTALL README VERSION changelog COPYING
+ dohtml *.html
+}
+
+pkg_postinst() {
+ einfo "Configuration file is /etc/conf.d/cpudyn."
+}
diff --git a/sys-power/cpudyn/cpudyn-1.0.ebuild b/sys-power/cpudyn/cpudyn-1.0.ebuild
new file mode 100644
index 000000000000..ae8dbda3697b
--- /dev/null
+++ b/sys-power/cpudyn/cpudyn-1.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpudyn/cpudyn-1.0.ebuild,v 1.1 2005/03/14 22:37:27 ciaranm Exp $
+
+inherit eutils
+
+DESCRIPTION="A daemon to control laptop power consumption via cpufreq and disk standby"
+HOMEPAGE="http://mnm.uib.es/~gallir/${PN}/"
+SRC_URI="http://mnm.uib.es/~gallir/${PN}/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}/debian
+ epatch ${FILESDIR}/${PN}-0.99.0-init_conf_updates.patch
+}
+
+src_compile() {
+ emake cpudynd || die "Compilation failed."
+}
+
+src_install() {
+ dosbin cpudynd || die "dosbin"
+
+ doman cpudynd.8
+ dodoc INSTALL README VERSION changelog
+ dohtml *.html
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/cpudyn.init cpudyn
+ insinto /etc/conf.d ; newins debian/cpudyn.conf cpudyn
+}
+
+pkg_postinst() {
+ einfo "Configuration file is /etc/conf.d/cpudyn."
+}
diff --git a/sys-power/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch b/sys-power/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch
new file mode 100644
index 000000000000..fcfb55294d33
--- /dev/null
+++ b/sys-power/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch
@@ -0,0 +1,29 @@
+--- gentoo/cpudyn.conf.orig 2004-01-08 17:20:39.575230665 +0100
++++ gentoo/cpudyn.conf 2004-01-08 17:20:37.450290151 +0100
+@@ -32,6 +32,12 @@
+
+ THROTTLING_LOW=7
+
++#
++# Count also niced process in CPU usage. Default is no.
++#
++
++#NICE=yes
++
+ ################################################
+ # DISK OPTIONS
+ # (disabled by default)
+@@ -51,4 +57,14 @@
+ # DISKS=/dev/hda,/dev/hdb
+
+
++################################################
++# Special Startup Options
++# (you shouldn't need to change these)
++################################################
++# cpufreq sources for 2.4 kernels
++CPUFREQ_24="/proc/cpufreq"
++# cpufreq sources for 2.5/2.6 kernels
++CPUFREQ_25="/sys/devices/system/cpu/cpu0/cpufreq /sysfs/devices/system/cpu/cpu0/cpufreq"
++# pure acpi cpufreq
++CPUFREQ_ACPI="/proc/acpi/processor/CPU0/throttling"
diff --git a/sys-power/cpudyn/files/cpudyn.init b/sys-power/cpudyn/files/cpudyn.init
new file mode 100644
index 000000000000..78f943c648fe
--- /dev/null
+++ b/sys-power/cpudyn/files/cpudyn.init
@@ -0,0 +1,102 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpudyn/files/cpudyn.init,v 1.1 2005/03/14 22:37:27 ciaranm Exp $
+#
+# Based on the Debian init script written by Celso Gonzalez <celso@bulma.net>,
+# and on the cpufreqd Gentoo init script written by Robert Gogolok <robertgogolok@web.de>.
+# Heavily modified by Robin H. Johnson <robbat2@gentoo.org> to ensure correct
+# start only under support conditions
+# More preconditions by Karl Trygve Kalleberg <karltk@gentoo.org>
+#
+
+DAEMON=/usr/sbin/cpudynd
+PIDFILE=/var/run/cpudynd.pid
+
+opts="${opts} min max dynamic"
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ local CPUFREQ_FILES="${CPUFREQ_24} ${CPUFREQ_25} ${CPUFREQ_ACPI}"
+ local CPUFREQ_FILE=""
+ for i in ${CPUFREQ_FILES}; do [ -e ${i} ] && CPUFREQ_FILE="${i}" && break ; done
+ if [ -z "${CPUFREQ_FILE}" ]; then
+ eerror "Neither CPUFreq nor ACPI throttling support were found"
+ return 1
+ fi
+ if [ "${CPUFREQ_FILE}" = "${CPUFREQ_ACPI}" ]; then
+ # see if the file says we are supported or not
+ grep 'not supported' ${CPUFREQ_ACPI} 2>&1 >/dev/null
+ retval="$?"
+ if [ $retval -eq 0 ]; then
+ eerror "ACPI throttling support found, but hardware doesn't support it"
+ return 1
+ fi
+ # now check that we can write to the file
+ local acpistate=`grep 'active state' ${CPUFREQ_ACPI} | cut -dT -f2-`
+ echo $acpistate > ${CPUFREQ_ACPI}
+ retval="$?"
+ if [ $retval -ne 0 ]; then
+ eerror "Writing to ACPI throttling file failed"
+ return 1
+ fi
+ fi
+ # CPUFREQ_25 has more than one entry, hence the grep -- karltk
+ if [ ! -z "$(echo ${CPUFREQ_25} | grep ${CPUFREQ_FILE})" ]; then
+ # Silently try to load the governors; shouldn't hurt if they're already there
+ modprobe -q cpufreq_performance
+ modprobe -q cpufreq_powersave
+ modprobe -q cpufreq_userspace
+ modprobe -q cpufreq_ondemand
+ fi
+
+ return 0
+}
+
+
+start() {
+ local CPUDYN_OPTS=""
+ if [ -n "$INTERVAL" ]; then CPUDYN_OPTS="$CPUDYN_OPTS -i $INTERVAL"; fi
+ if [ -n "$CPU_UP" -a -n "$CPU_DOWN" ]; then CPUDYN_OPTS="$CPUDYN_OPTS -p $CPU_UP $CPU_DOWN"; fi
+ if [ -n "$THROTTLING_LOW" ]; then CPUDYN_OPTS="$CPUDYN_OPTS -l $THROTTLING_LOW"; fi
+ if [ -n "$TIMEOUT" ]; then CPUDYN_OPTS="$CPUDYN_OPTS -t $TIMEOUT"; fi
+ if [ -n "$DISKS" ]; then CPUDYN_OPTS="$CPUDYN_OPTS -h $DISKS"; fi
+ if [ "$NICE" == "yes" ]; then CPUDYN_OPTS="$CPUDYN_OPTS -nice"; fi
+
+ ebegin "Starting cpudynd"
+ if checkconfig; then
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --background --make-pidfile --exec $DAEMON -- $CPUDYN_OPTS
+ eend $?
+ else
+ eend 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping cpudynd"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --exec $DAEMON && rm -f $PIDFILE
+ eend $?
+}
+
+min() {
+ ebegin "Forcing minimal speed"
+ kill -USR2 $(cat ${PIDFILE})
+ eend $?
+}
+max() {
+ ebegin "Forcing maximal speed"
+ kill -USR1 $(cat ${PIDFILE})
+ eend $?
+}
+dynamic() {
+ ebegin "Resetting to default dynamic speed"
+ kill -HUP $(cat ${PIDFILE})
+ eend $?
+}
+
+# vim:ts=4 noexpandtab:
diff --git a/sys-power/cpudyn/files/digest-cpudyn-0.99.0 b/sys-power/cpudyn/files/digest-cpudyn-0.99.0
new file mode 100644
index 000000000000..31d7f2954c50
--- /dev/null
+++ b/sys-power/cpudyn/files/digest-cpudyn-0.99.0
@@ -0,0 +1 @@
+MD5 d4b62a629cb1a287c7584158994248ba cpudyn-0.99.0.tgz 30724
diff --git a/sys-power/cpudyn/files/digest-cpudyn-1.0 b/sys-power/cpudyn/files/digest-cpudyn-1.0
new file mode 100644
index 000000000000..d2da76bda5b4
--- /dev/null
+++ b/sys-power/cpudyn/files/digest-cpudyn-1.0
@@ -0,0 +1 @@
+MD5 2922149f624a07b3d6f012a084e89e7a cpudyn-1.0.tgz 32017
diff --git a/sys-power/cpudyn/metadata.xml b/sys-power/cpudyn/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-power/cpudyn/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>