about summary refs log tree commit diff
path: root/media-sound
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/mpdscribble/Manifest15
-rwxr-xr-xmedia-sound/mpdscribble/files/mpdscribble32
-rw-r--r--media-sound/mpdscribble/metadata.xml11
l---------media-sound/mpdscribble/mpdscribble-0.23-r1.ebuild1
-rw-r--r--media-sound/mpdscribble/mpdscribble-9999.ebuild62
5 files changed, 121 insertions, 0 deletions
diff --git a/media-sound/mpdscribble/Manifest b/media-sound/mpdscribble/Manifest
new file mode 100644
index 0000000..b5b3718
--- /dev/null
+++ b/media-sound/mpdscribble/Manifest
@@ -0,0 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST mpdscribble-0.23.tar.gz 55177 BLAKE2B 37ec1d30e2dd7a72da0a70dac6d5cdb0cf40ed0bb54aa7d621fbe91e48286b2730c000836f270cd95307e4eb271435a4dc5bd07d8563b16c61c58778b9a30fbf SHA512 4b25f85f3c544ecd71f5f8d749801a7930b16ab6b46a8873200e0b51ff9f16d4f60505dfdb3abb0026e8d9747377c4aa18edace164de4a7d4825dbe907cd0cd2
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAEBCAAdFiEE6fNIPzHHKbRMonw4tA/LZgi747YFAl9dA+sACgkQtA/LZgi7
+47aquQgAxZ3QFqpeyBbsgIfeHqxKeOn0NvPCfFzV8oG1soSo9owhS9qoDMTASxG1
+6cPOiz4OYr1AGU3s5n0v+x28ayNe3Cy6dEnjjfZoBiBRFo/M8oi3D6rFrmZ7mtrw
+Zr1gn2SehF3oZWfXG0yaq5YUC1MD8jpeNs7EyrADpIP7QlyhYJTu55S2TLUu5B1Z
+2VXL+SWRg0v2gxxcU/b/7PSj1MLqEoZiD3yIP4jruWQNgVvlCWT+xGhUV7TR93aQ
+pD9ZH1AQlNuaWcinDtB3P94wiu6Ey3L+Di5cEAoRrslUydCFbSBIdsRYZD04oKGL
+I7Afjdq3zZJerP4NSo5aYYxBBDC+6Q==
+=b5BG
+-----END PGP SIGNATURE-----
diff --git a/media-sound/mpdscribble/files/mpdscribble b/media-sound/mpdscribble/files/mpdscribble
new file mode 100755
index 0000000..d23ebd1
--- /dev/null
+++ b/media-sound/mpdscribble/files/mpdscribble
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: CFGFILE=${CFGFILE:=/etc/mpdscribble.conf}
+
+get_config() {
+	x=$1
+	test -e ${CFGFILE} || return 1
+	cat ${CFGFILE} | \
+		sed -n -e '/^[ \t]*'${x}'/{s:^[ \t]*'${x}'[ \t]\+"\?\([^#"]\+\)[^"]*"\?$:\1: ; p }' | \
+		awk '{print $3}'
+}
+
+extra_started_commands='reload'
+command=/usr/bin/mpdscribble
+#command_args="--conf ${CFGFILE}"
+required_files=${CFGFILE}
+pidfile=$(get_config pid)
+description="An MPD client that submits information to Audioscrobbler"
+
+depend() {
+	need mpd
+	use net
+	config ${CFGFILE}
+}
+
+reload() {
+	ebegin "Reloading ${RC_SVCNAME}"
+	start-stop-daemon --pidfile ${pidfile} --signal HUP
+	eend $?
+}
diff --git a/media-sound/mpdscribble/metadata.xml b/media-sound/mpdscribble/metadata.xml
new file mode 100644
index 0000000..e2c358c
--- /dev/null
+++ b/media-sound/mpdscribble/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>azat@bahawi.net</email>
+		<name>Azat Bahawi</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">MusicPlayerDaemon/mpdscribble</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/media-sound/mpdscribble/mpdscribble-0.23-r1.ebuild b/media-sound/mpdscribble/mpdscribble-0.23-r1.ebuild
new file mode 120000
index 0000000..ddc84ff
--- /dev/null
+++ b/media-sound/mpdscribble/mpdscribble-0.23-r1.ebuild
@@ -0,0 +1 @@
+mpdscribble-9999.ebuild
\ No newline at end of file
diff --git a/media-sound/mpdscribble/mpdscribble-9999.ebuild b/media-sound/mpdscribble/mpdscribble-9999.ebuild
new file mode 100644
index 0000000..5a3c527
--- /dev/null
+++ b/media-sound/mpdscribble/mpdscribble-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} == *9999 ]]; then
+	SCM="git-r3"
+	EGIT_REPO_URI="https://github.com/MusicPlayerDaemon/mpdscribble.git"
+fi
+
+inherit meson ${SCM}
+
+DESCRIPTION="An MPD client that submits information to Audioscrobbler"
+HOMEPAGE="https://www.musicpd.org/clients/mpdscribble"
+
+if [[ ${PV} == *9999 ]]; then
+	SRC_URI=""
+	KEYWORDS=""
+else
+	SRC_URI="https://github.com/MusicPlayerDaemon/mpdscribble/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="syslog systemd test"
+
+RDEPEND="
+	syslog? ( virtual/logger )
+	systemd? ( sys-apps/systemd )
+	>=dev-libs/boost-1.62
+	>=media-libs/libmpdclient-2.5
+	>=net-misc/curl-7.18
+	dev-libs/libgcrypt
+"
+DEPEND="${RDEPEND}"
+BDEPEND=""
+
+DOCS=( "README.rst" "doc/mpdscribble.conf" )
+
+src_prepare() {
+	default
+	sed -e '/^install_data/{N;N;N;d;}' \
+		-i meson.build || die
+}
+
+src_configure() {
+	default
+	local emesonargs=(
+		$(meson_feature syslog)
+		$(meson_feature systemd)
+		$(meson_use test)
+	)
+	meson_src_configure
+}
+
+src_install() {
+	default
+	meson_src_install
+	doman doc/mpdscribble.1
+	newinitd "${FILESDIR}/mpdscribble" mpdscribble
+}

Consider giving Nix/NixOS a try! <3