summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c99809f39ee944785e9d81484e9ad66e3f8b227 (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: GreyXor <greyxor@protonmail.com>

pkgname=libliftoff-git
pkgver=0.4.0.r7.g58b8494
pkgrel=1
pkgdesc="Lightweight KMS plane library (git development version)"
arch=(x86_64)
url="https://gitlab.freedesktop.org/emersion/libliftoff"
license=("custom:MIT")
depends=("libdrm" "glibc")
makedepends=("git" "meson" "ninja")
provides=("libliftoff")
conflicts=("libliftoff")
source=("$pkgname::git+https://gitlab.freedesktop.org/emersion/libliftoff.git")
sha512sums=('SKIP')

pkgver() {
	cd "$pkgname"

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

build() {
	meson --prefix /usr --buildtype=release "$pkgname" build
	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install

	cd "$srcdir/$pkgname"

	install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}