summaryrefslogtreecommitdiffstats
path: root/mobile
diff options
context:
space:
mode:
Diffstat (limited to 'mobile')
-rwxr-xr-xmobile/thinkfan/BUILD1
-rwxr-xr-xmobile/thinkfan/DEPENDS5
-rwxr-xr-xmobile/thinkfan/DETAILS25
-rwxr-xr-xmobile/thinkfan/FINAL6
-rw-r--r--mobile/thinkfan/HISTORY3
-rwxr-xr-xmobile/thinkfan/PRE_BUILD3
-rw-r--r--mobile/thinkfan/init.d/thinkfan43
7 files changed, 86 insertions, 0 deletions
diff --git a/mobile/thinkfan/BUILD b/mobile/thinkfan/BUILD
new file mode 100755
index 0000000000..eebdeb0c1a
--- /dev/null
+++ b/mobile/thinkfan/BUILD
@@ -0,0 +1 @@
+OPTS="$OPTS -Wno-dev" cmake_build
diff --git a/mobile/thinkfan/DEPENDS b/mobile/thinkfan/DEPENDS
new file mode 100755
index 0000000000..a5e7356a4d
--- /dev/null
+++ b/mobile/thinkfan/DEPENDS
@@ -0,0 +1,5 @@
+depends cmake &&
+optional_depends libatasmart \
+ "-DUSE_ATASMART=ON" \
+ "-DUSE_ATASMART=OFF" \
+ "read hard disk temperatures via SMART"
diff --git a/mobile/thinkfan/DETAILS b/mobile/thinkfan/DETAILS
new file mode 100755
index 0000000000..74b8cb4125
--- /dev/null
+++ b/mobile/thinkfan/DETAILS
@@ -0,0 +1,25 @@
+ SPELL=thinkfan
+ VERSION=0.9.2
+ SOURCE="$SPELL-$VERSION.tar.gz"
+ SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/$SPELL/$SOURCE
+ SOURCE_HASH=sha512:b27fd60a02ad06d30485ae3d658af6b9e79af3c898f415d0ff613839424f5dc9731be03d1d9bf3ed1311ecd0778aef5b30fa908cab386cf419db77ae29940684
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ WEB_SITE="http://sourceforge.net/projects/thinkfan/"
+ LICENSE[0]=GPL
+ ENTERED=20160105
+ SHORT="A simple fan control program."
+cat << EOF
+A simple fan control program. Read temperatures, check them against configured
+limits and switch to appropriate (also pre-configured) fan level. Requires
+a working thinkpad_acpi or any other hwmon driver that enables temperature
+reading and fan control from userspace.
+
+Features:
+
+- per-sensor temperature limits - arbitrary strings as fan level (supports
+"disengaged"
+ and "auto" modes on thinkpads)
+- some sanity checks (cough) - DANGEROUS mode which allows you to destroy
+your hardware - ability to destroy your hardware even without dangerous
+ mode if you try hard enough
+EOF
diff --git a/mobile/thinkfan/FINAL b/mobile/thinkfan/FINAL
new file mode 100755
index 0000000000..c78bd3cc3c
--- /dev/null
+++ b/mobile/thinkfan/FINAL
@@ -0,0 +1,6 @@
+message \
+"${PROBLEM_COLOR}Before starting the init script, ensure to have a config file matching
+your hardware in $INSTALL_ROOT/etc/thinkfan.conf, See examples in
+$INSTALL_ROOT/usr/share/doc/thinkfan/. You should carefully tune/check the
+settings to avoid damaging your hardware because of insufficient cooling.$DEFAULT_COLOR"
+
diff --git a/mobile/thinkfan/HISTORY b/mobile/thinkfan/HISTORY
new file mode 100644
index 0000000000..5a1a124d28
--- /dev/null
+++ b/mobile/thinkfan/HISTORY
@@ -0,0 +1,3 @@
+2016-01-05 Thomas Orgis <sobukus@sourcemage.org>
+ * BUILD, DEPENDS, DETAILS, PRE_BUILD, FINAL, init.d/thinkfan: created
+
diff --git a/mobile/thinkfan/PRE_BUILD b/mobile/thinkfan/PRE_BUILD
new file mode 100755
index 0000000000..284653e5b0
--- /dev/null
+++ b/mobile/thinkfan/PRE_BUILD
@@ -0,0 +1,3 @@
+mkdir -p "$SOURCE_DIRECTORY" &&
+cd "$SOURCE_DIRECTORY" &&
+unpack_file
diff --git a/mobile/thinkfan/init.d/thinkfan b/mobile/thinkfan/init.d/thinkfan
new file mode 100644
index 0000000000..7e92c86736
--- /dev/null
+++ b/mobile/thinkfan/init.d/thinkfan
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/thinkfan
+DESC="Fan cooling control daemon"
+ARGS=-q
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+required_executable $PROGRAM
+
+start()
+{
+ echo "Starting $DESC: $NAME"
+ loadproc $PROGRAM
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping $DESC: $NAME "
+ killproc $PROGRAM
+ evaluate_retval
+}
+
+status()
+{
+ statusproc $PROGRAM
+}
+
+restart()
+{
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo "Restarting $DESC: $NAME"
+ stop
+ sleep 1
+ start
+}
+