# Contributor: Marvin Preuss <marvin@xsteadfastx.org>
# Maintainer: Marvin Preuss <marvin@xsteadfastx.org>
pkgname=upmpdcli
pkgver=1.8.16
pkgrel=0
pkgdesc="upmpdcli is a UPnP Media Renderer front-end for MPD, the Music Player Daemon"
pkgusers="upmpdcli"
pkggroups="upmpdcli"
url="https://www.lesbonscomptes.com/upmpdcli"
arch="all"
license="LGPL-2.1-or-later"
options="!check" # no test suite
makedepends="
	jsoncpp-dev
	libmicrohttpd-dev
	libmpdclient-dev
	libupnpp-dev
	meson
	"
subpackages="$pkgname-doc $pkgname-openrc"
install="$pkgname.pre-install"
source="$pkgname-$pkgver.tar.gz::https://www.lesbonscomptes.com/upmpdcli/downloads/upmpdcli-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.conf"

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
	install -d -o upmpdcli -g upmpdcli "$pkgdir"/var/cache/upmpdcli
}

sha512sums="
6929575ece0b034b82ab8b90115d34c0809dae49dd00252ba09b61a7e65d8defaeb4bdad838226c99105e8e55830e24728b20ee73f32514f471ef8666d55ffff  upmpdcli-1.8.16.tar.gz
f586c538abb51f373bf8a8277132694ad289f9c23de9389cb5c9cb67fdbec192529645b759f745ddeca3ce24893580b0ce0d344a8e75b3fd1edd021a0335f617  upmpdcli.initd
b6815c29e8c648fd7577f9137f1552dab96710e80458a19fc332c6382471c47fdc056c8e3e1353fc982610173e498b96df8fd18de93f5546773a22e02e58886d  upmpdcli.conf
"
