From: Mike Frysinger Date: Sun, 10 Oct 2004 06:42:10 +0000 (+0000) Subject: ver bump #53507 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32b49b04937115992afd0f04ca8c3218bf847bde;p=gentoo.git ver bump #53507 --- diff --git a/sys-apps/cpudyn/ChangeLog b/sys-apps/cpudyn/ChangeLog index 080a98fde43f..19bf2c4d28bc 100644 --- a/sys-apps/cpudyn/ChangeLog +++ b/sys-apps/cpudyn/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/cpudyn # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/ChangeLog,v 1.11 2004/09/03 21:03:23 pvdabeel Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/ChangeLog,v 1.12 2004/10/10 06:42:10 vapier Exp $ + +*cpudyn-1.0 (10 Oct 2004) + + 10 Oct 2004; Mike Frysinger files/cpudyn.init, + +cpudyn-1.0.ebuild: + Version bump #53507 by Jakob Schiotz. 03 Sep 2004; Pieter Van den Abeele cpudyn-0.4.7-r1.ebuild, cpudyn-0.5.0.ebuild, cpudyn-0.6.1.ebuild, diff --git a/sys-apps/cpudyn/cpudyn-1.0.ebuild b/sys-apps/cpudyn/cpudyn-1.0.ebuild new file mode 100644 index 000000000000..8b60f8b59069 --- /dev/null +++ b/sys-apps/cpudyn/cpudyn-1.0.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/cpudyn-1.0.ebuild,v 1.1 2004/10/10 06:42:10 vapier 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-apps/cpudyn/files/cpudyn.init b/sys-apps/cpudyn/files/cpudyn.init index f23a0553772a..9ad3f2ddd7ba 100644 --- a/sys-apps/cpudyn/files/cpudyn.init +++ b/sys-apps/cpudyn/files/cpudyn.init @@ -1,17 +1,20 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/files/cpudyn.init,v 1.4 2004/07/15 00:38:51 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cpudyn/files/cpudyn.init,v 1.5 2004/10/10 06:42:10 vapier Exp $ # # Based on the Debian init script written by Celso Gonzalez , # and on the cpufreqd Gentoo init script written by Robert Gogolok . # Heavily modified by Robin H. Johnson to ensure correct # start only under support conditions +# More preconditions by Karl Trygve Kalleberg # DAEMON=/usr/sbin/cpudynd PIDFILE=/var/run/cpudynd.pid +opts="${opts} min max dynamic" + depend() { need localmount } @@ -41,6 +44,25 @@ checkconfig() { 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 } @@ -51,6 +73,7 @@ start() { 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 @@ -69,4 +92,20 @@ stop() { 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-apps/cpudyn/files/digest-cpudyn-1.0 b/sys-apps/cpudyn/files/digest-cpudyn-1.0 new file mode 100644 index 000000000000..d2da76bda5b4 --- /dev/null +++ b/sys-apps/cpudyn/files/digest-cpudyn-1.0 @@ -0,0 +1 @@ +MD5 2922149f624a07b3d6f012a084e89e7a cpudyn-1.0.tgz 32017