# Contributor: Nikita Ukhrenkov <thekit@disroot.org>
# Maintainer: Nikita Ukhrenkov <thekit@disroot.org>
pkgname=postmarketos-ui-hildon
pkgver=1
pkgrel=10
pkgdesc="(X11) Lightweight GTK+2 UI (optimized for single-touch touchscreens)"
url="https://postmarketos.org"
arch="noarch"
license="GPL-3.0-or-later"
depends="dbus-x11 gtk+2.0-maemo hildon-desktop hildon-theme-alpha mesa xorg-server lightdm lightdm-openrc"
install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall $pkgname.post-upgrade"
source="60-lightdm-autologin.conf hildon.desktop xinitrc_hildon.sh"
options="!check"

package() {
	# Default theme
	mkdir -p "$pkgdir"/usr/share/themes
	ln -s /usr/share/themes/alpha "$pkgdir"/usr/share/themes/default

	install -Dm644 "$srcdir"/hildon.desktop \
		"$pkgdir"/usr/share/xsessions/hildon.desktop

	install -Dm755 "$srcdir"/xinitrc_hildon.sh \
		"$pkgdir"/usr/bin/xinitrc_hildon

	install -Dm644 "$srcdir"/60-lightdm-autologin.conf \
		"$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf
}
sha512sums="7abdefbffd24c5c7cd1400045895ee2c2cad933398bf37c749594efb698767efdac95aced9c1e7ea26f2333a2e9c877a0698ab5d086d7fbbd2972f261f6beb87  60-lightdm-autologin.conf
b2c52b8d8751ed10c148f2a6aa3ab76be8b4854c85721963fb303a3605c9762e317221b5b69f8a41ccc19580055d7a6f07fa110b1daa7f3975f226b0d9acb833  hildon.desktop
24bb92da41979df11944da60ab260c6c1e2ce82b66e143dc145e5657d53c3861c70a87f8dad06e623632c492bc401e5c216c2c1e54224c8f0aedfe6ef2230e80  xinitrc_hildon.sh"
