commit 2bd304e9c6587e4d59fdcb0fdd86ff2fe090dbbd
parent f050c5ce1b92f9d78c94f323d6010aebdaa5ba37
Author: aabacchus <ben@bvnf.space>
Date: Sat, 8 May 2021 00:47:35 +0100
thinkfan: new package at 1.2.1
Diffstat:
8 files changed, 78 insertions(+), 0 deletions(-)
diff --git a/thinkfan/build b/thinkfan/build
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+export DESTDIR="$1"
+
+# This build doesn't use the YAML config file,
+# because I don't want to install a yaml library.
+# However, the old config syntax is now deprecated.
+cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DDISABLE_SYSLOG=ON \
+ -DUSE_YAML=OFF
+
+cmake --build build
+cmake --install build
+
+install -Dm755 src/thinkfan.conf.legacy.5 "$1/usr/share/man/man5/thinkfan.conf.legacy.5"
+install -Dm755 thinkfan.conf "$1/etc/thinkfan.conf"
+install -Dm755 thinkfan.run "$1/etc/sv/thinkfan/run"
+ln -s /run/runit/supervise.thinkfan "$1/etc/sv/thinkfan/supervise"
diff --git a/thinkfan/checksums b/thinkfan/checksums
@@ -0,0 +1,3 @@
+a03fc0ed5bee33a1576c631e327fdd10f89fd906c5a413a8b01bd73d3fd97d25
+0ffb8cacae2e3f3d71ccf0105fe0922180d356c5be0cc6f705c6545a24903bd0
+223ce851d6e4f4d5a4cd959d8076b80cc0047b05fb097456226df9bb4d52ca45
diff --git a/thinkfan/depends b/thinkfan/depends
@@ -0,0 +1 @@
+cmake make
diff --git a/thinkfan/files/thinkfan.conf b/thinkfan/files/thinkfan.conf
@@ -0,0 +1,33 @@
+# To keep your HD from overheating, you have to specify a correction value for
+# the sensor that has the HD's temperature. You need to do this because
+# thinkfan uses only the highest temperature it can find in the system, and
+# that'll most likely never be your HD, as most HDs are already out of spec
+# when they reach 55 °C.
+# Correction values are applied from left to right in the same order as the
+# temperatures are read from the file.
+#
+# For example:
+# tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
+# will add a fixed value of 10 °C the 3rd value read from that file. Check out
+# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
+# want to add to certain temperatures.
+
+# Syntax:
+# (LEVEL, LOW, HIGH)
+# LEVEL is the fan level to use (0-7 with thinkpad_acpi)
+# LOW is the temperature at which to step down to the previous level
+# HIGH is the temperature at which to step up to the next level
+# All numbers are integers.
+#
+
+tp_fan /proc/acpi/ibm/fan
+tp_thermal /proc/acpi/ibm/thermal (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
+
+(0, 0, 48)
+(1, 46, 52)
+(2, 50, 56)
+(3, 52, 60)
+(4, 56, 64)
+(5, 59, 68)
+(7, 65, 32767)
+
diff --git a/thinkfan/files/thinkfan.run b/thinkfan/files/thinkfan.run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec thinkfan -nq 2>&1
diff --git a/thinkfan/post-install b/thinkfan/post-install
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+cat << EOF
+For this program to work, you'll need the thinkpad_acpi kernel module,
+loaded with the option 'fan_control=1':
+Either add
+
+ thinkpad_acpi.fan_control=1
+
+to your linux commandline (if the module is built-in), or add
+
+ options thinkpad_acpi fan_control=1
+
+to your modprobe stuff.
+EOF
diff --git a/thinkfan/sources b/thinkfan/sources
@@ -0,0 +1,3 @@
+https://github.com/vmatare/thinkfan/archive/refs/tags/1.2.1.tar.gz
+files/thinkfan.conf
+files/thinkfan.run
diff --git a/thinkfan/version b/thinkfan/version
@@ -0,0 +1 @@
+1.2.1 1