# Maintainer: Ivy Foster <code@escondida.tk>

pkgname=bemenu
pkgver=0.1.0
pkgrel=1

pkgdesc='Dynamic menu library and client program inspired by dmenu with support for wayland compositors'
url='https://github.com/Cloudef/bemenu'
arch=(x86_64)
license=(GPL3 LGPL3)

depends=(pango)
makedepends=(cmake libxkbcommon libxinerama ncurses wayland)
optdepends=(
	'libxkbcommon: For the wayland backend'
	'libxinerama: For the x11 backend'
	'ncurses: For the curses backend'
	'wayland: For the wayland backend'
)

source=(
	"bemenu-$pkgver.tar.gz::https://github.com/Cloudef/bemenu/archive/$pkgver.tar.gz"
	"https://github.com/Cloudef/bemenu/releases/download/$pkgver/bemenu-$pkgver.tar.gz.asc"
)
# Checksums provided by packager
md5sums=(
	ac296c57b471e98b88f0ae6dc180cc72
	SKIP
)
validpgpkeys=(C2AA3C3A6F9B1F932014879EF769BB961AF6D26A)

build() {
	cd "bemenu-$pkgver"
	cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib
	make
}

check() {
	cd "bemenu-$pkgver"
	make test
}

package() {
	cd "bemenu-$pkgver"
	make DESTDIR="$pkgdir" install
}
