ptrcports/sway-git/APKBUILD

106 lines
2.5 KiB
Text
Raw Normal View History

2023-07-16 12:07:25 +00:00
# Maintainer: psykose <alice@ayaya.dev>
pkgname=sway-git
pkgver=1.8.1_git20230715
pkgrel=0
_gitrev=91079079690c8832b22960403f0e60c63822d17a
_wlroots=b18c76642ade7df4ac93623a2fee5b0a9e6c6407
pkgdesc="i3-compatible window manager for Wayland"
url="https://swaywm.org/"
license="MIT"
arch="all"
makedepends="
basu-dev
cairo-dev
eudev-dev
gdk-pixbuf-dev
hwdata-dev
json-c-dev
libcap-utils
libdisplay-info-dev
libdrm-dev
libevdev-dev
libinput-dev
libliftoff-dev
libseat-dev
libxkbcommon-dev
linux-pam-dev
mesa-dev
meson
pango-dev
pcre2-dev
scdoc
vulkan-loader-dev
wayland-dev
wayland-protocols
xcb-util-renderutil-dev
xcb-util-wm-dev
xwayland-dev
"
subpackages="
$pkgname-dbg
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
$pkgname-fish-completion
"
source="$pkgname-$_gitrev.tar.gz::https://github.com/swaywm/sway/archive/$_gitrev.tar.gz
wlroots-$_wlroots.tar.gz::https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$_wlroots.tar.gz
sway-git.desktop
"
builddir="$srcdir/sway-$_gitrev"
options="net setcap !check"
provides="sway-virtual"
provider_priority=10
replaces="sway"
prepare() {
default_prepare
mkdir -p subprojects
ln -sfv "$srcdir"/wlroots-$_wlroots subprojects/wlroots
sed -i \
-e '/werror=true/d' \
"$srcdir"/wlroots-$_wlroots/meson.build
}
build() {
CFLAGS="$CFLAGS -O2" \
abuild-meson \
--default-library static \
-Db_lto=true \
-Db_ndebug=true \
-Dsd-bus-provider=basu \
-Dswaybar=true \
-Dswaynag=true \
-Dman-pages=enabled \
-Dgdk-pixbuf=enabled \
-Dtray=enabled \
-Dxwayland=enabled \
. output
meson compile -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
cd "$pkgdir"
rm -r \
usr/share/backgrounds \
usr/include \
usr/lib \
# for setting SCHED_RR scheduling policy
# before starting the Wayland server
setcap cap_sys_nice=+ep usr/bin/sway
install -Dm644 "$srcdir"/sway-git.desktop \
-t "$pkgdir"/usr/share/wayland-sessions/
}
sha512sums="
14d67aba228506961716ba47fa371f1803e92556fa76f4b13da07e9252adbc2a99eee5d6e751956ce838d1547526ecc066ea889338ae38e9f2239187a38cbd9b sway-git-91079079690c8832b22960403f0e60c63822d17a.tar.gz
ab3a8ed0dcf43a1aa548a82886e6150002a0f950dd0c61436e5e75da674514e5fecffa4c351743d24ee224cc20e59305f4a4e5b27f9ec1a077ebba52a879f61a wlroots-b18c76642ade7df4ac93623a2fee5b0a9e6c6407.tar.gz
d3f3b0393f730f57c1c1e557362c9a93d281d13e415165e2879560b6e414a6c74b160012d0c1ccb27a3b9d3fa219c35ec78178d7925d659c62a5d6af31b13c9c sway-git.desktop
"