# Reference: https://postmarketos.org/uipkg
# Maintainer: Miles Alan <m@milesalan.com>
pkgname=postmarketos-ui-sxmo-de-sway
pkgver=1.13.0
pkgrel=1
pkgdesc="Simple Mobile: Mobile environment based on SXMO and running on sway"
url="http://sr.ht/~mil/Sxmo"
arch="noarch !armhf"
license="MIT"
depends="
	sxmo-common

	bemenu
	foot
	grim
	mako
	seatd
	seatd-openrc
	slurp
	swaybg
	swayidle
	sxmo-sway
	wayout
	wl-clipboard
	wob
	wtype
	wvkbd
	xwayland
	"
install="$pkgname.post-install $pkgname.pre-deinstall"
_pmb_groups="
	seat
	"
_pmb_recommends="
	w3m
	sfeed

	adwaita-icon-theme
	clickclack
	firefox-esr
	font-noto
	font-noto-emoji
	imv
	mobile-config-firefox
	postmarketos-default-camera
	postprocessd
	ttyescape
	"
provides="postmarketos-ui-sxmo"
provider_priority=10
options="!check" # has no tests

# bonsai requires hare which doesnt work on all arches
# refer to https://pkgs.alpinelinux.org/packages?name=hare&branch=edge&repo=&arch=&maintainer=
# and add arches here as they become available. Bonsai should always be preferred
# cause it fixes alot of issues. If bonsai is not installed, sxmo will fallback
# to the old buggy shell script.
case "$CARCH" in
	x86_64|aarch64)
		depends="$depends bonsai"
	;;
esac

package() {
	mkdir -p "$pkgdir"
	mkdir -p "$pkgdir"/etc/sway/config.d
}
