summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 574f9e6cd2c023440951a23c8cc455037d19c922 (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
40
41
# Maintainer: Maxr1998 <max.rumpf1998@gmail.com>
# Author: Ondrej Čerman

_pkgbase=zenmonitor
pkgname=zenmonitor-git
pkgver=60.ae6e53e
pkgrel=1
pkgdesc="Zen monitor is monitoring software for AMD Zen-based CPUs"
arch=('x86_64' 'i686')
url="https://github.com/Maxr1998/zenmonitor"
license=('GPL')
depends=('zenpower' 'gtk3')
optdepends=('polkit: support application shortcut to launch Zen monitor as root')
makedepends=('git')
provides=('zenmonitor')

source=("$_pkgbase::git+$url.git")
sha256sums=("SKIP")

pkgver() {
  cd "$srcdir/$_pkgbase"
  printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/$_pkgbase"
  # Fix pkgdir references in desktop files
  sed -i 's/@APP_EXEC@|${DESTDIR}/@APP_EXEC@|/g' makefile
}

build() {
  cd "$srcdir/$_pkgbase"
  make
}

package() {
  cd "$srcdir/$_pkgbase"
  make DESTDIR="${pkgdir}" PREFIX="/usr" install
  mkdir -p "${pkgdir}/usr/share/polkit-1/actions"
  make DESTDIR="${pkgdir}" PREFIX="/usr" install-polkit
}