Date: Wed, 1 Mar 2006 17:06:08 +0200 From: "Ion-Mihai "IOnut" Tetcu" <itetcu@people.tecnik93.com> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/93985: [PATCH] sysutils/est: fix deinstall, other fixes Message-ID: <1141225568.8091@it.buh.tecnik93.com> Resent-Message-ID: <200603011510.k21FA5h8062760@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 93985 >Category: ports >Synopsis: [PATCH] sysutils/est: fix deinstall, other fixes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 01 15:10:05 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ion-Mihai "IOnut" Tetcu >Release: FreeBSD 6.1-PRERELEASE i386 >Organization: Tecnik'93 >Environment: System: FreeBSD 6.1-PRERELEASE #0: Fri Feb 17 08:33:28 EET 2006 root@it.buh.tecnik93.com:/usr/obj/usr/src/sys/IT6_B_P >Description: Remove PREFIX/modules directory if it doesn't contain other modules; use statical plist (new file: pkg-plist). Switch to a modern USE_RC_SUBR (moved file: files/est.sh --> files/est.in). Silence install here and there. Fix IGNORE message. IGNORE if no kernel sources installed. Bump PORTREVISION for plist change. >How-To-Repeat: >Fix: --- est.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/est/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 7 Jan 2006 06:29:54 -0000 1.10 +++ Makefile 1 Mar 2006 14:59:39 -0000 @@ -7,7 +7,7 @@ PORTNAME= est PORTVERSION= 0.7.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://www.daemonology.net/freebsd-est/ @@ -18,27 +18,22 @@ 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 +USE_RC_SUBR= ${PORTNAME} .include <bsd.port.pre.mk> .if ${OSVERSION} > 600015 -IGNORE= est now contained in the base system (see cpufreq(4)) +IGNORE= is now contained in the base system (see cpufreq(4)) .endif -post-extract: - ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/est.sh > ${WRKDIR}/est.sh +.if !exists(${SRC_BASE}/sys/Makefile) +IGNORE= needs kernel source files +.endif pre-install: - ${MKDIR} ${KMODDIR} + @${MKDIR} ${KMODDIR} post-install: - ${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/est.sh - ${CAT} ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> Index: pkg-message =================================================================== RCS file: /home/ncvs/ports/sysutils/est/pkg-message,v retrieving revision 1.1 diff -u -r1.1 pkg-message --- pkg-message 2 Sep 2004 04:14:21 -0000 1.1 +++ pkg-message 1 Mar 2006 14:59:39 -0000 @@ -1,5 +1,7 @@ +=============================================================================== 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 +=============================================================================== Index: pkg-plist =================================================================== RCS file: pkg-plist diff -N pkg-plist --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg-plist 1 Mar 2006 14:59:39 -0000 @@ -0,0 +1,3 @@ +modules/est.ko +@unexec MOD_FNR=`ls -1 %D/modules |wc -l`; MOD_L=`ls -1 %D/modules |grep linker.hints|wc -l`; if [ "${MOD_FNR}" -eq "${MOD_L}" ]; then rm -rf %D/modules; fi +@dirrmtry modules Index: files/est.in =================================================================== RCS file: files/est.in diff -N files/est.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/est.in 1 Mar 2006 14:59:39 -0000 @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD: ports/sysutils/est/files/est.sh,v 1.4 2006/02/20 20:47:41 dougb Exp $ +# + +# PROVIDE: est +# REQUIRE: abi +# BEFORE: securelevel + +# 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="${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 +} + +est_stop () { + /sbin/kldunload $name +} + +run_rc_command "$1" Index: files/est.sh =================================================================== RCS file: files/est.sh diff -N files/est.sh --- files/est.sh 20 Feb 2006 20:47:41 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,43 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/sysutils/est/files/est.sh,v 1.4 2006/02/20 20:47:41 dougb Exp $ -# - -# PROVIDE: est -# REQUIRE: abi -# BEFORE: securelevel - -# 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="${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 -} - -est_stop () { - /sbin/kldunload $name -} - -run_rc_command "$1" --- est.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1141225568.8091>