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

Collapse All | Expand All

(-)subsonic-standalone/Makefile (-34 / +27 lines)
Lines 2-12 Link Here
2
# Based on www/subsonic from Nicole Reid <root@cooltrainer.org>
2
# Based on www/subsonic from Nicole Reid <root@cooltrainer.org>
3
# $FreeBSD: head/www/subsonic-standalone/Makefile 382052 2015-03-23 22:21:33Z antoine $
3
# $FreeBSD: head/www/subsonic-standalone/Makefile 382052 2015-03-23 22:21:33Z antoine $
4
4
5
PORTNAME=	subsonic-standalone
5
PORTNAME=	subsonic
6
PORTVERSION=	5.2
6
PORTVERSION=	6.0
7
CATEGORIES=	www java
7
CATEGORIES=	www java
8
MASTER_SITES=	SF/subsonic/subsonic/${PORTVERSION}
8
MASTER_SITES=	SF/subsonic/subsonic/${PORTVERSION}
9
DISTNAME=	subsonic-${PORTVERSION}-standalone
9
PKGNAMESUFFIX=	-standalone
10
DISTNAME=	${PORTNAME}-${PORTVERSION}${PKGNAMESUFFIX}
10
11
11
MAINTAINER=	jlh@FreeBSD.org
12
MAINTAINER=	jlh@FreeBSD.org
12
COMMENT=	Subsonic streaming media server, standalone version
13
COMMENT=	Subsonic streaming media server, standalone version
Lines 29-86 Link Here
29
OPTIONS_DEFAULT=	FFMPEG
30
OPTIONS_DEFAULT=	FFMPEG
30
OPTIONS_SUB=	yes
31
OPTIONS_SUB=	yes
31
32
32
FFMPEG_RUN_DEPENDS=	ffmpeg:${PORTSDIR}/multimedia/ffmpeg
33
FFMPEG_RUN_DEPENDS=	ffmpeg:multimedia/ffmpeg
33
FLAC_RUN_DEPENDS=	flac:${PORTSDIR}/audio/flac
34
FLAC_RUN_DEPENDS=	flac:audio/flac
34
LAME_RUN_DEPENDS=	lame:${PORTSDIR}/audio/lame
35
LAME_RUN_DEPENDS=	lame:audio/lame
35
VORBIS_RUN_DEPENDS=	oggenc:${PORTSDIR}/audio/vorbis-tools
36
VORBIS_RUN_DEPENDS=	oggenc:audio/vorbis-tools
36
FAAC_RUN_DEPENDS=	faac:${PORTSDIR}/audio/faac
37
FAAC_RUN_DEPENDS=	faac:audio/faac
37
FAAD_RUN_DEPENDS=	faad:${PORTSDIR}/audio/faad
38
FAAD_RUN_DEPENDS=	faad:audio/faad
38
XMP_RUN_DEPENDS=	xmp:${PORTSDIR}/audio/xmp
39
XMP_RUN_DEPENDS=	xmp:audio/xmp
39
MPC_RUN_DEPENDS=	mpcdec:${PORTSDIR}/audio/musepack
40
MPC_RUN_DEPENDS=	mpcdec:audio/musepack
40
APE_RUN_DEPENDS=	mac:${PORTSDIR}/audio/mac
41
APE_RUN_DEPENDS=	mac:audio/mac
41
42
42
.include <bsd.port.options.mk>
43
.include <bsd.port.options.mk>
43
44
45
NO_WRKSUBDIR=	yes
44
NO_BUILD=	yes
46
NO_BUILD=	yes
45
USE_JAVA=	yes
47
USE_JAVA=	yes
46
USE_RC_SUBR=	subsonic
47
JAVA_VERSION=	1.6+
48
JAVA_VERSION=	1.6+
49
JAVA_RUN=	yes
50
USE_RC_SUBR=	subsonic
48
USERS=		subsonic
51
USERS=		subsonic
49
GROUPS=		subsonic
52
GROUPS=		subsonic
50
SUBSONIC_HOME=	/var/subsonic
53
SUBSONIC_HOME=	/var/subsonic
51
SUBSONIC_DIR=	${PREFIX}/${PORTDIRNAME}
52
WRKSRC=		${WRKDIR}/${PORTNAME}
53
PKGMESSAGE=	${WRKDIR}/pkg-message
54
PLIST_SUB+=	SUBSONIC_HOME="${SUBSONIC_HOME}" \
54
PLIST_SUB+=	SUBSONIC_HOME="${SUBSONIC_HOME}" \
55
		USER="${USERS}" \
55
		USER="${USERS}" \
56
		GROUP="${GROUPS}"
56
		GROUP="${GROUPS}"
57
SUB_FILES= 	pkg-message \
57
SUB_FILES=	pkg-message \
58
		message-transcoding \
58
		message-transcoding
59
		subsonic
60
SUB_LIST=	SUBSONIC_HOME="${SUBSONIC_HOME}" \
59
SUB_LIST=	SUBSONIC_HOME="${SUBSONIC_HOME}" \
61
		SUBSONIC_DIR="${SUBSONIC_DIR}" \
62
		USER="${USERS}" \
60
		USER="${USERS}" \
63
		GROUP="${GROUPS}" \
61
		GROUP="${GROUPS}" \
64
		JAVA="${JAVA}"
62
		JAVA="${JAVA}"
65
63
66
do-extract:
67
	@${MKDIR} ${WRKSRC}
68
	@${TAR} -xf ${DISTDIR}/${DISTNAME}.tar.gz -C ${WRKSRC} --no-same-owner --no-same-permission
69
70
do-install:
64
do-install:
71
	@${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE}
65
	@${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE}
72
	@${CAT} ${WRKDIR}/message-transcoding >> ${PKGMESSAGE}
66
	@${CAT} ${WRKDIR}/message-transcoding >> ${PKGMESSAGE}
73
	@${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE}
67
	@${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE}
74
	${INSTALL} -d ${STAGEDIR}${SUBSONIC_DIR}
68
	${MKDIR} ${STAGEDIR}${DATADIR}
75
	${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/LICENSE.TXT ${STAGEDIR}${SUBSONIC_DIR}/
69
	${INSTALL_MAN} ${WRKSRC}/README.TXT ${STAGEDIR}${DATADIR}/
76
	${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/README.TXT ${STAGEDIR}${SUBSONIC_DIR}/
70
	${INSTALL_DATA} ${WRKSRC}/subsonic.war ${STAGEDIR}${DATADIR}/
77
	${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/subsonic.war ${STAGEDIR}${SUBSONIC_DIR}/
71
	${INSTALL_DATA} ${WRKSRC}/subsonic-booter-jar-with-dependencies.jar ${STAGEDIR}${DATADIR}/
78
	${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/subsonic-booter-jar-with-dependencies.jar ${STAGEDIR}${SUBSONIC_DIR}/
72
79
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTDIRNAME}/subsonic.sh ${STAGEDIR}${SUBSONIC_DIR}/
73
post-install:
80
	${INSTALL} -d ${STAGEDIR}${SUBSONIC_HOME}
74
	${MKDIR} ${STAGEDIR}${SUBSONIC_HOME}/transcode
81
	${INSTALL} -d ${STAGEDIR}${SUBSONIC_HOME}/transcode
75
.if ${PORT_OPTIONS:MFFMPEG}
82
.if ${PORT_OPTIONS:MFFMEG}
76
	${LN} -sf ${PREFIX}/bin/ffmpeg ${STAGEDIR}${SUBSONIC_HOME}/transcode/ffmpeg
83
	${LN} -sf ${PREFIX}/bin/ffmeg ${STAGEDIR}${SUBSONIC_HOME}/transcode/ffmpeg
84
.endif
77
.endif
85
.if ${PORT_OPTIONS:MFLAC}
78
.if ${PORT_OPTIONS:MFLAC}
86
	${LN} -sf ${PREFIX}/bin/flac ${STAGEDIR}${SUBSONIC_HOME}/transcode/flac
79
	${LN} -sf ${PREFIX}/bin/flac ${STAGEDIR}${SUBSONIC_HOME}/transcode/flac
(-)subsonic-standalone/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (subsonic-5.2-standalone.tar.gz) = f6131bd628cff00071ba5177182eb3454ce23906472c56712f9d7e53366aee63
1
SHA256 (subsonic-6.0-standalone.tar.gz) = df14d05e3b52f07486782e3e16922688968c95b0c8cc4987941bc3b9cea7872b
2
SIZE (subsonic-5.2-standalone.tar.gz) = 43671147
2
SIZE (subsonic-6.0-standalone.tar.gz) = 48572856
(-)subsonic-standalone/files/subsonic.in (-44 / +47 lines)
Lines 2-47 Link Here
2
#
2
#
3
# $FreeBSD: head/www/subsonic-standalone/files/subsonic.in 389352 2015-06-13 12:21:51Z jlh $
3
# $FreeBSD: head/www/subsonic-standalone/files/subsonic.in 389352 2015-06-13 12:21:51Z jlh $
4
#
4
#
5
6
# PROVIDE: subsonic
5
# PROVIDE: subsonic
7
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
8
#
9
# Configuration settings for subsonic in /etc/rc.conf:
9
# Configuration settings for subsonic in /etc/rc.conf:
10
#
10
#
11
# subsonic_enable (bool):
11
# subsonic_enable (bool):
12
#   Set to "NO" by default.
12
#   Set to "NO" by default.
13
#   Set it to "YES" to enable subsonic
13
#   Set it to "YES" to enable subsonic.
14
#
14
#
15
# subsonic_home (str):
15
# subsonic_home (str):
16
#   Set to "%%SUBSONIC_HOME%%" by default.
16
#   Set to "%%SUBSONIC_HOME%%" by default.
17
#
17
#
18
# subsonic_music_folder (str):
19
#   Set to "%%SUBSONIC_HOME%%"/music by default.
20
#
21
# subsonic_playlist_folder (str):
22
#   Set to "%%SUBSONIC_HOME%%"/playlist by default.
23
#
24
# subsonic_pidfile (str):
25
#   Set to "${subsonic_home}/subsonic.pid" by default.
26
#
27
# subsonic_host (str):
18
# subsonic_host (str):
28
#   Set to "0.0.0.0" by default.
19
#   Set to "0.0.0.0" by default.
29
#   Specify which IP address to listen to.
20
#   Specify which IP address to listen to.
30
#
21
#
31
# subsonic_http_port (int):
22
# subsonic_port (int):
32
#   Set to "4040" by default.
23
#   Set to "4040" by default.
33
#   Specify which port to listen on for HTTP.
24
#   Specify which port to listen on for HTTP(S).
34
#
25
#
35
# subsonic_https_port (int):
26
# subsonic_ssl (bool):
36
#   Set to "0" by default.
27
#   Set to "NO" by default.
37
#   Specify which port to listen on for HTTPS.
28
#   Set it to "YES" to enable SSL.
29
#
30
# subsonic_ssl_keystore (str):
31
#   Optionally set path to custom SSL keystore.
32
#
33
# subsonic_ssl_password (str):
34
#   Optionally set password for custom SSL keystore.
38
#
35
#
39
# subsonic_context_path (str):
36
# subsonic_context_path (str):
40
#   Set to "/" by default.
37
#   Set to "/" by default.
41
#   Specify the last part of the Subsonic URL, typically "/" or "/subsonic".
38
#   Specify the last part of the Subsonic URL, typically "/" or "/subsonic".
42
#
39
#
43
# subsonic_max_memory (int):
40
# subsonic_max_memory (int):
44
#   Set to "100" by defaut.
41
#   Set to "100" by default.
45
#   Specify the memory limit (Java heap size) in megabytes.
42
#   Specify the memory limit (Java heap size) in megabytes.
46
#
43
#
47
44
Lines 53-83 Link Here
53
50
54
load_rc_config "${name}"
51
load_rc_config "${name}"
55
52
56
eval "${rcvar}=\${${rcvar}:-'NO'}"
53
: ${subsonic_enable:="NO"}
57
eval "${name}_user=\${${name}_user:-'subsonic'}"
54
: ${subsonic_user:="%%USER%%"}
58
eval "${name}_group=\${${name}_group:-'subsonic'}"
55
: ${subsonic_group:="%%GROUP%%"}
59
eval "_subsonic_max_memory=\${${name}_max_memory:-'100'}"
56
: ${subsonic_home:="%%SUBSONIC_HOME%%"}
60
eval "_subsonic_home=\${${name}_home:-'%%SUBSONIC_HOME%%'}"
57
: ${subsonic_host:="0.0.0.0"}
61
eval "_subsonic_music_folder=\${${name}_music_folder:-'%%SUBSONIC_HOME%%/music'}"
58
: ${subsonic_port:="4040"}
62
eval "_subsonic_playlist_folder=\${${name}folder:-'%%SUBSONIC_HOME%%/playlist'}"
59
: ${subsonic_ssl:="NO"}
63
eval "_subsonic_host=\${${name}_host:-'0.0.0.0'}"
60
: ${subsonic_context_path:="/"}
64
eval "_subsonic_http_port=\${${name}_http_port:-'4040'}"
61
: ${subsonic_max_memory:="100"}
65
eval "_subsonic_https_port=\${${name}_https_port:-'0'}"
62
66
eval "_subsonic_context_path=\${${name}_context_path:-'/'}"
63
if checkyesno subsonic_ssl; then
67
eval "_subsonic_pidfile=\${${name}_pidfile:-'%%SUBSONIC_HOME%%/subsonic.pid'}"
64
	SUBSONIC_SSL_FLAGS="-Dsubsonic.httpsPort=${subsonic_port}" && subsonic_port="0"
68
pidfile="${_subsonic_pidfile}"
65
	if [ ! -z ${subsonic_ssl_keystore} ]; then
69
66
		SUBSONIC_SSL_FLAGS=${SUBSONIC_SSL_FLAGS}" -Dsubsonic.ssl.keystore=${subsonic_ssl_keystore} -Dsubsonic.ssl.password=${subsonic_ssl_password}"
70
67
	fi
71
68
fi
72
command="%%SUBSONIC_DIR%%/subsonic.sh"
69
73
command_args="--home=${_subsonic_home} \
70
start_precmd="export LC_CTYPE='UTF-8'"
74
	--host=${_subsonic_host} \
71
subsonic_chdir="%%DATADIR%%"
75
	--port=${_subsonic_http_port} \
72
command="/usr/sbin/daemon"
76
	--https-port=${_subsonic_https_port} \
73
command_args="-f ${procname} \
77
	--context-path=${_subsonic_context_path} \
74
	-Dsubsonic.home=${subsonic_home} \
78
	--max-memory=${_subsonic_max_memory} \
75
	-Dsubsonic.host=${subsonic_host} \
79
	--pidfile=${_subsonic_pidfile} \
76
	-Dsubsonic.port=${subsonic_port} \
80
	--default-music-folder=${_subsonic_music_folder} \
77
	${SUBSONIC_SSL_FLAGS} \
81
	--default-playlist-folder=${_subsonic_playlist_folder}"
78
	-Dsubsonic.contextPath=${subsonic_context_path} \
79
	-Dsubsonic.defaultMusicFolder=${subsonic_home}/music \
80
	-Dsubsonic.defaultPodcastFolder=${subsonic_home}/Podcast \
81
	-Dsubsonic.defaultPlaylistFolder=${subsonic_home}/playlists \
82
	-Xmx${subsonic_max_memory}m \
83
	-Djava.awt.headless=true \
84
	-jar ${subsonic_chdir}/subsonic-booter-jar-with-dependencies.jar"
82
85
83
run_rc_command "$1"
86
run_rc_command "$1"
(-)subsonic-standalone/pkg-plist (-6 / +7 lines)
Lines 1-8 Link Here
1
subsonic-standalone/LICENSE.TXT
1
%%DATADIR%%/README.TXT
2
subsonic-standalone/README.TXT
2
%%DATADIR%%/subsonic-booter-jar-with-dependencies.jar
3
subsonic-standalone/subsonic.war
3
%%DATADIR%%/subsonic.war
4
subsonic-standalone/subsonic-booter-jar-with-dependencies.jar
4
%%FFMPEG%%%%SUBSONIC_HOME%%/transcode/ffmpeg
5
subsonic-standalone/subsonic.sh
5
%%FLAC%%%%SUBSONIC_HOME%%/transcode/flac
6
@unexec test -d %%SUBSONIC_HOME%% && (echo "Configuration information and database saved." && echo "If you you are permanently uninstalling this package" && echo "please remove %%SUBSONIC_HOME%% and its contents manually.")
6
%%LAME%%%%SUBSONIC_HOME%%/transcode/lame
7
@postunexec test -d %%SUBSONIC_HOME%% && (echo "Configuration information and database saved." && echo "If you you are permanently uninstalling this package" && echo "please remove %%SUBSONIC_HOME%% and its contents manually.")
7
@dir(%%USER%%,%%GROUP%%,750) %%SUBSONIC_HOME%%/transcode
8
@dir(%%USER%%,%%GROUP%%,750) %%SUBSONIC_HOME%%/transcode
8
@dir(%%USER%%,%%GROUP%%,750) %%SUBSONIC_HOME%%
9
@dir(%%USER%%,%%GROUP%%,750) %%SUBSONIC_HOME%%

Return to bug 210608