package/mbpfan: new package
authorChristian Stewart <christian@paral.in>
Mon, 18 May 2020 03:48:58 +0000 (20:48 -0700)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 27 Jul 2020 08:13:06 +0000 (10:13 +0200)
Adding mbpfan, a fan control daemon for MacBook laptops.

Signed-off-by: Christian Stewart <christian@paral.in>
[Peter: add hash file, drop Debian init script, drop systemd symlinks, add
 DEVELOPERS entry]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
DEVELOPERS
package/Config.in
package/mbpfan/Config.in [new file with mode: 0644]
package/mbpfan/mbpfan.hash [new file with mode: 0644]
package/mbpfan/mbpfan.mk [new file with mode: 0644]

index 9105626083ee9d79f08ed11769fdbc23e3bb0798..b9cef9185f0fd2629d6f7fa137f7b7188f153273 100644 (file)
@@ -553,6 +553,7 @@ F:  package/docker-engine/
 F:     package/docker-proxy/
 F:     package/fuse-overlayfs/
 F:     package/go/
+F:     package/mbpfan/
 F:     package/mosh/
 F:     package/pkg-golang.mk
 F:     package/rtl8821au/
index 178b4da98afe781c4eebd613f14f1e1b22dfb677..5c30d27b7acde36e7b30899dbe6da3676867b197 100644 (file)
@@ -490,6 +490,7 @@ endmenu
        source "package/luksmeta/Config.in"
        source "package/lvm2/Config.in"
        source "package/mali-t76x/Config.in"
+       source "package/mbpfan/Config.in"
        source "package/mdadm/Config.in"
        source "package/mdevd/Config.in"
        source "package/memtest86/Config.in"
diff --git a/package/mbpfan/Config.in b/package/mbpfan/Config.in
new file mode 100644 (file)
index 0000000..231faa2
--- /dev/null
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_MBPFAN
+       bool "mbpfan"
+       depends on BR2_USE_MMU
+       help
+         Mbpfan is a daemon for MacBook laptops which monitors the
+         CPU temperature with the coretemp module, and sets the fan
+         speeds with the applesmc module.
+
+         https://github.com/linux-on-mac/mbpfan
diff --git a/package/mbpfan/mbpfan.hash b/package/mbpfan/mbpfan.hash
new file mode 100644 (file)
index 0000000..eafd313
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  52a3a79d99f775fe90917a0958e527ea14ff5b83d010164bd91f7cc3ce046b6a  mbpfan-2.2.1.tar.gz
+sha256  589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2  COPYING
diff --git a/package/mbpfan/mbpfan.mk b/package/mbpfan/mbpfan.mk
new file mode 100644 (file)
index 0000000..2455b0a
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+#
+# mbpfan
+#
+################################################################################
+
+MBPFAN_VERSION = 2.2.1
+MBPFAN_SITE = $(call github,linux-on-mac,mbpfan,v$(MBPFAN_VERSION))
+MBPFAN_LICENSE = GPL-3.0+
+MBPFAN_LICENSE_FILES = COPYING
+
+define MBPFAN_BUILD_CMDS
+       $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
+               $(MAKE) CC="$(TARGET_CC)" -C $(@D)
+endef
+
+define MBPFAN_INSTALL_TARGET_CMDS
+       $(INSTALL) -D -m 0644 $(@D)/mbpfan.conf \
+               $(TARGET_DIR)/etc/mbpfan.conf
+       $(INSTALL) -m 0755 $(@D)/bin/mbpfan $(TARGET_DIR)/usr/sbin/mbpfan
+endef
+
+define MBPFAN_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 $(@D)/mbpfan.service \
+               $(TARGET_DIR)/usr/lib/systemd/system/mbpfan.service
+endef
+
+$(eval $(generic-package))