diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2004-03-09 02:47:40 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2004-03-09 02:47:40 +0000 |
commit | a95ee311c28d24934a81a6e37ea7c0bfc102591b (patch) | |
tree | 9c0a7f05f85591bf27267f936462423a0049b720 /sys-apps/cpudyn | |
parent | remove s390 from keywords (diff) | |
download | historical-a95ee311c28d24934a81a6e37ea7c0bfc102591b.tar.gz historical-a95ee311c28d24934a81a6e37ea7c0bfc102591b.tar.bz2 historical-a95ee311c28d24934a81a6e37ea7c0bfc102591b.zip |
version bump. add in patch from bug #41825 for better cpufreq checking.
Diffstat (limited to 'sys-apps/cpudyn')
-rw-r--r-- | sys-apps/cpudyn/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/cpudyn/Manifest | 18 | ||||
-rw-r--r-- | sys-apps/cpudyn/cpudyn-0.99.0.ebuild | 43 | ||||
-rw-r--r-- | sys-apps/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch | 29 | ||||
-rw-r--r-- | sys-apps/cpudyn/files/cpudyn.init-0.99.0 | 93 | ||||
-rw-r--r-- | sys-apps/cpudyn/files/digest-cpudyn-0.99.0 | 1 |
6 files changed, 184 insertions, 8 deletions
diff --git a/sys-apps/cpudyn/ChangeLog b/sys-apps/cpudyn/ChangeLog index 36de4c9aa416..fdeb5c089a71 100644 --- a/sys-apps/cpudyn/ChangeLog +++ b/sys-apps/cpudyn/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/cpudyn # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/ChangeLog,v 1.6 2004/03/01 19:59:51 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/ChangeLog,v 1.7 2004/03/09 02:47:40 robbat2 Exp $ + +*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. diff --git a/sys-apps/cpudyn/Manifest b/sys-apps/cpudyn/Manifest index 8adb984974d1..1b510895d231 100644 --- a/sys-apps/cpudyn/Manifest +++ b/sys-apps/cpudyn/Manifest @@ -1,13 +1,17 @@ -MD5 50bdfc10ccc26013cc4ae6953f9edb5f cpudyn-0.4.6.ebuild 928 -MD5 c63dad22fff1ade42493b5361a27257c cpudyn-0.4.7-r1.ebuild 935 -MD5 714d062d4fe54191eca44ae4d9d16b85 cpudyn-0.6.1.ebuild 1052 -MD5 c9efe5ab891145a59f17c66d05c748cb ChangeLog 1202 +MD5 73eff0d2128a0d73a139af05f24267d6 cpudyn-0.4.6.ebuild 927 +MD5 e763bbcfd3449a4308bbb807aa93fe61 cpudyn-0.4.7-r1.ebuild 934 +MD5 2704e83536e11b52df1e3ce6742b4ec6 cpudyn-0.99.0.ebuild 1074 +MD5 2813c2017255476b6f9e5f3f9ad74e09 cpudyn-0.6.1.ebuild 1051 +MD5 838628bfe51be40c7ccd6eb1820bce20 ChangeLog 1457 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 7f8eec56febae37ca92076ca12b6e43a cpudyn-0.4.7.ebuild 931 -MD5 02e5432d3f88b522867e1c19f9069dea cpudyn-0.5.0.ebuild 1040 +MD5 d708b7591e4b554647d68be78431cb79 cpudyn-0.4.7.ebuild 930 +MD5 d6f7353279598be6a484b278c544c8e7 cpudyn-0.5.0.ebuild 1039 MD5 66cafade66033a014e49e2b1b8c6957c files/cpudyn-0.5.0-init_conf_updates.patch 1307 +MD5 1d3f888c7c5af12d57517e8c7ebb27d8 files/cpudyn-0.99.0-init_conf_updates.patch 816 MD5 ea25db65a0cf5097ff0d6c2eddd2665d files/digest-cpudyn-0.4.7-r1 60 -MD5 6a46f6986c00898e09a6d44274ec18c9 files/cpudyn.init 2274 +MD5 7177b71403ded492e472013faffff6e2 files/cpudyn.init 2273 +MD5 00b7fb3c4169482415ad673254646773 files/cpudyn.init-0.99.0 3154 +MD5 14510794829fd0435f8342da60c5ba46 files/digest-cpudyn-0.99.0 61 MD5 5a7b58f7786e6926c3a9dc4f6520e09d files/cpudyn.conf.extra 424 MD5 b013c06b8e09ed9137d72775c991aff1 files/digest-cpudyn-0.4.6 60 MD5 ea25db65a0cf5097ff0d6c2eddd2665d files/digest-cpudyn-0.4.7 60 diff --git a/sys-apps/cpudyn/cpudyn-0.99.0.ebuild b/sys-apps/cpudyn/cpudyn-0.99.0.ebuild new file mode 100644 index 000000000000..6f9705aaf54d --- /dev/null +++ b/sys-apps/cpudyn/cpudyn-0.99.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/cpudyn-0.99.0.ebuild,v 1.1 2004/03/09 02:47:40 robbat2 Exp $ + +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-0.99.0 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-apps/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch b/sys-apps/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch new file mode 100644 index 000000000000..fcfb55294d33 --- /dev/null +++ b/sys-apps/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-apps/cpudyn/files/cpudyn.init-0.99.0 b/sys-apps/cpudyn/files/cpudyn.init-0.99.0 new file mode 100644 index 000000000000..eff996644cb1 --- /dev/null +++ b/sys-apps/cpudyn/files/cpudyn.init-0.99.0 @@ -0,0 +1,93 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/files/cpudyn.init-0.99.0,v 1.1 2004/03/09 02:47:40 robbat2 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 + +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 + # Check that all governors required are actually present + missing="" + for x in userspace performance powersave ; do + if [ -z "$(grep ${x} ${CPUFREQ_FILE}/scaling_available_governors)" ]; then + missing="${missing} ${x}" + fi + done + # If some are missing, report which, then bail + if [ ! -z "${missing}" ]; then + eerror "2.5/2.6 CPUfreq support needs userspace, performance and powersave governors" + eerror "Missing${missing}" + return 1 + fi + fi +} + + +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 $? +} + +# vim:ts=4 noexpandtab: diff --git a/sys-apps/cpudyn/files/digest-cpudyn-0.99.0 b/sys-apps/cpudyn/files/digest-cpudyn-0.99.0 new file mode 100644 index 000000000000..31d7f2954c50 --- /dev/null +++ b/sys-apps/cpudyn/files/digest-cpudyn-0.99.0 @@ -0,0 +1 @@ +MD5 d4b62a629cb1a287c7584158994248ba cpudyn-0.99.0.tgz 30724 |