summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c007e9dae457974f5fd90ab1670c2352382caa6d (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
# Maintainer: acd407 <acd407@qq.com>
# Maintainer: willemw <willemw12@gmail.com>
# Contributor: tinywrkb <tinywrkb@gmail.com>
# Contributor: Morten Linderud <foxboron@archlinux.org>
# Contributor: Maxim Baz <rofi at maximbaz dot com>
# Contributor: Anatol Pomozov
# Contributor: Benjamin Chrétien <chretien + aur [at] lirmm [dot] fr>
# Contributor: Eric Engestrom <aur [at] engestrom [dot] ch>
# Contributor: Rasi <rasi@xssn.at>
# Contributor: Sean Pringle <sean.pringle@gmail.com>
# Contributor: SanskritFritz (gmail)

pkgname=rofi-lbonn-wayland-acd407
pkgver=1.7.5.wayland3.r3.g47ae31eb
pkgrel=1
pkgdesc='A window switcher, application launcher and dmenu replacement (fork with Wayland support)'
arch=('x86_64' 'aarch64')
url='https://github.com/lbonn/rofi'
license=(MIT)
depends=('check' 'librsvg' 'libxdg-basedir' 'libxkbcommon-x11' 'startup-notification'
	'wayland' 'xcb-util-cursor' 'xcb-util-wm' 'xcb-util-xrm')
makedepends=('git' 'meson' 'wayland-protocols')
optdepends=('i3-wm: use as a window switcher')
provides=('rofi')
conflicts=('rofi')
source=("$pkgname::git+$url.git#branch=wayland"
	"git+https://github.com/sardemff7/libgwater.git"
	"git+https://github.com/sardemff7/libnkutils.git"
	"disable_dpi.patch"
)
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')

pkgver() {
	git -C $pkgname describe --long | sed 's/\([^-]*-g\)/r\1/;s/[-+]/./g'
}

prepare() {
	git -C $pkgname submodule init
	git -C $pkgname config submodule.externals/vendor/libgwater.url "$srcdir/libgwater"
	git -C $pkgname config submodule.externals/vendor/libnkutils.url "$srcdir/libnkutils"
	git -C $pkgname -c protocol.file.allow=always submodule update
}

build() {
	patch "$pkgname/source/wayland/view.c" <../disable_dpi.patch

	local meson_options=(-Dwayland=enabled -Dcheck=enabled)

	arch-meson $pkgname build "${meson_options[@]}"
	meson compile -C build
}

check() {
	LC_ALL=C meson test -C build
}

package() {
	meson install -C build --destdir="$pkgdir"

	install -Dm644 $pkgname/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
	install -Dm755 $pkgname/Examples/*.sh -t "$pkgdir/usr/share/doc/rofi/examples/"
}