mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
Create a port for Subsonic standalone version (does not require Tomcat to run).
Reviewed by: bapt, antoine (earlier version) Approved by: bapt
This commit is contained in:
parent
1929959dda
commit
cdfa5212c5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=381942
1
GIDs
1
GIDs
@ -227,6 +227,7 @@ netdisco:*:840:
|
||||
tcpcryptd:*:841:
|
||||
munin:*:842:
|
||||
dahdi:*:843:asterisk
|
||||
subsonic:*:844:
|
||||
fossy:*:901:www
|
||||
scanlogd:*:902:
|
||||
riemann:*:908:
|
||||
|
1
UIDs
1
UIDs
@ -232,6 +232,7 @@ statsd:*:826:826::0:0:Statsd Daemon:/nonexistent:/sbin/nologin
|
||||
netdisco:*:840:840::0:0:netdisco daemon:/nonexistent:/usr/sbin/nologin
|
||||
tcpcryptd:*:841:841::0:0:tcpcrypt daemon:/nonexistent:/usr/sbin/nologin
|
||||
munin:*:842:842::0:0:Munin:/var/munin:/usr/sbin/nologin
|
||||
subsonic:*:844:844::0:0:Subsonic standalone-server:/nonexistent:/usr/sbin/nologin
|
||||
fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash
|
||||
scanlogd:*:902:902::0:0:scanlogd user:/nonexistent:/usr/sbin/nologin
|
||||
riemann:*:908:908::0:0:Riemann User:/var/empty:/usr/sbin/nologin
|
||||
|
@ -1988,6 +1988,7 @@
|
||||
SUBDIR += squidview
|
||||
SUBDIR += srg
|
||||
SUBDIR += subsonic
|
||||
SUBDIR += subsonic-standalone
|
||||
SUBDIR += suphp
|
||||
SUBDIR += surf
|
||||
SUBDIR += surfraw
|
||||
|
93
www/subsonic-standalone/Makefile
Normal file
93
www/subsonic-standalone/Makefile
Normal file
@ -0,0 +1,93 @@
|
||||
# Created by: Jeremie Le Hen <jlh@FreeBSD.org>
|
||||
# Based on www/subsonic from Nicole Reid <root@cooltrainer.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= subsonic-standalone
|
||||
PORTVERSION= 5.2
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= SF/subsonic/subsonic/${PORTVERSION}
|
||||
DISTNAME= subsonic-${PORTVERSION}-standalone
|
||||
|
||||
MAINTAINER= jlh@FreeBSD.org
|
||||
COMMENT= Subsonic streaming media server, standalone version
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
OPTIONS_GROUP= TRANSCODING
|
||||
TRANSCODING_DESC= Transcoding support
|
||||
OPTIONS_GROUP_TRANSCODING= FFMPEG FLAC LAME VORBIS FAAC FAAD XMP MPC APE
|
||||
FFMPEG_DESC= Depend on FFmpeg for audio and video transcoding
|
||||
FLAC_DESC= Depend on FLAC for transcoding
|
||||
LAME_DESC= Depend on LAME for MP3 transcoding
|
||||
VORBIS_DESC= Depend on oggenc/oggdec for Vorbis transcoding
|
||||
FAAC_DESC= Depend on FAAD for AAC/M4A transcoding
|
||||
FAAD_DESC= Depend on FAAC for AAC/M4A transcoding
|
||||
XMP_DESC= Depend on XMP for module file transcoding
|
||||
MPC_DESC= Depend on mpcdec for MPC transcoding
|
||||
APE_DESC= Depend on mac for Monkey's Audio transcoding #'
|
||||
|
||||
OPTIONS_DEFAULT= FFMPEG
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
FFMPEG_RUN_DEPENDS= ffmpeg:${PORTSDIR}/multimedia/ffmpeg
|
||||
FLAC_RUN_DEPENDS= flac:${PORTSDIR}/audio/flac
|
||||
LAME_RUN_DEPENDS= lame:${PORTSDIR}/audio/lame
|
||||
VORBIS_RUN_DEPENDS= oggenc:${PORTSDIR}/audio/vorbis-tools
|
||||
FAAC_RUN_DEPENDS= faac:${PORTSDIR}/audio/faac
|
||||
FAAD_RUN_DEPENDS= faad:${PORTSDIR}/audio/faad
|
||||
XMP_RUN_DEPENDS= xmp:${PORTSDIR}/audio/xmp
|
||||
MPC_RUN_DEPENDS= mpcdec:${PORTSDIR}/audio/musepack
|
||||
APE_RUN_DEPENDS= mac:${PORTSDIR}/audio/mac
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
NO_BUILD= yes
|
||||
USE_JAVA= yes
|
||||
USE_RC_SUBR= subsonic
|
||||
JAVA_VERSION= 1.6+
|
||||
USERS= subsonic
|
||||
GROUPS= subsonic
|
||||
SUBSONIC_HOME= /var/subsonic
|
||||
SUBSONIC_DIR= ${PREFIX}/${PORTDIRNAME}
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
PLIST_SUB+= SUBSONIC_HOME="${SUBSONIC_HOME}" \
|
||||
USER="${USERS}" \
|
||||
GROUP="${GROUPS}"
|
||||
SUB_FILES= pkg-message \
|
||||
message-common \
|
||||
message-transcoding \
|
||||
subsonic
|
||||
SUB_LIST= SUBSONIC_HOME="${SUBSONIC_HOME}" \
|
||||
SUBSONIC_DIR="${SUBSONIC_DIR}" \
|
||||
USER="${USERS}" \
|
||||
GROUP="${GROUPS}" \
|
||||
JAVA="${JAVA}"
|
||||
|
||||
do-extract:
|
||||
@${MKDIR} ${WRKSRC}
|
||||
@${TAR} -xf ${DISTDIR}/${DISTNAME}.tar.gz -C ${WRKSRC} --no-same-owner --no-same-permission
|
||||
|
||||
do-install:
|
||||
@${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE}
|
||||
@${CAT} ${WRKDIR}/message-transcoding >> ${PKGMESSAGE}
|
||||
@${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE}
|
||||
${INSTALL} -d ${STAGEDIR}${SUBSONIC_DIR}
|
||||
${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/LICENSE.TXT ${STAGEDIR}${SUBSONIC_DIR}/
|
||||
${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/README.TXT ${STAGEDIR}${SUBSONIC_DIR}/
|
||||
${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/subsonic.war ${STAGEDIR}${SUBSONIC_DIR}/
|
||||
${INSTALL_DATA} ${WRKDIR}/${PORTDIRNAME}/subsonic-booter-jar-with-dependencies.jar ${STAGEDIR}${SUBSONIC_DIR}/
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/${PORTDIRNAME}/subsonic.sh ${STAGEDIR}${SUBSONIC_DIR}/
|
||||
${INSTALL} -d ${STAGEDIR}${SUBSONIC_HOME}
|
||||
${INSTALL} -d ${STAGEDIR}${SUBSONIC_HOME}/transcode
|
||||
.if ${PORT_OPTIONS:MFFMEG}
|
||||
${LN} -sf ${PREFIX}/bin/ffmeg ${STAGEDIR}${SUBSONIC_HOME}/transcode/ffmpeg
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MFLAC}
|
||||
${LN} -sf ${PREFIX}/bin/flac ${STAGEDIR}${SUBSONIC_HOME}/transcode/flac
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MLAME}
|
||||
${LN} -sf ${PREFIX}/bin/lame ${STAGEDIR}${SUBSONIC_HOME}/transcode/lame
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
www/subsonic-standalone/distinfo
Normal file
2
www/subsonic-standalone/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (subsonic-5.2-standalone.tar.gz) = f6131bd628cff00071ba5177182eb3454ce23906472c56712f9d7e53366aee63
|
||||
SIZE (subsonic-5.2-standaline.tar.gz) = 43671147
|
38
www/subsonic-standalone/files/message-transcoding.in
Normal file
38
www/subsonic-standalone/files/message-transcoding.in
Normal file
@ -0,0 +1,38 @@
|
||||
Transcoding in Subsonic is a way to re-encode music on the fly to a format
|
||||
your listening device supports. A common use is transcoding FLAC, WMA,
|
||||
and Vorbis audio to MP3 for devices supporting only that codec.
|
||||
|
||||
Configuring transcoding uses up to three commands one would use on a normal
|
||||
command line pipe but with a whitelist of executables installed or linked into
|
||||
%%SUBSONIC_HOME%%/transcode. The transcoding configuration page takes
|
||||
transcoding rules in the form of:
|
||||
|
||||
[rule name] [convert from] [convert to] [command 1] [command 2] [command 3]
|
||||
|
||||
The most compatible single audio transcoding command is with FFmpeg, transcoding
|
||||
any input to MP3, mapping all streams to output, and limiting metadata to the
|
||||
more-compatible ID3v2.3:
|
||||
|
||||
[All to MP3] [ogg flac wma aiff m4a] [mp3] ...
|
||||
[ffmpeg -i %s -ab %bk -id3v2_version 3 -map_metadata 0 -map 0:0 -ar 44100 -ac 2 -v 0 -f mp3 -]
|
||||
|
||||
You can also transcode with multiple single-codec commands to avoid
|
||||
the heavy FFmpeg dependency:
|
||||
|
||||
[FLAC to MP3] [flac] [mp3] ...
|
||||
[flac --silent --decode --stdout %s] [lame --silent -h -b %b -]
|
||||
|
||||
[AAC to MP3] [m4a] [mp3] ...
|
||||
[faad -s -o - %s] [lame --silent -h -b %b -]
|
||||
|
||||
[Vorbis to MP3] [ogg] [mp3] ...
|
||||
[oggdec -Q -o /dev/stdout %s] [lame --silent -h -b %b -]
|
||||
|
||||
[MPC to MP3] [mpc] [mp3] ...
|
||||
[mpcdec %s -] [lame --silent -h -b %b -]
|
||||
|
||||
[APE to MP3] [ape] [mp3] ...
|
||||
[mac %s - -d] [lame --silent -h -b %b -]
|
||||
|
||||
[Trackers to MP3] [mod s3m xm it] [mp3] ...
|
||||
[xmp -q -c %s] [lame --silent -h -b %b -]
|
7
www/subsonic-standalone/files/pkg-message.in
Normal file
7
www/subsonic-standalone/files/pkg-message.in
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
========================================================================
|
||||
|
||||
Enable Subsonic by putting the following line in /etc/rc.conf
|
||||
subsonic_enable="YES"
|
||||
|
||||
See %%LOCALBASE%%/etc/rc.d/subsonic for all the options.
|
94
www/subsonic-standalone/files/subsonic.in
Normal file
94
www/subsonic-standalone/files/subsonic.in
Normal file
@ -0,0 +1,94 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: subsonic
|
||||
|
||||
#
|
||||
# Configuration settings for subsonic in /etc/rc.conf:
|
||||
#
|
||||
# subsonic_enable (bool):
|
||||
# Set to "NO" by default.
|
||||
# Set it to "YES" to enable subsonic
|
||||
#
|
||||
# subsonic_home (str):
|
||||
# Set to "%%SUBSONIC_HOME%%" by default.
|
||||
#
|
||||
# subsonic_music_folder (str):
|
||||
# Set to "%%SUBSONIC_HOME%%"/music by default.
|
||||
#
|
||||
# subsonic_playlist_folder (str):
|
||||
# Set to "%%SUBSONIC_HOME%%"/playlist by default.
|
||||
#
|
||||
# subsonic_pidfile (str):
|
||||
# Set to "${subsonic_home}/subsonic.pid" by default.
|
||||
#
|
||||
# subsonic_host (str):
|
||||
# Set to "0.0.0.0" by default.
|
||||
# Specify which IP address to listen to.
|
||||
#
|
||||
# subsonic_http_port (int):
|
||||
# Set to "4040" by default.
|
||||
# Specify which port to listen on for HTTP.
|
||||
#
|
||||
# subsonic_https_port (int):
|
||||
# Set to "0" by default.
|
||||
# Specify which port to listen on for HTTPS.
|
||||
#
|
||||
# subsonic_context_path (str):
|
||||
# Set to "/" by default.
|
||||
# Specify the last part of the Subsonic URL, typically "/" or "/subsonic".
|
||||
#
|
||||
# subsonic_max_memory (int):
|
||||
# Set to "100" by defaut.
|
||||
# Specify the memory limit (Java heap size) in megabytes.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
case $0 in
|
||||
/etc/rc*)
|
||||
# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
|
||||
# so get the name of the script from $_file
|
||||
name=$_file
|
||||
;;
|
||||
*)
|
||||
name=$0
|
||||
;;
|
||||
esac
|
||||
|
||||
name=${0##*/}
|
||||
rcvar=${name}_enable
|
||||
procname="%%JAVA%%"
|
||||
|
||||
load_rc_config "${name}"
|
||||
|
||||
eval "${rcvar}=\${${rcvar}:-'NO'}"
|
||||
eval "${name}_user=\${${name}_user:-'subsonic'}"
|
||||
eval "${name}_group=\${${name}_group:-'subsonic'}"
|
||||
eval "_subsonic_max_memory=\${${name}_max_memory:-'100'}"
|
||||
eval "_subsonic_home=\${${name}_home:-'%%SUBSONIC_HOME%%'}"
|
||||
eval "_subsonic_music_folder=\${${name}_music_folder:-'%%SUBSONIC_HOME%%/music'}"
|
||||
eval "_subsonic_playlist_folder=\${${name}folder:-'%%SUBSONIC_HOME%%/playlist'}"
|
||||
eval "_subsonic_host=\${${name}_host:-'0.0.0.0'}"
|
||||
eval "_subsonic_http_port=\${${name}_http_port:-'4040'}"
|
||||
eval "_subsonic_https_port=\${${name}_https_port:-'0'}"
|
||||
eval "_subsonic_context_path=\${${name}_context_path:-'/'}"
|
||||
eval "_subsonic_pidfile=\${${name}_pidfile:-'%%SUBSONIC_HOME%%/subsonic.pid'}"
|
||||
pidfile="${_subsonic_pidfile}"
|
||||
|
||||
|
||||
|
||||
command="%%SUBSONIC_DIR%%/subsonic.sh"
|
||||
command_args="--home=${_subsonic_home} \
|
||||
--host=${_subsonic_host} \
|
||||
--port=${_subsonic_http_port} \
|
||||
--https-port=${_subsonic_https_port} \
|
||||
--context-path=${_subsonic_context_path} \
|
||||
--max-memory=${_subsonic_max_memory} \
|
||||
--pidfile=${_subsonic_pidfile} \
|
||||
--default-music-folder=${_subsonic_music_folder} \
|
||||
--default-playlist-folder=${_subsonic_playlist_folder}"
|
||||
|
||||
run_rc_command "$1"
|
7
www/subsonic-standalone/pkg-descr
Normal file
7
www/subsonic-standalone/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
Subsonic instantly transports your media to any HTTP connected device
|
||||
regardless of bitrate. You can stream to multiple players simultaneously.
|
||||
Subsonic is designed to handle very large music collections. By using
|
||||
transcoder plug-ins, Subsonic supports on-the-fly conversion and streaming
|
||||
of virtually any audio format, including MP3, OGG, WMA, FLAC, APE and more.
|
||||
|
||||
WWW: http://www.subsonic.org
|
3
www/subsonic-standalone/pkg-message-spacer
Normal file
3
www/subsonic-standalone/pkg-message-spacer
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
========================================================================
|
||||
|
8
www/subsonic-standalone/pkg-plist
Normal file
8
www/subsonic-standalone/pkg-plist
Normal file
@ -0,0 +1,8 @@
|
||||
subsonic-standalone/LICENSE.TXT
|
||||
subsonic-standalone/README.TXT
|
||||
subsonic-standalone/subsonic.war
|
||||
subsonic-standalone/subsonic-booter-jar-with-dependencies.jar
|
||||
subsonic-standalone/subsonic.sh
|
||||
@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.")
|
||||
@dir(%%USER%%,%%GROUP%%,750) %%SUBSONIC_HOME%%/transcode
|
||||
@dir(%%USER%%,%%GROUP%%,750) %%SUBSONIC_HOME%%
|
Loading…
Reference in New Issue
Block a user