New port audio/gonic

music streaming server / subsonic server API implementation

features
*  browsing by folder (keeping your full tree intact)
*  browsing by tags (using taglib - supports mp3, opus, flac, ape, m4a, wav,
   etc.)
*  on-the-fly audio transcoding and caching (requires ffmpeg) (thank you spijet)
*  pretty fast scanning (with my library of ~27k tracks, initial scan takes
   about 10m, and about 5s after incrementally)
*  multiple users, each with their own transcoding preferences, playlists, top
   tracks, top artists, etc.
*  last.fm scrobbling
*  artist similarities and biographies from the last.fm api
*  a web interface for configuration (set up last.fm, manage users, start scans,
   etc.)
*  support for the album-artist tag, to not clutter your artist list with
   compilation album appearances
*  written in go, so lightweight and suitable for a raspberry pi, etc.
*  newer salt and token auth
*  tested on dsub, jamstash, sublime music, and soundwaves

WWW: https://github.com/sentriz/gonic
This commit is contained in:
Baptiste Daroussin 2020-04-09 10:28:59 +00:00
parent 4f93cfaa34
commit 5863d29713
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=531197
7 changed files with 198 additions and 2 deletions

2
GIDs
View File

@ -192,7 +192,7 @@ signal-cli:*:248:
sonarqube:*:249:
sems:*:250:
irrd:*:251:
# free: 252
gonic:*:252:
_adsuck:*:253:
imds:*:254:
_i2pd:*:255:

2
UIDs
View File

@ -197,7 +197,7 @@ signal-cli:*:248:248::0:0:Signal CLI:/nonexistent:/usr/sbin/nologin
sonarqube:*:249:249::0:0:SonarQube Server:/nonexistent:/usr/sbin/nologin
sems:*:250:250::0:0:SIP Express Media Server:/nonexistent:/usr/sbin/nologin
irrd:*:251:251::0:0:irrd Daemon:/nonexistent:/usr/sbin/nologin
# free: 252
gonic:*:252:252::0:0:Music streaming server:/nonexistent:/usr/sbin/nologin
_adsuck:*:253:253::0:0:Adsuck ad blocking user:/nonexistent:/usr/sbin/nologin
imds:*:254:254::0:0:Instance Metadata Service filter:/nonexistent:/usr/sbin/nologin
_i2pd:*:255:255::0:0:I2P daemon:/var/db/i2pd:/usr/sbin/nologin

View File

@ -233,6 +233,7 @@
SUBDIR += gnustep-cdplayer
SUBDIR += goattracker
SUBDIR += gogglesmm
SUBDIR += gonic
SUBDIR += goobox
SUBDIR += gqradio
SUBDIR += gradio

71
audio/gonic/Makefile Normal file
View File

@ -0,0 +1,71 @@
# $FreeBSD$
PORTNAME= gonic
PORTVERSION= 0.8.4
DISTVERSIONPREFIX= v
CATEGORIES= audio net
MAINTAINER= bapt@FreeBSD.org
COMMENT= Music streaming server / subsonic server API implementation
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libtag.so:audio/taglib
USES= go:modules pkgconfig
USE_RC_SUBR= ${PORTNAME}
USE_GITHUB= yes
GH_ACCOUNT= sentriz
GO_TARGET= cmd/gonic cmd/gonicscan
GH_TUPLE= \
Masterminds:goutils:v1.1.0:masterminds_goutils/vendor/github.com/Masterminds/goutils \
Masterminds:semver:v1.4.2:masterminds_semver/vendor/github.com/Masterminds/semver \
Masterminds:sprig:v2.20.0:masterminds_sprig/vendor/github.com/Masterminds/sprig \
cespare:xxhash:v1.1.0:cespare_xxhash/vendor/github.com/cespare/xxhash \
dustin:go-humanize:v1.0.0:dustin_go_humanize/vendor/github.com/dustin/go-humanize \
go-gormigrate:gormigrate:v1.6.0:go_gormigrate_gormigrate/vendor/gopkg.in/gormigrate.v1 \
golang:appengine:v1.6.1:golang_appengine/vendor/google.golang.org/appengine \
golang:crypto:cc06ce4a13d4:golang_crypto/vendor/golang.org/x/crypto \
golang:lint:959b441ac422:golang_lint/vendor/github.com/golang/lint \
google:uuid:v1.1.1:google_uuid/vendor/github.com/google/uuid \
googleapis:google-cloud-go:v0.40.0:googleapis_google_cloud_go/vendor/cloud.google.com/go \
gorilla:context:v1.1.1:gorilla_context/vendor/github.com/gorilla/context \
gorilla:mux:v1.7.3:gorilla_mux/vendor/github.com/gorilla/mux \
gorilla:securecookie:v1.1.1:gorilla_securecookie/vendor/github.com/gorilla/securecookie \
gorilla:sessions:v1.1.3:gorilla_sessions/vendor/github.com/gorilla/sessions \
huandu:xstrings:v1.2.0:huandu_xstrings/vendor/github.com/huandu/xstrings \
imdario:mergo:v0.3.7:imdario_mergo/vendor/github.com/imdario/mergo \
jinzhu:gorm:v1.9.10:jinzhu_gorm/vendor/github.com/jinzhu/gorm \
jinzhu:inflection:v1.0.0:jinzhu_inflection/vendor/github.com/jinzhu/inflection \
josephburnett:jd:1f9071c800e7:josephburnett_jd/vendor/github.com/josephburnett/jd \
karrick:godirwalk:v1.15.2:karrick_godirwalk/vendor/github.com/karrick/godirwalk \
kr:pretty:v0.1.0:kr_pretty/vendor/github.com/kr/pretty \
mattn:go-sqlite3:v1.10.0:mattn_go_sqlite3/vendor/github.com/mattn/go-sqlite3 \
nicksellen:audiotags:94015fa599bd:nicksellen_audiotags/vendor/github.com/nicksellen/audiotags \
oxtoacart:bpool:03653db5a59c:oxtoacart_bpool/vendor/github.com/oxtoacart/bpool \
peterbourgon:ff:v1.2.0:peterbourgon_ff/vendor/github.com/peterbourgon/ff \
pkg:errors:v0.8.1:pkg_errors/vendor/github.com/pkg/errors \
rainycape:unidecode:cb7f23ec59be:rainycape_unidecode/vendor/github.com/rainycape/unidecode \
wader:gormstore:acb787ba3755:wader_gormstore/vendor/github.com/wader/gormstore
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
PLIST_FILES= bin/gonic \
bin/gonicscan
do-build:
(cd ${GO_WRKSRC}; \
${ECHO_MSG} "===> Building gonic from cmd/gonic/main.go"; \
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} build ${GO_BUILDFLAGS} \
-o ${GO_WRKDIR_BIN}/gonic cmd/gonic/main.go ; \
${ECHO_MSG} "===> Building gonicscan from cmd/gonicscan/main.go"; \
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} build ${GO_BUILDFLAGS} \
-o ${GO_WRKDIR_BIN}/gonicscan cmd/gonicscan/main.go ; \
)
.include <bsd.port.mk>

61
audio/gonic/distinfo Normal file
View File

@ -0,0 +1,61 @@
TIMESTAMP = 1586418832
SHA256 (sentriz-gonic-v0.8.4_GH0.tar.gz) = d9dfcc9094ee340632d85edb36c3a0cba54be9ee72b83b0e7de8ae79d84a9891
SIZE (sentriz-gonic-v0.8.4_GH0.tar.gz) = 1088182
SHA256 (Masterminds-goutils-v1.1.0_GH0.tar.gz) = 053a61c4b0d78e6978600c99562f04d053993c428d549a20b627151cf1aabbae
SIZE (Masterminds-goutils-v1.1.0_GH0.tar.gz) = 14610
SHA256 (Masterminds-semver-v1.4.2_GH0.tar.gz) = 13532037b53099292eca94fffba355f2399284b5f7b5c9cb7d9d4fce760336dd
SIZE (Masterminds-semver-v1.4.2_GH0.tar.gz) = 15901
SHA256 (Masterminds-sprig-v2.20.0_GH0.tar.gz) = d1e09d0deb5586e30d2781975f7237fa1fab9b70f503acf8e1fca2ac75af811e
SIZE (Masterminds-sprig-v2.20.0_GH0.tar.gz) = 38720
SHA256 (cespare-xxhash-v1.1.0_GH0.tar.gz) = 9418be390574092f0ca989b9ae2f5450270ead8125a635a100850b28c8c9c495
SIZE (cespare-xxhash-v1.1.0_GH0.tar.gz) = 8200
SHA256 (dustin-go-humanize-v1.0.0_GH0.tar.gz) = e4540bd50ac855143b4f2e509313079c50cf5d8774f09cc10dbca5ae9803d8ba
SIZE (dustin-go-humanize-v1.0.0_GH0.tar.gz) = 17260
SHA256 (go-gormigrate-gormigrate-v1.6.0_GH0.tar.gz) = f88aa9d97e99e6463d5469fc39683f86651fb36ca55f7018f7781c552276cb27
SIZE (go-gormigrate-gormigrate-v1.6.0_GH0.tar.gz) = 12738
SHA256 (golang-appengine-v1.6.1_GH0.tar.gz) = 1755aaf4c6246579337bf1bc4f834ef00c56216da87b20456863ca91985b5afa
SIZE (golang-appengine-v1.6.1_GH0.tar.gz) = 333353
SHA256 (golang-crypto-cc06ce4a13d4_GH0.tar.gz) = 12d4a82aeb8c2b1c19149d99b5a8307866d8083342ad54ffb4df59d275236e2b
SIZE (golang-crypto-cc06ce4a13d4_GH0.tar.gz) = 1693029
SHA256 (golang-lint-959b441ac422_GH0.tar.gz) = fc9f3cfe7ba2a932975bd513c40384b2eb32f3967a130c40676d72c592e4ac1d
SIZE (golang-lint-959b441ac422_GH0.tar.gz) = 32998
SHA256 (google-uuid-v1.1.1_GH0.tar.gz) = bebd4b0b4ea152a9793615ef23c83f688876d8c284a2092264d20a4bf4ffc423
SIZE (google-uuid-v1.1.1_GH0.tar.gz) = 13543
SHA256 (googleapis-google-cloud-go-v0.40.0_GH0.tar.gz) = 0d071f37137e1fdf75ca39cf19ce3fd966a1e2e28091e01c4ecd4e6437c2cd72
SIZE (googleapis-google-cloud-go-v0.40.0_GH0.tar.gz) = 2090665
SHA256 (gorilla-context-v1.1.1_GH0.tar.gz) = 2dfdd051c238695bf9ebfed0bf6a8c533507ac0893bce23be5930e973736bb03
SIZE (gorilla-context-v1.1.1_GH0.tar.gz) = 4574
SHA256 (gorilla-mux-v1.7.3_GH0.tar.gz) = 92adb9aea022f8b35686b75be50ba1206c4457c2f8a0e2a9d10d8721f35b3f11
SIZE (gorilla-mux-v1.7.3_GH0.tar.gz) = 42495
SHA256 (gorilla-securecookie-v1.1.1_GH0.tar.gz) = b7897b2243f0d43913aca318593c5c2586294fcd3265189d564ddda1b880fe95
SIZE (gorilla-securecookie-v1.1.1_GH0.tar.gz) = 41240
SHA256 (gorilla-sessions-v1.1.3_GH0.tar.gz) = dfc859af8f547fd2c746815d6665aa35263479cbd699f5aa3221b9564d18f976
SIZE (gorilla-sessions-v1.1.3_GH0.tar.gz) = 12778
SHA256 (huandu-xstrings-v1.2.0_GH0.tar.gz) = c43737734bb260e7d77329af8a33bf687f9430abc1b21d3b1f4a8fa6fb3dbde3
SIZE (huandu-xstrings-v1.2.0_GH0.tar.gz) = 16628
SHA256 (imdario-mergo-v0.3.7_GH0.tar.gz) = ce29171c44a6b4084ed514bc9b4ed6c3c01462c210b7ec6fe5e56691a46eb939
SIZE (imdario-mergo-v0.3.7_GH0.tar.gz) = 16668
SHA256 (jinzhu-gorm-v1.9.10_GH0.tar.gz) = 4cad5ee883c7bec8ec508935b8733adaaf2c95ff3b315984b5699b60979a8008
SIZE (jinzhu-gorm-v1.9.10_GH0.tar.gz) = 99371
SHA256 (jinzhu-inflection-v1.0.0_GH0.tar.gz) = 582808364cc268544e3e6775b15d7fffbc28ccfb930a29840bb25e32d7d95e1f
SIZE (jinzhu-inflection-v1.0.0_GH0.tar.gz) = 4766
SHA256 (josephburnett-jd-1f9071c800e7_GH0.tar.gz) = 5364efd8f83ed30e0cf74db256d0253c74fbf1c30d8cf72cf6f30d1bec4c5509
SIZE (josephburnett-jd-1f9071c800e7_GH0.tar.gz) = 31845
SHA256 (karrick-godirwalk-v1.15.2_GH0.tar.gz) = ff489e2d8c65707865149ee0d80959452b2001565866828aa6eb4fd5fd73971f
SIZE (karrick-godirwalk-v1.15.2_GH0.tar.gz) = 24143
SHA256 (kr-pretty-v0.1.0_GH0.tar.gz) = 3aeb5d90b719765781befb9f156d0d0b8e5a7aafbcf15321e9eabbd35df31358
SIZE (kr-pretty-v0.1.0_GH0.tar.gz) = 8550
SHA256 (mattn-go-sqlite3-v1.10.0_GH0.tar.gz) = 26373461df8c717540b48b6014d823216a69545337cde6683308c6a67f63de01
SIZE (mattn-go-sqlite3-v1.10.0_GH0.tar.gz) = 2231288
SHA256 (nicksellen-audiotags-94015fa599bd_GH0.tar.gz) = 7577ef460c7c7dfdac1a5f80a74945b1a70343584b714c35b21affcb45c1988b
SIZE (nicksellen-audiotags-94015fa599bd_GH0.tar.gz) = 12235
SHA256 (oxtoacart-bpool-03653db5a59c_GH0.tar.gz) = b5898969c50f5677fa8ea955bd7a06b77083b56ae76607f49ae1aed0abd61b41
SIZE (oxtoacart-bpool-03653db5a59c_GH0.tar.gz) = 8478
SHA256 (peterbourgon-ff-v1.2.0_GH0.tar.gz) = a000ac71a8554a4918050f5ce4ab93f399b51f64efaf016cec9758877e8bbc1e
SIZE (peterbourgon-ff-v1.2.0_GH0.tar.gz) = 9672
SHA256 (pkg-errors-v0.8.1_GH0.tar.gz) = 7a428967c6fc2e80cd84a0d9469ab6bd4dbe6b13493ba6294322a933a5a7e356
SIZE (pkg-errors-v0.8.1_GH0.tar.gz) = 11009
SHA256 (rainycape-unidecode-cb7f23ec59be_GH0.tar.gz) = cd66a7ee66c8061c2d05585058323d0bcc6692761db94885511762428acfef96
SIZE (rainycape-unidecode-cb7f23ec59be_GH0.tar.gz) = 387823
SHA256 (wader-gormstore-acb787ba3755_GH0.tar.gz) = 377a3b5ab29da09123c323407941695e701cd14c1c62e9e89f896cf17bf40727
SIZE (wader-gormstore-acb787ba3755_GH0.tar.gz) = 5934

View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: gonic
# REQUIRE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name=gonic
rcvar=${name}_enable
desc="Music streaming server"
load_rc_config "${name}"
# other variables:
# gonic_scan_interval
# gonic_music_path
: ${gonic_enable:="NO"}
: ${gonic_user:="gonic"}
: ${gonic_group:="gonic"}
: ${gonic_proxy_prefix:="/"}
: ${gonic_db_path:="/var/db/gonic/gonic.db"}
: ${gonic_listen_addr:="0.0.0.0:4747"}
pidfile=/var/run/gonic.pid
procname="%%PREFIX%%/bin/gonic"
command="/usr/sbin/daemon"
command_args="-cf -p ${pidfile} ${procname} ${gonic_music_path:+-music-path=${gonic_music_path}} ${gonic_proxy_prefix:+-proxy-prefix=${gonic_proxy_prefix}} ${gonic_listen_addr:+-listen-addr=${gonic_listen_addr}} ${gonic_scan_interval:+-scan-interval=${gonic_scan_interval}} ${gonic_db_path:+-db-path=${gonic_db_path}} ${gonic_args}"
gonic_startprecmd()
{
if [ ! -e ${pidfile} ]; then
install -o ${gonic_user} -g ${gonic_group} /dev/null ${pidfile};
fi
}
start_precmd=gonic_startprecmd
run_rc_command "$1"

22
audio/gonic/pkg-descr Normal file
View File

@ -0,0 +1,22 @@
music streaming server / subsonic server API implementation
features
* browsing by folder (keeping your full tree intact)
* browsing by tags (using taglib - supports mp3, opus, flac, ape, m4a, wav,
etc.)
* on-the-fly audio transcoding and caching (requires ffmpeg) (thank you spijet)
* pretty fast scanning (with my library of ~27k tracks, initial scan takes
about 10m, and about 5s after incrementally)
* multiple users, each with their own transcoding preferences, playlists, top
tracks, top artists, etc.
* last.fm scrobbling
* artist similarities and biographies from the last.fm api
* a web interface for configuration (set up last.fm, manage users, start scans,
etc.)
* support for the album-artist tag, to not clutter your artist list with
compilation album appearances
* written in go, so lightweight and suitable for a raspberry pi, etc.
* newer salt and token auth
* tested on dsub, jamstash, sublime music, and soundwaves
WWW: https://github.com/sentriz/gonic