# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=mpdscribble
pkgver=0.25
pkgrel=1
pkgdesc="last.fm client for mpd"
options="!check" # No test target
url="https://github.com/MusicPlayerDaemon/mpdscribble"
arch="all"
license="GPL-2.0-or-later"
makedepends="meson libmpdclient-dev curl-dev libgcrypt-dev boost-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://www.musicpd.org/download/mpdscribble/$pkgver/mpdscribble-$pkgver.tar.xz
	gcc12.patch
	mpdscribble.initd
	"

build() {
	abuild-meson \
		-Dsystemd=disabled \
		-Dtest=false \
		-Dsyslog=enabled \
		. output
	meson compile -C output
}

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

	install -Dm755 "$srcdir"/mpdscribble.initd \
		"$pkgdir"/etc/init.d/mpdscribble
}

sha512sums="
d22c334865794ca45142b2d8edbaffa69cd79b11de33406d1588ea157941973862d3841145a5fe3d530cb8253af944eb9ecc2b6be4fd57c07600e53b63161e47  mpdscribble-0.25.tar.xz
466326c17b00b988f805e2a5c9156ce0dca974c5abad235cbf93477a87a571e05e2359cae8b6d0db438c5923e3b7ca605ea9ff0e261c27265b68e830dda8c606  gcc12.patch
b82d3e5678aba145a5c8d172ebf74960d164e3e934426cc755948d795743bb07158f502705d40c1730a40b6a6d73e84c5792419adaf6ab83ec7c33756f0abb43  mpdscribble.initd
"
