summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 46340a533d4b079ec708cf3bd3f51ab4cb4be567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: EightySix mail@eightysixk.org

pkgname=gpu-control
pkgver=1.0.1
pkgrel=1
pkgdesc='nvidia gpu control software.'
arch=('x86_64')
url='https://github.com/EightySixK/GPU-Control'
license=('MIT')
depends=('qt5-base' 'nvidia-utils' 'nvidia-settings')
makedepends=('cmake' 'gcc' 'make')
install=$pkgname.install
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('SKIP')

build() {
    cd "GPU-Control-$pkgver"
    mkdir -p build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr
    make -j$(nproc)
}

package() {
    cd "GPU-Control-$pkgver"

    install -Dm755 build/gpu-control "$pkgdir/usr/bin/gpu-control"

    install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/gpu-control.desktop" << 'EOF'
[Desktop Entry]
Type=Application
Name=GPU Control
Comment=NVIDIA GPU Power and Clock Control
Exec=/usr/bin/gpu-control
Icon=nvidia-settings
Terminal=false
Categories=System;Settings;
EOF
}