Hello,
I've noticed that Parabola is shipping a quite outdated version of thinkfan, so
I've attached an updated PKGBUILD rebased upon the new upstream (AUR).

As usual, tested to compile with libremakepkg and added armv7h target.

-- 
Kind Regards,
Wael Karram.


From e6a7523c879a3ff0fe1931fb89e4b3e37afed70e Mon Sep 17 00:00:00 2001
From: wael <w...@waelk.tech>
Date: Fri, 6 Jan 2023 17:13:59 +0200
Subject: [PATCH] Updated thinkfan, rebased onto upstream (AUR) PKGBUILD

---
 pcr/thinkfan/PKGBUILD         | 37 ++++++++++++++++++++++-------------
 pcr/thinkfan/thinkfan.service |  8 +++++---
 2 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/pcr/thinkfan/PKGBUILD b/pcr/thinkfan/PKGBUILD
index 034c8311c1..7fb2c5912f 100644
--- a/pcr/thinkfan/PKGBUILD
+++ b/pcr/thinkfan/PKGBUILD
@@ -1,22 +1,29 @@
-# Maintainer (arch): nblock <nblock [/at\] archlinux DOT us>
-# Contributor: Frederik Alkærsig (FALKER) <havnelisten AT gmail.com>
-# Maintainer: Omar Vega Ramos <ovr...@gnu.org.pe>
+# Maintainer (AUR): Barry Smith <brrtsm at gmail.com>
+# Contributor (AUR): nblock <nblock [/at\] archlinux DOT us>
+# Contributor (AUR): Frederik Alkærsig (FALKER) <havnelisten AT gmail.com>
+# Maintainer (Parabola): Omar Vega Ramos <ovruni.gnu.org.pe>
+# Maintainer (Parabola): Wael Karram <w...@waelk.tech>
+
+# Parabola changes and rationale:
+# Add armv7h target
 
 pkgname=thinkfan
-pkgver=0.9.3
+pkgver=1.3.1
 pkgrel=1
 pkgdesc="A minimalist fan control program. Supports the sysfs hwmon interface and thinkpad_acpi"
-url="http://thinkfan.sourceforge.net/";
+url="https://github.com/vmatare/thinkfan";
 arch=('i686' 'x86_64')
+arch+=('armv7h')
 makedepends=('cmake')
-depends=('libatasmart')
+depends=('libatasmart' 'yaml-cpp')
 optdepends=('lm_sensors: hwmon support')
+backup=('etc/systemd/system/thinkfan.service.d/override.conf')
 license=('GPL')
-source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.gz
+source=("$pkgname-$pkgver.tar.gz::https://github.com/vmatare/$pkgname/archive/$pkgver.tar.gz";
         'thinkfan.service'
         'thinkpad_acpi.conf')
-sha256sums=('b61c634996c450445d7e440bf41f7adcda86506063f832afa40d44e01061e45b'
-            '90f0270b4044a41315feb7bc1447ce4a0d5ee50178682e9a1d2a36b07c1a494f'
+sha256sums=('9466c8c82b7c4333b280fa66445ab26185ffbb4aada6bcb4a164eed742f8d78c'
+            '625730e33fae251f3a1cc8259b222089fb45ada08e9cf5c816ea1cde6560e989'
             '28874576641b3cc1aa486e1bc9ed40eadfe8b13d6d3014016e31fedc5dc5195f')
 install=thinkfan.install
 
@@ -30,13 +37,15 @@ build() {
 package() {
   cd "$srcdir/$pkgname-$pkgver"
 
-  install -d -m755 "$pkgdir"/usr/{bin,lib/{modprobe.d,systemd/system},share/{doc/"$pkgname"/{,examples},man/man1}}
+  install -d -m755 "$pkgdir"/usr/{bin,lib/{modprobe.d,systemd/system},share/{doc/"$pkgname"/{,examples},man/man{1,5}}}
+  install -d -m755 "$pkgdir"/etc/systemd/system/thinkfan.service.d
   install -D -m755 "$pkgname" "$pkgdir"/usr/bin
-  install -D -m644 README NEWS "$pkgdir"/usr/share/doc/"$pkgname"
   install -D -m644 examples/* "$pkgdir"/usr/share/doc/"$pkgname"/examples
-  install -D -m644 src/"$pkgname".1 "$pkgdir"/usr/share/man/man1
-  install -D -m644 ../"$pkgname".service "$pkgdir"/usr/lib/systemd/system
-  install -D -m644 ../thinkpad_acpi.conf "$pkgdir"/usr/lib/modprobe.d
+  install -D -m644 "$pkgname".1 "$pkgdir"/usr/share/man/man1
+  install -D -m644 "$pkgname".conf.5 "$pkgdir"/usr/share/man/man5
+  install -D -m644 "$srcdir/$pkgname".service rcscripts/systemd/thinkfan-{sleep,wakeup}.service "$pkgdir"/usr/lib/systemd/system
+  install -D -m644 rcscripts/systemd/override.conf "$pkgdir"/etc/systemd/system/thinkfan.service.d
+  install -D -m644 "$srcdir"/thinkpad_acpi.conf "$pkgdir"/usr/lib/modprobe.d
 }
 
 # vim:set ts=2 sw=2 noet:
diff --git a/pcr/thinkfan/thinkfan.service b/pcr/thinkfan/thinkfan.service
index 5618aed6fe..d23218aad2 100644
--- a/pcr/thinkfan/thinkfan.service
+++ b/pcr/thinkfan/thinkfan.service
@@ -5,9 +5,11 @@ After=lm_sensors.service
 
 [Service]
 Type=forking
-ExecStart=/usr/bin/thinkfan
-PIDFile=/var/run/thinkfan.pid
-ExecReload=/usr/bin/kill -HUP $MAINPID
+ExecStart=/usr/bin/thinkfan $THINKFAN_ARGS
+PIDFile=/run/thinkfan.pid
+ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
 WantedBy=multi-user.target
+Also=thinkfan-sleep.service
+Also=thinkfan-wakeup.service
\ No newline at end of file
-- 
2.39.0

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Dev mailing list
Dev@lists.parabola.nu
https://lists.parabola.nu/mailman/listinfo/dev

Reply via email to