summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 767184d55c0c27424365d31a212f7bf9abd27e30 (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: Adrian Perez de Castro <aperez@igalia.com>
pkgname=aml-git
pkgdesc="Another/Andri's Main Loop"
pkgver=r103.972e0c0
pkgrel=1
url=https://github.com/any1/aml
arch=(x86_64)
makedepends=(meson ninja git)
provides=(aml)
conflicts=(aml)
depends=(glibc)
license=(custom:ISC)
source=("${pkgname}::git+${url}")
sha256sums=(SKIP)

pkgver () {
	cd "${pkgname}"
	(
		set -o pipefail
		git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

build () {
	rm -rf build
	arch-meson "${pkgname}" build -Dexamples=false
	ninja -C build
}

check () {
	meson test -C build
}

package () {
	DESTDIR="${pkgdir}" ninja -C build install
	install -Dm644 "${pkgname}/COPYING" \
		"${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}