summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c32215b6b27a04109b8a5e8af5f231be5bd6615a (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: jlaunay
_pkgname=hyprlang
pkgname="${_pkgname}-git"
pkgver=0.2.1.r6.d486806
pkgrel=1
pkgdesc="hyprlang - the hypr configuration language"
arch=('x86_64')
url="https://github.com/hyprwm/hyprlang"
license=("GPL")
depends=('gcc-libs' 'glibc')
makedepends=('git' 'cmake')
provides=(
	"$_pkgname=${pkgver%%.r*}"
	"lib$_pkgname.so"
	)
conflicts=("$_pkgname")
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')

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

build() {
	local _cmake_options=(
		-B build
		-S ${pkgname/-git/}
		-DCMAKE_BUILD_TYPE=Release
		-DCMAKE_INSTALL_PREFIX=/usr
		--no-warn-unused-cli
	)
	cmake "${_cmake_options[@]}"
	cmake --build build
}

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