diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2003-10-22 01:17:57 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2003-10-22 01:17:57 +0000 |
commit | 949edeec0c6ce1fc269be4446b5e96f34f4d6da7 (patch) | |
tree | 1e0d345d39b70cefd957a23dba2c00a83c8f13ec /sys-apps | |
parent | version bump and fix bug #31575. add metadata.xml (diff) | |
download | historical-949edeec0c6ce1fc269be4446b5e96f34f4d6da7.tar.gz historical-949edeec0c6ce1fc269be4446b5e96f34f4d6da7.tar.bz2 historical-949edeec0c6ce1fc269be4446b5e96f34f4d6da7.zip |
version bump and fix bug #31575. add metadata.xml
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/cpudyn/Manifest | 7 | ||||
-rw-r--r-- | sys-apps/cpudyn/cpudyn-0.4.7.ebuild | 34 | ||||
-rw-r--r-- | sys-apps/cpudyn/files/cpudyn.init | 63 | ||||
-rw-r--r-- | sys-apps/cpudyn/files/digest-cpudyn-0.4.7 | 1 | ||||
-rw-r--r-- | sys-apps/cpudyn/metadata.xml | 8 |
5 files changed, 82 insertions, 31 deletions
diff --git a/sys-apps/cpudyn/Manifest b/sys-apps/cpudyn/Manifest index 2e1d2159362a..1e7f5116da20 100644 --- a/sys-apps/cpudyn/Manifest +++ b/sys-apps/cpudyn/Manifest @@ -1,6 +1,7 @@ MD5 083ae0f788f190d16154e2d8e6e1c8bd cpudyn-0.4.6.ebuild 871 -MD5 0c26312d25134befa7c43692a1578fa3 ChangeLog 401 -MD5 083ae0f788f190d16154e2d8e6e1c8bd cpudyn-0.4.7.ebuild 871 -MD5 70a4b92aa69bc469a69396dfaa0e1cf7 files/cpudyn.init 2464 +MD5 10a623470f0cbc30127a42b154becabc ChangeLog 593 +MD5 21cd68602737d7c996bceabf6e62c468 metadata.xml 223 +MD5 a55f5e0892e3deda09e6ef8c79731261 cpudyn-0.4.7.ebuild 871 +MD5 ab364bd773ca356672e4377c40e19552 files/cpudyn.init 2462 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.4.7.ebuild b/sys-apps/cpudyn/cpudyn-0.4.7.ebuild new file mode 100644 index 000000000000..bd262763461c --- /dev/null +++ b/sys-apps/cpudyn/cpudyn-0.4.7.ebuild @@ -0,0 +1,34 @@ +# 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/cpudyn-0.4.7.ebuild,v 1.1 2003/10/22 01:17:54 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" +IUSE="" +S=${WORKDIR}/${PN} + +src_compile() { + emake cpudynd || die "Compilation failed." +} + +src_install() { + into / + exeinto /etc/init.d + newexe ${FILESDIR}/cpudyn.init cpudyn + insinto /etc/conf.d + newins debian/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.init b/sys-apps/cpudyn/files/cpudyn.init index 3cfdd5193101..36208d9f4125 100644 --- a/sys-apps/cpudyn/files/cpudyn.init +++ b/sys-apps/cpudyn/files/cpudyn.init @@ -1,7 +1,12 @@ #!/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,v 1.2 2003/10/22 01:17:54 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 # DAEMON=/usr/sbin/cpudynd @@ -12,44 +17,44 @@ depend() { } checkconfig() { - local CPUFREQ_24="/proc/cpufreq" - local CPUFREQ_25="/sys/devices/system/cpu/cpu0/cpufreq /sysfs/devices/system/cpu/cpu0/cpufreq" - local CPUFREQ_ACPI="/proc/acpi/processor/CPU0/throttling" - 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" + local CPUFREQ_24="/proc/cpufreq" + local CPUFREQ_25="/sys/devices/system/cpu/cpu0/cpufreq /sysfs/devices/system/cpu/cpu0/cpufreq" + local CPUFREQ_ACPI="/proc/acpi/processor/CPU0/throttling" + 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 -eq 0 ]; then - eerror "Writing to ACPI throttling file failed" - return 1 - fi - fi + 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 } start() { - local CPUDYN_OPTS="-d" + 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 - + ebegin "Starting cpudynd" if checkconfig; then start-stop-daemon --start --quiet --pidfile $PIDFILE \ @@ -66,3 +71,5 @@ stop() { --exec $DAEMON && rm -f $PIDFILE eend $? } + +# vim:ts=4 noexpandtab: diff --git a/sys-apps/cpudyn/files/digest-cpudyn-0.4.7 b/sys-apps/cpudyn/files/digest-cpudyn-0.4.7 new file mode 100644 index 000000000000..7a1a82332e38 --- /dev/null +++ b/sys-apps/cpudyn/files/digest-cpudyn-0.4.7 @@ -0,0 +1 @@ +MD5 2550bf84873f78425c40dadae1000cad cpudyn-0.4.7.tgz 27327 diff --git a/sys-apps/cpudyn/metadata.xml b/sys-apps/cpudyn/metadata.xml new file mode 100644 index 000000000000..5d9f5be9d49d --- /dev/null +++ b/sys-apps/cpudyn/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>robbat2@gentoo.org</email> +</maintainer> +</pkgmetadata> |