aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-09-02 12:14:21 +0800
committeredwin <edwin@FreeBSD.org>2004-09-02 12:14:21 +0800
commit5bdfb65641c1c8b960258cb5c748712434ebabfd (patch)
tree0ae73be07eb2ed1590ef83888e7c2660cb539f56
parent6f79579a268fd05bd78c7ebf67d86cc93d891444 (diff)
downloadfreebsd-ports-gnome-5bdfb65641c1c8b960258cb5c748712434ebabfd.tar.gz
freebsd-ports-gnome-5bdfb65641c1c8b960258cb5c748712434ebabfd.tar.zst
freebsd-ports-gnome-5bdfb65641c1c8b960258cb5c748712434ebabfd.zip
[MAINTAINER UPDATE] sysutils/est
Update port to version 0.6. This adds a sysctl "hw.est_verbose" which controls whether frequency changes are logged, and converts the rc.d script to use the rcNG framework. Note that the module will now only load if 'est_enable="YES"' appears in rc.conf, rc.conf.local, or rc.conf.d/est. PR: ports/71269 Submitted by: Colin Percival <cperciva@daemonology.net>
-rw-r--r--sysutils/est/Makefile12
-rw-r--r--sysutils/est/distinfo4
-rw-r--r--sysutils/est/files/est.sh56
-rw-r--r--sysutils/est/pkg-message5
4 files changed, 55 insertions, 22 deletions
diff --git a/sysutils/est/Makefile b/sysutils/est/Makefile
index bd9aa4c60ef9..1162263c579f 100644
--- a/sysutils/est/Makefile
+++ b/sysutils/est/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= est
-PORTVERSION= 0.5
+PORTVERSION= 0.6
CATEGORIES= sysutils
MASTER_SITES= http://www.daemonology.net/freebsd-est/
@@ -17,6 +17,9 @@ ONLY_FOR_ARCHS= i386
KMODDIR= ${PREFIX}/modules
MAKE_ARGS= KMODDIR="${KMODDIR}"
+USE_RC_SUBR= yes
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
PLIST_FILES= modules/est.ko \
etc/rc.d/est.sh
@@ -27,13 +30,14 @@ EXTRA_PATCHES= ${FILESDIR}/est.c.diff.fbsd4
.endif
post-extract:
- @${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${FILESDIR}/est.sh \
- > ${WRKDIR}/est.sh
+ ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/est.sh > ${WRKDIR}/est.sh
pre-install:
${MKDIR} ${KMODDIR}
post-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/
+ ${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/est.sh
+ ${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/sysutils/est/distinfo b/sysutils/est/distinfo
index 7dffc6375e1b..a71f1d1bf55e 100644
--- a/sysutils/est/distinfo
+++ b/sysutils/est/distinfo
@@ -1,2 +1,2 @@
-MD5 (est-0.5.tar.gz) = 9ae866be0144aa0c904279fc8683f650
-SIZE (est-0.5.tar.gz) = 3847
+MD5 (est-0.6.tar.gz) = 57cf42fa9d1bf213a25c70e3cf5a2e08
+SIZE (est-0.6.tar.gz) = 3891
diff --git a/sysutils/est/files/est.sh b/sysutils/est/files/est.sh
index f6d2bb0a9d53..c822db796ca4 100644
--- a/sysutils/est/files/est.sh
+++ b/sysutils/est/files/est.sh
@@ -1,20 +1,44 @@
#!/bin/sh
+#
+# $FreeBSD$
+#
-kmoddir=@@PREFIX@@/modules
-kmod=est.ko
+# PROVIDE: est
+# REQUIRE: abi
+# BEFORE: securelevel
+# KEYWORD: FreeBSD
-case "$1" in
-start)
- if [ -x $kmoddir/$kmod ]; then
- echo -n ' est'
- /sbin/kldload $kmoddir/$kmod
+# Define est_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/est
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+est_enable="NO"
+est_verbose="NO"
+
+. %%RC_SUBR%%
+
+name="est"
+rcvar=`set_rcvar`
+
+start_cmd="est_start"
+stop_cmd="est_stop"
+
+load_rc_config $name
+
+kmoddir="%%PREFIX%%/modules"
+
+est_start () {
+ /sbin/kldload ${kmoddir}/est.ko
+ if checkyesno est_verbose; then
+ sysctl hw.est_verbose=1
fi
- ;;
-stop)
- /sbin/kldunload $kmod && echo -n ' est'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- exit 64
- ;;
-esac
+}
+
+est_stop () {
+ /sbin/kldunload $name
+}
+
+run_rc_command "$1"
diff --git a/sysutils/est/pkg-message b/sysutils/est/pkg-message
new file mode 100644
index 000000000000..e13e87d9aad1
--- /dev/null
+++ b/sysutils/est/pkg-message
@@ -0,0 +1,5 @@
+To load the Enhanced Speedstep kernel module at boot:
+ echo 'est_enable="YES"' >> /etc/rc.conf
+
+To log every change of CPU frequency:
+ echo 'est_verbose="YES"' >> /etc/rc.conf