# Contributor: Duncan Guthrie <dguthrie@posteo.net>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ratpoison
pkgver=1.4.9
pkgrel=3
pkgdesc="Minimalistic window manager"
url="https://ratpoison.nongnu.org/"
arch="all"
license="GPL-2.0-only"
makedepends="libx11-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.savannah.nongnu.org/releases/ratpoison/ratpoison-$pkgver.tar.xz
	ratpoison.desktop
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-xkb \
		--without-xft \
		--without-xrandr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dvm644 "$srcdir"/ratpoison.desktop \
		-t "$pkgdir"/usr/share/xsessions/
}

sha512sums="
97f705efd2092b8e12528496890c59f613e6fcec010aca94a5a59bd641e22dfc50dd500a4b94af7a07553a8a6359f6bec4eee0db1a7ded29d7f051904b09beef  ratpoison-1.4.9.tar.xz
26f75f9808f39ed68f6ec7fd35b95cd8d855009484954a9208e5bdc8c75f40ce982153e8cf8fe088ca440a8f5fd8a8a4418ee0bc1309832b92c513c5ddb15589  ratpoison.desktop
"
