summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c199043c8cc98eabaf3443a91f02b60973bfb334 (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
# Maintainer: alba4k <blaskoazzolaaaron@gmail.com>

_pkgname="hyprpolkitagent"
pkgname="${_pkgname}-git"
pkgver=0.1.1.r4.g615efd49
pkgrel=1
pkgdesc="A polkit authentication agent written in QT/QML"
arch=(any)
url="https://github.com/hyprwm/hyprpolkitagent"
license=('BSD-3-Clause')
depends=('hyprutils-git' 'polkit-qt6' 'qqc2-desktop-style')
makedepends=('git' 'cmake' 'gcc')
source=("${_pkgname}::git+https://github.com/hyprwm/hyprpolkitagent.git")
provides=("hyprpolkitagent")
conflicts=("hyprpolkitagent")
sha256sums=('SKIP')

pkgver() {
	cd ${_pkgname}
    git describe --long --tags --abbrev=8 --exclude='*[a-zA-Z][a-zA-Z]*' \
      | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
	cd "${srcdir}/${_pkgname}"
	cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=/usr -S . -B ./build
    cmake --build ./build --config Release --target hyprpolkitagent
}

package() {
	cd "${srcdir}/${_pkgname}"
	DESTDIR="${pkgdir}" cmake --install build

	install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}