Package Details: undervolt 0.4-1

Git Clone URL: https://aur.archlinux.org/undervolt.git (read-only, click to copy)
Package Base: undervolt
Description: A program to undervolt AMD 14h Family processors (E350 at least).
Upstream URL: http://sourceforge.net/projects/undervolt/
Keywords: brazos E450
Licenses: GPL
Submitter: flocke
Maintainer: compgamer89
Last Packager: lfleischer
Votes: 3
Popularity: 0.000000
First Submitted: 2014-02-22 11:54 (UTC)
Last Updated: 2015-07-30 00:53 (UTC)

Latest Comments

compgamer89 commented on 2019-04-01 01:27 (UTC) (edited on 2019-04-01 01:27 (UTC) by compgamer89)

Suggested change to modernize the package and enable systemd integration + module autoload:

diff --git a/.SRCINFO b/.SRCINFO
index 7da350b..1376b52 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,20 @@
 pkgbase = undervolt
    pkgdesc = A program to undervolt AMD 14h Family processors (E350 at least).
    pkgver = 0.4
-   pkgrel = 1
+   pkgrel = 2
    url = http://sourceforge.net/projects/undervolt/
    arch = i686
    arch = x86_64
    license = GPL
    depends = glibc
    source = http://downloads.sourceforge.net/project/undervolt/undervolt-0.4.tgz
+   source = undervolt.conf
+   source = undervolt.modules-load.conf
+   source = undervolt.service
    sha256sums = c8e9306edbcf41551a63153cab1d8c8432ee305a4ec7961c3cd5101421cddf4c
+   sha256sums = 3d25c9e6e08b8aa4aac7fa9f005d79da4f107577139aaaf4375abcef84ace462
+   sha256sums = 0ddfd6290cf2263f5e6be277a9d45e42cbbe1d2f1298fb0f352b7f07c36dd545
+   sha256sums = 2cec9223c5186bd5f260085177c78fbdc1d446a4254411e6f759863a82f76f97

 pkgname = undervolt

diff --git a/PKGBUILD b/PKGBUILD
index b1ec375..6f18ab7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,14 +3,20 @@

 pkgname=undervolt
 pkgver=0.4
-pkgrel=1
+pkgrel=2
 pkgdesc="A program to undervolt AMD 14h Family processors (E350 at least)."
 arch=(i686 x86_64)
 url="http://sourceforge.net/projects/undervolt/"
 license=('GPL')
 depends=('glibc')
-source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}.tgz")
-sha256sums=('c8e9306edbcf41551a63153cab1d8c8432ee305a4ec7961c3cd5101421cddf4c')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}.tgz"
+        undervolt.conf
+        undervolt.modules-load.conf
+        undervolt.service)
+sha256sums=('c8e9306edbcf41551a63153cab1d8c8432ee305a4ec7961c3cd5101421cddf4c'
+            '3d25c9e6e08b8aa4aac7fa9f005d79da4f107577139aaaf4375abcef84ace462'
+            '0ddfd6290cf2263f5e6be277a9d45e42cbbe1d2f1298fb0f352b7f07c36dd545'
+            '2cec9223c5186bd5f260085177c78fbdc1d446a4254411e6f759863a82f76f97')

 build() {
     cd "$pkgname-$pkgver"
@@ -18,6 +24,9 @@ build() {
 }

 package() {
+    install -D -m 644 "$pkgname.conf" "$pkgdir/etc/conf.d/$pkgname"
+    install -D -m 644 "$pkgname.modules-load.conf" "$pkgdir/usr/lib/modules-load.d/$pkgname.conf"
+    install -D -m 644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
     cd "$pkgname-$pkgver"
-    install -D -m 775 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+    install -D -m 755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
 }
diff --git a/undervolt.conf b/undervolt.conf
new file mode 100644
index 0000000..dd18693
--- /dev/null
+++ b/undervolt.conf
@@ -0,0 +1,2 @@
+#UNDERVOLT_ARGS="-v -p 0:0x1C -p 1:0x1E -p 2:0x3A"
+UNDERVOLT_ARGS="-v"
diff --git a/undervolt.modules-load.conf b/undervolt.modules-load.conf
new file mode 100644
index 0000000..3e5ee7f
--- /dev/null
+++ b/undervolt.modules-load.conf
@@ -0,0 +1 @@
+msr
diff --git a/undervolt.service b/undervolt.service
new file mode 100644
index 0000000..d97597f
--- /dev/null
+++ b/undervolt.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Undervolt Service
+After=multi-user.target suspend.target hibernate.target hybrid-sleep.target
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/conf.d/undervolt
+ExecStart=/usr/bin/undervolt $UNDERVOLT_ARGS
+
+[Install]
+WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target