summaryrefslogtreecommitdiff
blob: c193857802bcc9bb9d2c1ad5ef5b7397e76dde13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit meson systemd

DESCRIPTION="An MPD client that submits information to Audioscrobbler"
HOMEPAGE="
	https://www.musicpd.org/clients/mpdscribble/
	https://github.com/MusicPlayerDaemon/mpdscribble
"
SRC_URI="https://www.musicpd.org/download/${PN}/${PV}/${P}.tar.xz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE="test"
# Test program is just an interactive check.
RESTRICT="!test? ( test ) test"

RDEPEND="
	dev-libs/boost
	dev-libs/libgcrypt:=
	media-libs/libmpdclient
	net-misc/curl
"

DEPEND="${RDEPEND}"

DOCS=( AUTHORS COPYING NEWS README.rst )

PATCHES=(
	"${FILESDIR}"/${PN}-0.23-Unconditionally-generate-systemd-unit-files.patch
	"${FILESDIR}"/${PN}-0.23-Don-t-install-AUTHORS-COPYING-NEWS-README.rst.patch
)

src_configure() {
	local emesonargs=(
		$(meson_use test)
	)

	meson_src_configure
}

src_install() {
	meson_src_install
	newinitd "${FILESDIR}/mpdscribble.rc" mpdscribble
	keepdir /var/cache/mpdscribble

	systemd_dounit "${BUILD_DIR}"/systemd/system/"${PN}".service
	systemd_douserunit "${BUILD_DIR}"/systemd/user/"${PN}".service
}