aboutsummaryrefslogtreecommitdiffstats
path: root/community/libinput/APKBUILD
blob: 5e3ab60f02fe71257c755d3806fb5b8f2f8bf77f (plain) (blame)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Daniel Sabogal <dsabogalcc@gmail.com>
pkgname=libinput
pkgver=1.20.1
pkgrel=0
pkgdesc="Library for handling input devices"
url="https://www.freedesktop.org/wiki/Software/libinput"
arch="all"
license="MIT"
_depends_tools="python3 py3-libevdev py3-udev py3-yaml"
makedepends="eudev-dev gtk+3.0-dev libevdev-dev meson mtdev-dev $_depends_tools"
checkdepends="diffutils bash"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-libs
	$pkgname-debug-gui:_debug_gui
	$pkgname-tools
	$pkgname-zsh-completion
	"
install="$pkgname.post-upgrade"
source="https://gitlab.freedesktop.org/libinput/libinput/-/archive/$pkgver/libinput-$pkgver.tar.gz"

# secfixes:
#   1.20.1-r0:
#     - CVE-2022-1215

build() {
	abuild-meson \
		-Ddocumentation=false \
		-Dlibwacom=false \
		-Ddebug-gui=true \
		-Dtests=false builddir/
	meson compile ${JOBS:+-j ${JOBS}} -C builddir/
}

check() {
	meson test --no-rebuild -v -C builddir
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C builddir
}

libs() {
	default_libs

	mv "$pkgdir"/usr/lib/udev "$subpkgdir"/usr/lib
	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/libinput "$subpkgdir"/usr/share
}

tools() {
	pkgdesc="CLI helper tools for debugging libinput"
	depends="$pkgname=$pkgver-r$pkgrel $_depends_tools"

	# Q: Maybe move all tools (even libinput-list-devices, libinput-quirks)
	#    into -tools? (jirutka)
	amove usr/libexec/libinput/libinput-analyze*
	amove usr/libexec/libinput/libinput-debug*
	amove usr/libexec/libinput/libinput-measure*
	amove usr/libexec/libinput/libinput-record
	amove usr/libexec/libinput/libinput-replay
}

_debug_gui() {
	pkgdesc="GTK-based visual debug helper for libinput"
	depends=""

	amove usr/libexec/libinput/libinput-debug-gui
}

sha512sums="
91f6d6957b16d76807b376d4f81333ed16218fd37b090417d03a2e551d1f5b2c734d891d267bcdc4314cd698d7830f2f467389a9af58155e4e97a86002c8db78  libinput-1.20.1.tar.gz
"