# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=postmarketos-base-ui-gnome
pkgver=3
pkgrel=9
pkgdesc="Meta package for shared configuration for GNOME-based UIs"
url="https://postmarketos.org"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	dnsmasq
	gcr-ssh-agent
	gnome-bluetooth
	iio-sensor-proxy
	modemmanager
	postmarketos-artwork-wallpapers
	postmarketos-base-ui
	postmarketos-base-ui-networkmanager
	power-profiles-daemon
	xdg-desktop-portal-gnome
	xdg-desktop-portal-gtk
	xdg-user-dirs
	xdg-user-dirs-gtk
	xwayland
	"
source="
	00_postmarketos-base-ui-gnome.gschema.override
	"
options="!check"
subpackages="$pkgname-openrc $pkgname-systemd"

_pmb_recommends="
	firefox-esr
	flatpak
	font-noto
	font-noto-emoji
	gnome-calculator
	gnome-calendar
	gnome-clocks
	gnome-console
	gnome-contacts
	gnome-maps
	gnome-software
	gnome-software-plugin-apk
	gnome-text-editor
	gnome-weather
	lollypop
	loupe
	papers
"

package() {
	install -Dm644 -t "$pkgdir"/usr/share/glib-2.0/schemas \
		"$srcdir"/*.override
}

openrc() {
	install_if="$pkgname=$pkgver-r$pkgrel openrc"
	install="$subpkgname.post-install $subpkgname.post-upgrade"
	depends="
		apk-polkit-rs-openrc
		elogind
		elogind-openrc
		iio-sensor-proxy-openrc
		modemmanager-openrc
		polkit-elogind
	"

	mkdir "$subpkgdir"
}

systemd() {
	install_if="$pkgname=$pkgver-r$pkgrel systemd"
	install="$subpkgname.post-install $subpkgname.post-upgrade"

	mkdir -p "$subpkgdir"
}

sha512sums="
1f68138876f2270943c88fd6f914f156692397a840f4945564cce0ed6e5d56943661fee025e0e4e0881b5df18a4f5f290086eb67be945e59abd5fe4c71cf5e67  00_postmarketos-base-ui-gnome.gschema.override
"