Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2024 14:28:45 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 45f03c6eb18b - main - sysutils/bsdfan: the port had been improved (+)
Message-ID:  <202412081428.4B8ESj8o032135@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=45f03c6eb18bcd3224a6f66b0095d488bf350046

commit 45f03c6eb18bcd3224a6f66b0095d488bf350046
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2024-12-08 14:27:22 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2024-12-08 14:27:22 +0000

    sysutils/bsdfan: the port had been improved (+)
    
    - Install rc-script with resume command support
    - Respect installation ${PREFIX} while I'm here
    
    PR:             276991
    Submitted by:   Viacheslav Chimishuk
---
 sysutils/bsdfan/Makefile        |  4 +++-
 sysutils/bsdfan/files/bsdfan.in | 27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/sysutils/bsdfan/Makefile b/sysutils/bsdfan/Makefile
index caa9dfd6ebde..2fed28db54b9 100644
--- a/sysutils/bsdfan/Makefile
+++ b/sysutils/bsdfan/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	bsdfan
 PORTVERSION=	g20180112
+PORTREVISION=	1
 CATEGORIES=	sysutils
 
 MAINTAINER=	danfe@FreeBSD.org
@@ -16,7 +17,8 @@ USES=		uidfix
 USE_GITHUB=	yes
 GH_ACCOUNT=	claudiozz
 GH_TAGNAME=	d8428a7
-MAKE_ARGS=	MANDIR=${PREFIX}/share/man/man
+MAKE_ARGS=	BINDIR=${PREFIX}/bin MANDIR=${PREFIX}/share/man/man
+USE_RC_SUBR=	${PORTNAME}
 
 PLIST_FILES=	bin/bsdfan share/man/man1/bsdfan.1.gz \
 		@sample\ etc/bsdfan.conf.sample
diff --git a/sysutils/bsdfan/files/bsdfan.in b/sysutils/bsdfan/files/bsdfan.in
new file mode 100644
index 000000000000..ab6c18fecec4
--- /dev/null
+++ b/sysutils/bsdfan/files/bsdfan.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# PROVIDE: bsdfan
+# REQUIRE: DAEMON
+# KEYWORD: resume shutdown
+#
+
+. /etc/rc.subr
+
+name="bsdfan"
+desc="Control fan speed using temperature sensor"
+rcvar="bsdfan_enable"
+
+: ${bsdfan_enable="NO"}
+: ${bsdfan_flags="-d"}
+
+command="%%PREFIX%%/bin/${name}"
+extra_commands="resume"
+resume_cmd="bsdfan_resume"
+
+bsdfan_resume()
+{
+    run_rc_command restart
+}
+
+load_rc_config ${name}
+run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412081428.4B8ESj8o032135>