summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66297f20c5a89c7fe530e74b81dfd90bba952bc4 (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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
# newm - Wayland compositor
# Maintainer: oldNo.7 <oldNo.7@archlinux.org>

pkgname=newm-atha-git
pkgver=r739.cacafde.r567.f61b027
pkgrel=1
license=('MIT')
pkgdesc="Wayland compositor"
depends=(
	python3
	wayland
	libinput
	libxcb
	libxkbcommon
	opengl-driver
	pixman
	xcb-util-errors
	xcb-util-renderutil
	xcb-util-wm
	seatd
	xorg-xwayland

	python-evdev
	python-numpy
	python-imageio

	python-cairo
	python-psutil
	python-pam
	python-pyfiglet
	python-thefuzz
	python-dasbus
)
makedepends=(
	git
	sed
	python3
	meson
	ninja
	wayland-protocols
	xorgproto
)
arch=('any')
url="https://git.sr.ht/~atha/newm-atha"
source=(
	'git+https://git.sr.ht/~atha/pywm-atha'
	'git+https://git.sr.ht/~atha/newm-atha'
	'dmabuf-capture.patch'
)
sha512sums=(
	'SKIP'
	'SKIP'
	'dd0d1d52a36c2ff7541f866e3cc11281762115a839d94f157a64189eab63211d085f48b36d795ce65e91b5cb937e1eea09bb1ed36f0d8845979c0fabe8b67adc'
)
provides=('newm')
conflicts=('newm' 'newm-git')

pkgver() {
	cd "$srcdir"/newm-atha
	newm_v=$(
		set -o pipefail
		git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
	)
	cd "$srcdir"/pywm-atha
	pywm_v=$(
		set -o pipefail
		git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
	)
	echo "$newm_v.$pywm_v"
}
prepare() {
	cd "$srcdir"/pywm-atha
	git submodule init
	git submodule update --init --recursive
	patch subprojects/wlroots/examples/dmabuf-capture.c "$srcdir"/dmabuf-capture.patch
}
build() {
	cd "$srcdir"/pywm-atha
	python3 setup.py build
	cd "$srcdir"/newm-atha
	python3 setup.py build
}
package() {
	cd "$srcdir"/pywm-atha
	python3 setup.py install --root="$pkgdir" --optimize=1
	cd "$srcdir"/newm-atha
	python3 setup.py install --root="$pkgdir" --optimize=1
	install -Dm644 "$srcdir/newm-atha/newm/resources/newm.desktop" "$pkgdir/usr/share/wayland-sessions/newm.desktop"
}