View | Details | Raw Unified | Return to bug 270751 | Differences between
and this patch

Collapse All | Expand All

(-)b/GIDs (-1 / +1 lines)
Lines 692-698 c-lightning:*:735: Link Here
692
# free: 748
692
# free: 748
693
# free: 749
693
# free: 749
694
# free: 750
694
# free: 750
695
# free: 751
695
supysonic:*:751:
696
# free: 752
696
# free: 752
697
# free: 753
697
# free: 753
698
# free: 754
698
# free: 754
(-)b/UIDs (-1 / +1 lines)
Lines 697-703 c-lightning:*:735:735::0:0:c-lightning Daemon:/var/db/c-lightning:/usr/sbin/nolo Link Here
697
# free: 748
697
# free: 748
698
# free: 749
698
# free: 749
699
# free: 750
699
# free: 750
700
# free: 751
700
supysonic:*:751:751::0:0:Subsonic server API:/var/db/supysonic:/usr/sbin/nologin
701
# free: 752
701
# free: 752
702
# free: 753
702
# free: 753
703
# free: 754
703
# free: 754
(-)b/audio/py-supysonic/Makefile (+67 lines)
Added Link Here
1
PORTNAME=	supysonic
2
DISTVERSION=	0.7.5
3
CATEGORIES=	audio python
4
MASTER_SITES=	PYPI
5
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
6
DISTNAME=	Supysonic-${DISTVERSION}
7
8
MAINTAINER=	DtxdF@disroot.org
9
COMMENT=	Python implementation of the Subsonic server API
10
WWW=		https://supysonic.readthedocs.io/
11
12
LICENSE=	AGPLv3
13
LICENSE_FILE=	${WRKSRC}/LICENSE
14
15
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}Flask>0:www/py-flask@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}mediafile>0:devel/py-mediafile@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}peewee>0:databases/py-peewee@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}watchdog>0:devel/py-watchdog@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}zipstream-ng>0:archivers/py-zipstream-ng@${PY_FLAVOR}
23
24
USES=		python:3.7+
25
USE_PYTHON=	autoplist distutils
26
27
USE_RC_SUBR=	supysonic \
28
		supysonic-daemon
29
30
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD} \
31
		USER="${USERS:[0]}"
32
33
USERS=		supysonic
34
GROUPS=		supysonic
35
36
PLIST_SUB=	GROUP="${GROUPS:[0]}" \
37
		USER="${USERS:[0]}"
38
39
OPTIONS_DEFINE=		PGSQL SQLITE3
40
OPTIONS_DEFAULT=	GUNICORN SQLITE3 PGSQL MYSQLCLIENT
41
OPTIONS_MULTI=		WSGI
42
OPTIONS_MULTI_WSGI=	GEVENT GUNICORN WAITRESS
43
OPTIONS_RADIO=		MYSQL
44
OPTIONS_RADIO_MYSQL=	MYSQLCLIENT PYMYSQL
45
46
GEVENT_DESC=		Install with gevent
47
GUNICORN_DESC=		Install with gunicorn
48
MYSQLCLIENT_DESC=	Install with MySQLdb
49
PYMYSQL_DESC=		Install with pymysql
50
WAITRESS_DESC=		Install with waitress
51
52
GEVENT_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}gevent>0:devel/py-gevent
53
GUNICORN_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}gunicorn>0:www/py-gunicorn
54
MYSQLCLIENT_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mysqlclient>0:databases/py-mysqlclient@${PY_FLAVOR}
55
PGSQL_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR}
56
PYMYSQL_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}pymysql>0:databases/py-pymysql@${PY_FLAVOR}
57
SQLITE3_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
58
WAITRESS_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}waitress>0:www/py-waitress
59
60
post-install:
61
	@${MKDIR} ${STAGEDIR}${ETCDIR}
62
	${INSTALL_DATA} ${FILESDIR}/supysonic.conf ${STAGEDIR}${ETCDIR}/supysonic.conf.sample
63
.for dir in run log
64
	@${MKDIR} ${STAGEDIR}/var/${dir}/supysonic
65
.endfor
66
67
.include <bsd.port.mk>
(-)b/audio/py-supysonic/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1680567016
2
SHA256 (Supysonic-0.7.5.tar.gz) = 78c6cff107b1b9ce4b19c44ce250b6a4683e01b6de7650873edcd0a034ba8f84
3
SIZE (Supysonic-0.7.5.tar.gz) = 339860
(-)b/audio/py-supysonic/files/patch-supysonic_config.py (+11 lines)
Added Link Here
1
--- supysonic/config.py.orig	2023-04-08 00:33:44 UTC
2
+++ supysonic/config.py
3
@@ -61,7 +61,7 @@ class DefaultConfig:
4
 
5
 class IniConfig(DefaultConfig):
6
     common_paths = [
7
-        "/etc/supysonic",
8
+        os.path.join(sys.prefix, "etc/supysonic/supysonic.conf"),
9
         os.path.expanduser("~/.supysonic"),
10
         os.path.expanduser("~/.config/supysonic/supysonic.conf"),
11
         "supysonic.conf",
(-)b/audio/py-supysonic/files/supysonic-daemon.in (+46 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# PROVIDE: supysonic_daemon
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
#
7
# Configuration settings for supysonic-daemon in /etc/rc.conf
8
#
9
# supysonic_daemon_enable (bool):    Enable supysonic-daemon. (default=NO)
10
# supysonic_daemon_user (str):       User to run supysonic-daemon. (default=%%USER%%)
11
# supysonic_daemon_log (str):        Send stdout/stderr to a file. (default=/dev/null)
12
# supysonic_daemon_flags (str):      Flags used for supysonic-daemon. (default=)
13
#
14
15
. /etc/rc.subr
16
17
name=supysonic_daemon
18
rcvar=supysonic_daemon_enable
19
20
load_rc_config $name
21
22
: ${supysonic_daemon_enable:=NO}
23
: ${supysonic_daemon_user:=%%USER%%}
24
: ${supysonic_daemon_log:=/dev/null}
25
26
pidfile=/var/run/supysonic-daemon.pid
27
procname="%%PREFIX%%/bin/supysonic-daemon"
28
command_interpreter="%%PYTHON_CMD%%"
29
start_cmd="supysonic_daemon_start"
30
31
pidfile=/var/run/${name}.pid
32
command="%%PREFIX%%/bin/${name}"
33
34
supysonic_daemon_start()
35
{
36
	echo "Starting supysonic-daemon."
37
	/usr/sbin/daemon -c \
38
		-p "${pidfile}" \
39
		-o "${supysonic_daemon_log}" \
40
		-u "${supysonic_daemon_user}" \
41
		"${command_interpreter}" \
42
		"${procname}" \
43
		${supysonic_daemon_flags}
44
}
45
46
run_rc_command "$1"
(-)b/audio/py-supysonic/files/supysonic.conf (+96 lines)
Added Link Here
1
[base]
2
; A database URI. See the 'schema' folder for schema creation scripts. Note that
3
; you don't have to run these scripts yourself.
4
; Default: sqlite:////tmp/supysonic/supysonic.db
5
database_uri = sqlite:////var/db/supysonic/supysonic.db
6
;database_uri = mysql://supysonic:supysonic@localhost/supysonic
7
;database_uri = postgres://supysonic:supysonic@localhost/supysonic
8
9
; Optional, restrict scanner to these extensions. Default: none
10
;scanner_extensions = mp3 ogg
11
12
; Should the scanner follow symbolic links? Default: no
13
follow_symlinks = no
14
15
[webapp]
16
; Optional cache directory. Default: /tmp/supysonic
17
cache_dir = /var/db/supysonic/cache
18
19
; Main cache max size in MB. Default: 512
20
cache_size = 512
21
22
; Transcode cache max size in MB. Default: 1024 (1GB)
23
transcode_cache_size = 1024
24
25
; Optional rotating log file. Default: none
26
log_file = /var/log/supysonic/supysonic.log
27
28
; Log level. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL.
29
; Default: WARNING
30
log_level = WARNING
31
32
; Enable log rotation. Default: yes
33
log_rotate = yes
34
35
; Enable the Subsonic REST API. You'll most likely want to keep this on, here
36
; for testing purposes. Default: on
37
;mount_api = on
38
39
; Enable the administrative web interface. Default: on
40
;mount_webui = on
41
42
; Space separated list of prefixes that should be ignored on index endpoints
43
; Default: El La Le Las Les Los The
44
index_ignored_prefixes = El La Le Las Les Los The
45
46
; Enable the ChartLyrics API. Default: off
47
online_lyrics = off
48
49
[daemon]
50
; Socket file the daemon will listen on for incoming management commands
51
; Default: /tmp/supysonic/supysonic.sock
52
socket = /var/run/supysonic/supysonic.sock
53
54
; Defines if the file watcher should be started. Default: yes
55
run_watcher = yes
56
57
; Delay in seconds before triggering scanning operation after a change have been
58
; detected.
59
; This prevents running too many scans when multiple changes are detected for a
60
; single file over a short time span. Default: 5
61
wait_delay = 5
62
63
; Command used by the jukebox
64
jukebox_command = mplayer -ss %offset %path
65
66
; Optional rotating log file for the scanner daemon. Logs to stderr if empty
67
log_file = /var/log/supysonic/supysonic-daemon.log
68
log_level = INFO
69
log_rotate = yes
70
71
[lastfm]
72
; API and secret key to enable scrobbling. http://www.last.fm/api/accounts
73
; Defaults: none
74
;api_key =
75
;secret =
76
77
[transcoding]
78
; Programs used to convert from one format/bitrate to another. Defaults: none
79
transcoder_mp3_mp3 = lame --quiet --mp3input -b %outrate %srcpath -
80
transcoder = ffmpeg -i %srcpath -ab %outratek -v 0 -f %outfmt -
81
decoder_mp3 = mpg123 --quiet -w - %srcpath
82
decoder_ogg = oggdec -o %srcpath
83
decoder_flac = flac -d -c -s %srcpath
84
encoder_mp3 = lame --quiet -b %outrate - -
85
encoder_ogg = oggenc2 -Q -M %outrate -
86
87
; Default format, used when a client requests a bitrate lower than the original
88
; file and no specific format
89
default_transcode_target = mp3
90
91
[mimetypes]
92
; Extension to mimetype mappings in case your system has some trouble guessing
93
; Default: none
94
;mp3 = audio/mpeg
95
;ogg = audio/vorbis
96
(-)b/audio/py-supysonic/files/supysonic.in (+46 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# PROVIDE: supysonic
4
# REQUIRE: NETWORKING LOGIN
5
# KEYWORD: shutdown
6
#
7
# Configuration settings for supysonic in /etc/rc.conf
8
#
9
# supysonic_enable (bool):    Enable supysonic. (default=NO)
10
# supysonic_user (str):       User to run supysonic-server. (default=%%USER%%)
11
# supysonic_log (str):        Send stdout/stderr to a file. (default=/dev/null)
12
# supysonic_flags (str):      Flags used for supysonic-server. (default=)
13
#
14
15
. /etc/rc.subr
16
17
name=supysonic
18
rcvar=supysonic_enable
19
20
load_rc_config $name
21
22
: ${supysonic_enable:=NO}
23
: ${supysonic_user:=%%USER%%}
24
: ${supysonic_log:=/dev/null}
25
26
pidfile=/var/run/${name}.pid
27
procname="%%PREFIX%%/bin/${name}-server"
28
command_interpreter="%%PYTHON_CMD%%"
29
start_cmd="supysonic_start"
30
31
pidfile=/var/run/${name}.pid
32
command="%%PREFIX%%/bin/${name}"
33
34
supysonic_start()
35
{
36
	echo "Starting ${name}."
37
	/usr/sbin/daemon -c \
38
		-p "${pidfile}" \
39
		-o "${supysonic_log}" \
40
		-u "${supysonic_user}" \
41
		"${command_interpreter}" \
42
		"${procname}" \
43
		${supysonic_flags}
44
}
45
46
run_rc_command "$1"
(-)b/audio/py-supysonic/pkg-descr (+11 lines)
Added Link Here
1
Supysonic is a Python implementation of the Subsonic server API.
2
3
Current supported features are:
4
 * browsing (by folders or tags)
5
 * streaming of various audio files formats
6
 * transcoding
7
 * user or random playlists
8
 * cover art
9
 * starred tracks/albums and ratings
10
 * lastfm scrobbling
11
 * Jukebox mode
(-)b/audio/py-supysonic/pkg-plist (-1 / +4 lines)
Added Link Here
0
- 
1
@dir %%ETCDIR%%
2
@sample %%ETCDIR%%/supysonic.conf.sample
3
@dir(%%USER%%,%%GROUP%%,) /var/run/supysonic
4
@dir(%%USER%%,%%GROUP%%,) /var/log/supysonic

Return to bug 270751