summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f2a7f7faa20337d71abe90862a98e3c86c0b36d (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
42
# Maintainer:
# Contributor: Dāvis Mosāns <davispuh at gmail dot com>

_pkgname="polkit-qt5"
pkgname="$_pkgname-git"
pkgver=0.114.0.r13.g590e710
pkgrel=1
pkgdesc='A library that allows developers to access PolicyKit API with a nice Qt-style API'
arch=('i686' 'x86_64')
url='https://invent.kde.org/libraries/polkit-qt-1'
license=('LGPL')

depends=('polkit' 'qt5-base')
makedepends=('git' 'cmake')

provides=("$_pkgname")
conflicts=("$_pkgname")

source=("$_pkgname"::"git+$url")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir"
  mkdir -p build
}

build() {
  cmake -B build -S "$_pkgname" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_DESTINATION=/usr/lib
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}