aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-13 20:11:37 +0900
committerOphestra <cat@gensokyo.uk>2026-05-13 20:11:37 +0900
commit6dbbf15c0eae51fd2e2504273d0b8ed0ef8b5a9d (patch)
tree7ee5769ce74f97938e718f2378faf7064e6e5e8e
parentbe7de68a42c0ad0d948601e9aa40337585559472 (diff)
internal/rosa: lm_sensors artifact
Generally useful, and an optional dependency of mesa. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/all.go1
-rw-r--r--internal/rosa/lm-sensors.go59
2 files changed, 60 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index 72e30510..5e09595c 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -108,6 +108,7 @@ const (
Libxml2
Libxslt
Libxtrans
+ LMSensors
M4
MPC
MPFR
diff --git a/internal/rosa/lm-sensors.go b/internal/rosa/lm-sensors.go
new file mode 100644
index 00000000..6ecb4ba0
--- /dev/null
+++ b/internal/rosa/lm-sensors.go
@@ -0,0 +1,59 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+func (t Toolchain) newLMSensors() (pkg.Artifact, string) {
+ const (
+ version = "3-6-2"
+ checksum = "7JYNutrihe-FP6r3ftf96uFZJJWPfxnBHL0ALSMA-vovaXVRr-sAjlLitw7WWpCI"
+ )
+ return t.NewPackage("lm_sensors", version, newFromGitHub(
+ "lm-sensors/lm-sensors",
+ "V"+version,
+ checksum,
+ ), &PackageAttr{
+ Writable: true,
+ Chmod: true,
+ EnterSource: true,
+
+ ScriptEarly: `
+ln -s \
+ ../../system/bin/perl \
+ /usr/bin/
+`,
+ }, &MakeHelper{
+ InPlace: true,
+ SkipConfigure: true,
+
+ Make: []string{
+ "CC=cc",
+ "ETCDIR=/system/etc",
+ "PREFIX=/system",
+ },
+
+ Check: []string{
+ "CC=cc",
+ "check",
+ },
+
+ Install: "make DESTDIR=/work PREFIX=/system install",
+ },
+ Perl,
+ PerlTestCmd,
+
+ M4,
+ Bison,
+ Flex,
+ ), version
+}
+func init() {
+ artifactsM[LMSensors] = Metadata{
+ f: Toolchain.newLMSensors,
+
+ Name: "lm_sensors",
+ Description: "user-space support for hardware monitoring drivers",
+ Website: "https://hwmon.wiki.kernel.org/lm_sensors",
+
+ ID: 1831,
+ }
+}