summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiota2024-03-25 02:58:32 +0000
committerxiota2024-03-25 02:58:57 +0000
commit8c3ebf5d05032f15054e1a38d54cdd6fec418226 (patch)
tree205c049c1eabe6142d068f80d837a39095f9d200
parentc658c62b9eb4ea3c62891c51669ac14669fe487a (diff)
downloadaur-8c3ebf5d05032f15054e1a38d54cdd6fec418226.tar.gz
sync
-rw-r--r--PKGBUILD19
1 files changed, 15 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 464df1d74d18..17d5b6fdb47c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,8 +6,17 @@
# https://codeberg.org/river/river
# https://github.com/riverwm/river
+## options
+: ${_build_xwayland:=true}
+: ${_build_git:=true}
+
+unset _pkgtype
+[ "${_build_xwayland::1}" != "t" ] && _pkgtype+="-noxwayland"
+[[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git"
+
+# basic info
_pkgname="river"
-pkgname="$_pkgname-git"
+pkgname="$_pkgname${_pkgtype:-}"
pkgver=0.2.6.r285.g12de175
pkgrel=1
pkgdesc='Dynamic tiling wayland compositor'
@@ -23,7 +32,6 @@ depends=(
'wayland'
'wayland-protocols'
'wlroots'
- 'xorg-xwayland'
)
makedepends=(
'git'
@@ -34,6 +42,8 @@ optdepends=(
'polkit: access seat through systemd-logind'
)
+[[ "${_build_xwayland::1}" == "t" ]] && depends+=('xorg-xwayland')
+
provides=("$_pkgname")
conflicts=("$_pkgname")
@@ -41,7 +51,7 @@ options=('!strip')
_pkgsrc="$_pkgname"
source=(
- "git+https://github.com/riverwm/river.git"
+ 'git+https://github.com/riverwm/river.git'
'git+https://github.com/ifreund/zig-pixman.git'
'git+https://github.com/ifreund/zig-wayland.git'
'git+https://github.com/swaywm/zig-wlroots.git'
@@ -79,9 +89,10 @@ package() {
local _zig_options=(
--prefix '/usr'
-Doptimize=ReleaseSafe
- -Dxwayland
)
+ [[ "${_build_xwayland::1}" == "t" ]] && _zig_options+=(-Dxwayland)
+
DESTDIR="$pkgdir" zig build "${_zig_options[@]}"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"