Package Details: ryzenadj 0.16.0-1

Git Clone URL: https://aur.archlinux.org/ryzenadj.git (read-only, click to copy)
Package Base: ryzenadj
Description: RyzenAdj tool for adjusting Ryzen Mobile power states
Upstream URL: https://github.com/FlyGoat/RyzenAdj
Licenses: LGPL3
Conflicts: ryzenadj-git
Provides: ryzenadj-git
Submitter: so1ar
Maintainer: so1ar
Last Packager: so1ar
Votes: 1
Popularity: 0.006339
First Submitted: 2023-11-14 13:37 (UTC)
Last Updated: 2024-09-27 12:29 (UTC)

Dependencies (4)

Sources (1)

Latest Comments

xorly commented on 2024-10-27 21:37 (UTC) (edited on 2024-10-27 23:01 (UTC) by xorly)

Hi, please adjust at least the build() part so it also builds on systems with different cmake build backend than make.

My attempt based on the template from wiki https://wiki.archlinux.org/title/CMake_package_guidelines#Template

diff --git a/PKGBUILD b/PKGBUILD
index 01c92f6..b76fdc2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,15 +18,15 @@ source=("${pkgname}-${pkgver}-${pkgrel}.tar.gz::${url}/archive/refs/tags/v${pkgv
 sha256sums=("7bef7dbde006afbe316091d8da8c8c551d5d7d43185d9e62281671959b7a3ca2")

 build() {
-    cd "${srcdir}/RyzenAdj-${pkgver}"
-    mkdir build -p && cd build
-    cmake -DCMAKE_BUILD_TYPE=Release ..
-    make
+    cmake -B build -S "${srcdir}/RyzenAdj-${pkgver}" \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DCMAKE_INSTALL_PREFIX='/usr' \
+        -Wno-dev
+    cmake --build build
 }

 package() {
-    cd "${srcdir}/RyzenAdj-${pkgver}"
-    install -Dsm 755 build/ryzenadj $pkgdir/usr/bin/ryzenadj
+    DESTDIR="$pkgdir" cmake --install build
     install -Dsm 744 build/libryzenadj.so $pkgdir/usr/lib/libryzenadj.so
-    install -Dm 744 lib/ryzenadj.h $pkgdir/usr/include/ryzenadj.h
+    install -Dm 744 ${srcdir}/RyzenAdj-${pkgver}/lib/ryzenadj.h $pkgdir/usr/include/ryzenadj.h
 }