summaryrefslogtreecommitdiff
path: root/audio/go-librespot
diff options
context:
space:
mode:
Diffstat (limited to 'audio/go-librespot')
-rw-r--r--audio/go-librespot/Makefile30
-rw-r--r--audio/go-librespot/distinfo5
-rw-r--r--audio/go-librespot/files/config.yml1
-rw-r--r--audio/go-librespot/files/go-librespot.in41
-rw-r--r--audio/go-librespot/pkg-descr3
-rw-r--r--audio/go-librespot/pkg-plist2
6 files changed, 82 insertions, 0 deletions
diff --git a/audio/go-librespot/Makefile b/audio/go-librespot/Makefile
new file mode 100644
index 000000000000..c03a4c482ba9
--- /dev/null
+++ b/audio/go-librespot/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= go-librespot
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.5.0
+PORTREVISION= 2
+CATEGORIES= audio
+
+MAINTAINER= ale@biancalanas.net
+COMMENT= Yet another open-source Spotify Connect client, written in Go
+WWW= https://github.com/devgianlu/go-librespot
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libogg.so:audio/libogg \
+ libasound.so:audio/alsa-lib \
+ libvorbis.so:audio/libvorbis
+
+USES= go:modules pkgconfig
+USE_RC_SUBR= ${PORTNAME}
+
+GO_MODULE= github.com/devgianlu/go-librespot
+
+GO_TARGET= ./cmd/daemon:${PREFIX}/bin/go-librespot
+GO_BUILDFLAGS= -ldflags "-X github.com/devgianlu/go-librespot.version=${DISTVERSION} -X github.com/devgianlu/go-librespot.commit=fc55ed0"
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_DATA} ${FILESDIR}/config.yml ${STAGEDIR}${ETCDIR}/config.yml.sample
+
+.include <bsd.port.mk>
diff --git a/audio/go-librespot/distinfo b/audio/go-librespot/distinfo
new file mode 100644
index 000000000000..6880489138e4
--- /dev/null
+++ b/audio/go-librespot/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1759670837
+SHA256 (go/audio_go-librespot/go-librespot-v0.5.0/v0.5.0.mod) = dfb7c599404395927cf1755213c311f48ea63344b30f1f516be4c57bb4ea8654
+SIZE (go/audio_go-librespot/go-librespot-v0.5.0/v0.5.0.mod) = 1828
+SHA256 (go/audio_go-librespot/go-librespot-v0.5.0/v0.5.0.zip) = db94a0c511f586d5e1662417c82c1debf1bc01934440d22e2dc37ab18a78d2eb
+SIZE (go/audio_go-librespot/go-librespot-v0.5.0/v0.5.0.zip) = 424569
diff --git a/audio/go-librespot/files/config.yml b/audio/go-librespot/files/config.yml
new file mode 100644
index 000000000000..60a087651df9
--- /dev/null
+++ b/audio/go-librespot/files/config.yml
@@ -0,0 +1 @@
+log_disable_timestamp: true
diff --git a/audio/go-librespot/files/go-librespot.in b/audio/go-librespot/files/go-librespot.in
new file mode 100644
index 000000000000..526cd959822b
--- /dev/null
+++ b/audio/go-librespot/files/go-librespot.in
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# PROVIDE: go_librespot
+# REQUIRE: DAEMON NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf.local, /etc/rc.conf or
+# /etc/rc.conf.d/go-librespot to enable this service:
+#
+# go_librespot_enable (bool): Set to NO by default.
+# Set it to "YES" to enable go-librespot.
+# go_librespot_config_dir (str): Set to %%PREFIX%%/etc/go-librespot by default.
+# Path to configuration file.
+# go_librespot_user (str): Set to "nobody" by default.
+# User to run go-librespot
+
+. /etc/rc.subr
+
+name=go_librespot
+rcvar=go_librespot_enable
+start_precmd="${name}_precmd"
+
+load_rc_config $name
+
+: ${go_librespot_enable:="NO"}
+: ${go_librespot_config_dir:="%%PREFIX%%/etc/go-librespot"}
+: ${go_librespot_user:="nobody"}
+
+pidfile="/var/run/${name}/${name}.pid"
+procname="%%PREFIX%%/bin/go-librespot"
+command="/usr/sbin/daemon"
+command_args="-S -m 3 -s info -l daemon -p ${pidfile} ${procname} --config_dir ${go_librespot_config_dir}"
+
+go_librespot_precmd()
+{
+ /usr/bin/install -d -m 0755 -o ${go_librespot_user} ${go_librespot_config_dir}
+ /usr/bin/install -d -m 0755 -o ${go_librespot_user} /var/run/${name}
+}
+
+run_rc_command "$1"
diff --git a/audio/go-librespot/pkg-descr b/audio/go-librespot/pkg-descr
new file mode 100644
index 000000000000..bd23e6fc4956
--- /dev/null
+++ b/audio/go-librespot/pkg-descr
@@ -0,0 +1,3 @@
+Yet another open-source Spotify Connect compatible client, written in Go.
+go-librespot gives you the freedom to have a Spotify Connect device wherever
+you want.
diff --git a/audio/go-librespot/pkg-plist b/audio/go-librespot/pkg-plist
new file mode 100644
index 000000000000..278fe33f67e9
--- /dev/null
+++ b/audio/go-librespot/pkg-plist
@@ -0,0 +1,2 @@
+bin/go-librespot
+@sample %%ETCDIR%%/config.yml.sample