summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e6c804246316c02fc71187ba4ef1747d8b8a8f28 (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
# Maintainer: Philip Goto <philip.goto@gmail.com>

pkgname=libinput-config
pkgver=r84.f373bb6
pkgrel=1
pkgdesc='Configuration system for libinput'
arch=(x86_64)
url='https://gitlab.com/warningnonpotablewater/libinput-config'
license=(BSD)
depends=(
	glibc
	libinput
)
makedepends=(
	git
	meson
)
_commit='f373bb6777ce983368bc540b7d683cc59e274b9e'
source=("git+${url}.git#commit=${_commit}")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname}"
	# git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	arch-meson "${pkgname}" build
	meson compile -C build
}

check() {
	meson test -C build --print-errorlogs
}

package() {
	install -Dm644 /dev/null "${pkgdir}/etc/ld.so.preload"
	meson install -C build --destdir "${pkgdir}"
	install -Dm644 "${srcdir}/libinput-config/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}