diff options
author | miwi <miwi@FreeBSD.org> | 2008-11-23 21:43:09 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2008-11-23 21:43:09 +0800 |
commit | fff82ad8a844eff40bd3b0be5b1329619b93fef2 (patch) | |
tree | 6dc15f785c82a6593f707d179759df5612dd0c5b /sysutils/cpupowerd | |
parent | 6be465cddc2962f7a8389c07c69961841bcad060 (diff) | |
download | freebsd-ports-graphics-fff82ad8a844eff40bd3b0be5b1329619b93fef2.tar.gz freebsd-ports-graphics-fff82ad8a844eff40bd3b0be5b1329619b93fef2.tar.zst freebsd-ports-graphics-fff82ad8a844eff40bd3b0be5b1329619b93fef2.zip |
A daemon which controls the frequency and voltage of CPUs.
This userland program adjusts the frequency and voltage
according to the CPUs load. Its capabilities include
overvolting as well as undervolting.
WWW: http://cpupowerd.sourceforge.net/
PR: ports/128617
Submitted by: Bernhard Fr__hlich <decke at bluelife.at>
Diffstat (limited to 'sysutils/cpupowerd')
-rw-r--r-- | sysutils/cpupowerd/Makefile | 50 | ||||
-rw-r--r-- | sysutils/cpupowerd/distinfo | 3 | ||||
-rw-r--r-- | sysutils/cpupowerd/files/cpupowerd.in | 37 | ||||
-rw-r--r-- | sysutils/cpupowerd/files/patch-libcpupowerd.c | 10 | ||||
-rw-r--r-- | sysutils/cpupowerd/pkg-descr | 7 | ||||
-rw-r--r-- | sysutils/cpupowerd/pkg-message | 15 | ||||
-rw-r--r-- | sysutils/cpupowerd/pkg-plist | 8 |
7 files changed, 130 insertions, 0 deletions
diff --git a/sysutils/cpupowerd/Makefile b/sysutils/cpupowerd/Makefile new file mode 100644 index 00000000000..a2558b19a51 --- /dev/null +++ b/sysutils/cpupowerd/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: cpupowerd +# Date created: 2008-06-01 +# Whom: Bernhard Fr__hlich <decke@bluelife.at> +# +# $FreeBSD$ +# + +PORTNAME= cpupowerd +PORTVERSION= 0.2.0 +CATEGORIES= sysutils +MASTER_SITES= SF + +MAINTAINER= decke@bluelife.at +COMMENT= A CPU over- and undervolting daemon + +USE_RC_SUBR= cpupowerd +ONLY_FOR_ARCHS= i386 amd64 +WRKSRC= ${WRKDIR}/${DISTNAME}/src +MAKE_ENV+= GROUP=wheel \ + RIGHTS=555 + +OPTIONS= CREATELOAD "Install createload.sh for stability testing" Off + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 800042 +BUILD_DEPENDS+= ${LOCALBASE}/include/cpu.h:${PORTSDIR}/sysutils/devcpu +.endif + +.if defined(WITH_CREATELOAD) +RUN_DEPENDS+= burnMMX:${PORTSDIR}/sysutils/cpuburn +PLIST_SUB+= CREATELOAD="" +.else +PLIST_SUB+= CREATELOAD="@comment " +.endif + +post-install: +.if defined(WITH_CREATELOAD) + ${INSTALL_SCRIPT} ${WRKSRC}/../tools/createload.sh ${PREFIX}/bin/createload.sh +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/../CHANGELOG ${DOCSDIR}/CHANGELOG + ${INSTALL_DATA} ${WRKSRC}/../COPYING ${DOCSDIR}/COPYING + ${INSTALL_DATA} ${WRKSRC}/../README ${DOCSDIR}/README + ${INSTALL_DATA} ${WRKSRC}/../TODO ${DOCSDIR}/TODO +.endif + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/sysutils/cpupowerd/distinfo b/sysutils/cpupowerd/distinfo new file mode 100644 index 00000000000..5b9173ced00 --- /dev/null +++ b/sysutils/cpupowerd/distinfo @@ -0,0 +1,3 @@ +MD5 (cpupowerd-0.2.0.tar.gz) = 008eaf562f59c9d0fcf79de231948e4f +SHA256 (cpupowerd-0.2.0.tar.gz) = 86ad76e9611bd60ac6e9ee3a800ec72cc9d129b5b61750e07a9e015f89d1e849 +SIZE (cpupowerd-0.2.0.tar.gz) = 42794 diff --git a/sysutils/cpupowerd/files/cpupowerd.in b/sysutils/cpupowerd/files/cpupowerd.in new file mode 100644 index 00000000000..db71d31fd77 --- /dev/null +++ b/sysutils/cpupowerd/files/cpupowerd.in @@ -0,0 +1,37 @@ +#!/bin/sh + +# PROVIDE: cpupowerd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: nojail +# +# Add the following line to /etc/rc.conf[.local] to enable cpupowerd +# +# cpupowerd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable cpupowerd. +# cpupowerd_config (str): Custom config file for cpupowerd. +# (default /usr/local/etc/cpupowerd.conf) +# cpupowerd_flags (str): Custom additional arguments to be passed +# to cpupowerd (default -d -c cpupowerd.conf). +# + +. %%RC_SUBR%% + +name="cpupowerd" +rcvar=`set_rcvar` +command=%%PREFIX%%/sbin/${name} + +load_rc_config $name + +if [ ! -c "/dev/cpu0" -a ! -c "/dev/cpuctl0" ]; then + kldload cpu +fi + +# set default +: ${cpupowerd_enable="NO"} +: ${cpupowerd_config="%%PREFIX%%/etc/cpupowerd.conf"} +: ${cpupowerd_flags=""} + +command_args="-d -c ${cpupowerd_config} ${cpupowerd_flags}" + +run_rc_command "$1" diff --git a/sysutils/cpupowerd/files/patch-libcpupowerd.c b/sysutils/cpupowerd/files/patch-libcpupowerd.c new file mode 100644 index 00000000000..494e4c0ff73 --- /dev/null +++ b/sysutils/cpupowerd/files/patch-libcpupowerd.c @@ -0,0 +1,10 @@ +--- libcpupowerd.c.orig 2008-11-13 22:38:33.000000000 +0100 ++++ libcpupowerd.c 2008-11-13 22:39:19.000000000 +0100 +@@ -33,6 +33,7 @@ + #include <sys/ioctl.h> + #include <sys/sysctl.h> + #ifdef __FreeBSD__ ++#include <sys/param.h> + #if __FreeBSD_version < 800042 + #include <cpu.h> + #define RDMSR CPU_RDMSR diff --git a/sysutils/cpupowerd/pkg-descr b/sysutils/cpupowerd/pkg-descr new file mode 100644 index 00000000000..276ccb52398 --- /dev/null +++ b/sysutils/cpupowerd/pkg-descr @@ -0,0 +1,7 @@ +A daemon which controls the frequency and voltage of CPUs. + +This userland program adjusts the frequency and voltage +according to the CPUs load. Its capabilities include +overvolting as well as undervolting. + +WWW: http://cpupowerd.sourceforge.net/ diff --git a/sysutils/cpupowerd/pkg-message b/sysutils/cpupowerd/pkg-message new file mode 100644 index 00000000000..730f875a1d0 --- /dev/null +++ b/sysutils/cpupowerd/pkg-message @@ -0,0 +1,15 @@ +============================================================================= + +cpupowerd was installed. + +To generate a safe dafault config for you cpu you can use the "-a" or +"--autoconfig" switch. + +cpupowerd -a /usr/local/etc/cpupowerd.conf + +Please follow the README to customize this values for your CPU but be +carefully because you can REALLY DAMAGE YOUR CPU with that! + +Please, report any problems to maintainer. Thanks! + +============================================================================= diff --git a/sysutils/cpupowerd/pkg-plist b/sysutils/cpupowerd/pkg-plist new file mode 100644 index 00000000000..2635c67e9b7 --- /dev/null +++ b/sysutils/cpupowerd/pkg-plist @@ -0,0 +1,8 @@ +@comment $FreeBSD$ +sbin/cpupowerd +%%CREATELOAD%%bin/createload.sh +%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%@dirrm %%DOCSDIR%% |