aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Nestler2022-04-01 13:45:52 +0200
committerRaphael Nestler2022-04-01 13:49:37 +0200
commit1f55ba0e14ef1aa55c8fc6ed4d1a7bf5e7ff41a2 (patch)
tree502646eb0ff128c4ebd8a075f139db993cf5f332
parentf997191127a2ab2f062350be5ba71ff1178a82c3 (diff)
downloadaur-1f55ba0e14ef1aa55c8fc6ed4d1a7bf5e7ff41a2.tar.gz
Add fix-tp-mic-led script and service
Source is from https://gist.github.com/evanslify/0b9b13d448f7d1cc211aa2b910ae59fd
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD12
-rw-r--r--fix-tp-mic-led.service8
-rw-r--r--fix-tp-mic-led.sh3
5 files changed, 26 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 29437a300ee8..26c02868683b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,12 @@ pkgbase = thinkpad-p14s
url = https://aur.archlinux.org/
arch = any
license = GPL
+ depends = bash
depends = amd-ucode
optdepends = acpi_call: Allow to configure battery charging behavior
+ source = fix-tp-mic-led.sh
+ source = fix-tp-mic-led.service
+ sha256sums = e333bd4961d2145959f1f84d04935ae29e42663d94024a280f083c24fa3cfede
+ sha256sums = a9062c04ee8b1fdeffce0c0c6765bf20c72c23bdc38338a4493a6f52697ba9e4
pkgname = thinkpad-p14s
diff --git a/.gitignore b/.gitignore
index d269f477a888..897bf3f0a8e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/*.tar.gz
/*.tar.zst
/pkg/
+/src/
diff --git a/PKGBUILD b/PKGBUILD
index 0c81ab52c5a1..11eec0c16e5c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,9 +6,15 @@ pkgdesc="Utilities and dependencies for a Thinkpad P14s laptop"
arch=('any')
url="https://aur.archlinux.org/"
license=('GPL')
-depends=('amd-ucode')
+depends=('bash' 'amd-ucode')
optdepends=(
'acpi_call: Allow to configure battery charging behavior'
)
-source=()
-sha512sums=()
+source=('fix-tp-mic-led.sh' 'fix-tp-mic-led.service')
+sha256sums=('e333bd4961d2145959f1f84d04935ae29e42663d94024a280f083c24fa3cfede'
+ 'a9062c04ee8b1fdeffce0c0c6765bf20c72c23bdc38338a4493a6f52697ba9e4')
+
+package() {
+ install -Dm755 "${srcdir}/fix-tp-mic-led.sh" -t "${pkgdir}/usr/bin/"
+ install -Dm755 "${srcdir}/fix-tp-mic-led.service" -t "${pkgdir}/usr/lib/systemd/system/"
+}
diff --git a/fix-tp-mic-led.service b/fix-tp-mic-led.service
new file mode 100644
index 000000000000..c67d1d21f71c
--- /dev/null
+++ b/fix-tp-mic-led.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Fix ThinkPad T14s AMD Microphone Led
+
+[Service]
+ExecStart=/usr/bin/fix-tp-mic-led.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/fix-tp-mic-led.sh b/fix-tp-mic-led.sh
new file mode 100644
index 000000000000..fc392827b5f6
--- /dev/null
+++ b/fix-tp-mic-led.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo -n 7 > /sys/class/sound/card1/controlC1/led-mic/detach