Date: Sun, 26 Oct 2014 07:17:18 +0000 (UTC) From: Thomas Zander <riggs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r371497 - in head/www/subsonic: . files Message-ID: <201410260717.s9Q7HI7m027960@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: riggs Date: Sun Oct 26 07:17:17 2014 New Revision: 371497 URL: https://svnweb.freebsd.org/changeset/ports/371497 QAT: https://qat.redports.org/buildarchive/r371497/ Log: - Update to upstream version 5.0 - Add LICENSE - Introduce OPTIONS for - Selecting application server - Selecting transcoders PR: 194326 Submitted by: freebsd@cooltrainer.org (maintainer) Added: head/www/subsonic/files/message-common.in (contents, props changed) head/www/subsonic/files/message-transcoding.in (contents, props changed) head/www/subsonic/pkg-message-jetty (contents, props changed) head/www/subsonic/pkg-message-resin3 (contents, props changed) head/www/subsonic/pkg-message-spacer (contents, props changed) head/www/subsonic/pkg-message-tomcat (contents, props changed) head/www/subsonic/pkg-plist-chunk (contents, props changed) Deleted: head/www/subsonic/files/pkg-message.in head/www/subsonic/pkg-plist Modified: head/www/subsonic/Makefile head/www/subsonic/distinfo head/www/subsonic/pkg-descr Modified: head/www/subsonic/Makefile ============================================================================== --- head/www/subsonic/Makefile Sun Oct 26 06:31:35 2014 (r371496) +++ head/www/subsonic/Makefile Sun Oct 26 07:17:17 2014 (r371497) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= subsonic -PORTVERSION= 4.9 +PORTVERSION= 5.0 CATEGORIES= www java MASTER_SITES= SF DISTNAME= ${PORTNAME}-${PORTVERSION}-war @@ -10,44 +10,142 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-war MAINTAINER= root@cooltrainer.org COMMENT= Subsonic streaming media server -BUILD_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0:${PORTSDIR}/www/tomcat6 -RUN_DEPENDS+= ${JAVAJARDIR}/servlet-api.jar:${PORTSDIR}/www/servlet-api +LICENSE= GPLv3 -OPTIONS_DEFINE= TRANSCODING -TRANSCODING_DESC= Transcoding with FFmpeg and LAME -OPTIONS_DEFAULT= TRANSCODING -OPTIONS_SUB= yes - -TRANSCODING_RUN_DEPENDS= ffmpeg:${PORTSDIR}/multimedia/ffmpeg \ - lame:${PORTSDIR}/audio/lame - -USES= zip +OPTIONS_SINGLE= APPSERVER +APPSERVER_DESC= Java Application Server +OPTIONS_SINGLE_APPSERVER= JETTY TOMCAT8 TOMCAT7 TOMCAT6 RESIN3 +TOMCAT8_DESC= Use Tomcat 8.x +TOMCAT7_DESC= Use Tomcat 7.x +TOMCAT6_DESC= Use Tomcat 6.x +JETTY_DESC= Use Jetty +RESIN3_DESC= Use Resin 3 + +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 JETTY +OPTIONS_SUB= yes + +RUN_DEPENDS+= ${JAVAJARDIR}/servlet-api.jar:${PORTSDIR}/www/servlet-api \ + ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins +TOMCAT8_BUILD_DEPENDS= ${LOCALBASE}/${SERVERDIR}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat8 +TOMCAT8_RUN_DEPENDS= ${LOCALBASE}/${SERVERDIR}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat8 +TOMCAT7_BUILD_DEPENDS= ${LOCALBASE}/${SERVERDIR}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7 +TOMCAT7_RUN_DEPENDS= ${LOCALBASE}/${SERVERDIR}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7 +TOMCAT6_BUILD_DEPENDS= ${LOCALBASE}/${SERVERDIR}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6 +TOMCAT6_RUN_DEPENDS= ${LOCALBASE}/${SERVERDIR}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6 +JETTY_BUILD_DEPENDS= ${LOCALBASE}/${SERVERDIR}/start.jar:${PORTSDIR}/www/jetty +JETTY_RUN_DEPENDS= ${LOCALBASE}/${SERVERDIR}/start.jar:${PORTSDIR}/www/jetty +RESIN3_BUILD_DEPENDS= ${LOCALBASE}/${SERVERDIR}/lib/resin.jar:${PORTSDIR}/www/resin3 +RESIN3_RUN_DEPENDS= ${LOCALBASE}/${SERVERDIR}/lib/resin.jar:${PORTSDIR}/www/resin3 +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> -#Subsonic does not currently run on Tomcat 7 -SUB_FILES= pkg-message -WEBAPPDIR= ${PREFIX}/apache-tomcat-6.0/webapps -BUILD_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6 -RUN_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6 -SUB_LIST= TOMCATOPTS="tomcat60_java_opts" - NO_BUILD= yes USE_JAVA= yes JAVA_VERSION= 1.6+ -USER= www -GROUP= www +USES= zip +USER= www +GROUP= www SUBSONIC_HOME= /var/subsonic +WRKSRC= ${WRKDIR}/${PORTNAME} +WEBAPPDIR= ${PREFIX}/${SERVERDIR}/webapps +PKGMESSAGE= ${WRKDIR}/pkg-message +PLIST= ${WRKDIR}/plist PLIST_SUB+= SUBSONIC_HOME="${SUBSONIC_HOME}" \ - WEBAPPS=${WEBAPPDIR:S|^${PREFIX}/||} \ - USER=${USER} GROUP=${GROUP} \ - WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} + WEBAPPS=${WEBAPPDIR:S|^${PREFIX}/||} +SUB_FILES= message-common\ + message-transcoding +SUB_LIST= SUBSONIC_HOME="${SUBSONIC_HOME}" + +.if ${PORT_OPTIONS:MTOMCAT8} +APPPKGMESSAGE= pkg-message-tomcat +DISTVER= tomcat +PKGNAMESUFFIX= -tomcat8 +SERVERDIR= apache-tomcat-8.0 +SUB_LIST+= CONTAINERFLAGS="tomcat8_java_opts" +.endif + +.if ${PORT_OPTIONS:MTOMCAT7} +APPPKGMESSAGE= pkg-message-tomcat +DISTVER= tomcat +PKGNAMESUFFIX= -tomcat7 +SERVERDIR= apache-tomcat-7.0 +SUB_LIST+= CONTAINERFLAGS="tomcat7_java_opts" +.endif + +.if ${PORT_OPTIONS:MTOMCAT6} +APPPKGMESSAGE= pkg-message-tomcat +DISTVER= tomcat +PKGNAMESUFFIX= -tomcat6 +SERVERDIR= apache-tomcat-6.0 +SUB_LIST+= CONTAINERFLAGS="tomcat60_java_opts" +.endif + +.if ${PORT_OPTIONS:MJETTY} +APPPKGMESSAGE= pkg-message-jetty +DISTVER= jspc +PKGNAMESUFFIX= -jetty +SERVERDIR= jetty +SUB_LIST+= CONTAINERFLAGS="jetty_flags" +.endif + +.if ${PORT_OPTIONS:MRESIN3} +APPPKGMESSAGE= pkg-message-resin3 +DISTVER= tomcat +PKGNAMESUFFIX= -resin3 +SERVERDIR= resin3 +SUB_LIST+= CONTAINERFLAGS="resin3_flags" +.endif post-extract: - @${MKDIR} ${WRKDIR}/${PORTDIRNAME} - @${TAR} xf ${WRKDIR}/${PORTNAME}.war -C ${WRKDIR}/${PORTDIRNAME} + @${MKDIR} ${WRKSRC} + @${TAR} -xf ${WRKDIR}/${PORTNAME}.war -C ${WRKSRC} + +pre-install: + @${RM} ${PLIST} + @${ECHO} "@owner ${USER}" >> ${PLIST} + @${ECHO} "@group ${GROUP}" >> ${PLIST} + @cd ${WRKSRC}; ${FIND} . -type f | cut -c2- \ + | ${SED} 's|^|${WEBAPPDIR:S,${PREFIX}/,,}/${PORTDIRNAME}|' \ + | ${SORT} >> ${PLIST} + @${CAT} ${PKGDIR}/pkg-plist-chunk >> ${PLIST} + @cd ${WRKSRC}; ${FIND} . -type d | cut -c2- \ + | ${SED} 's|^|@dir ${WEBAPPDIR:S,${PREFIX}/,,}/${PORTDIRNAME}|' \ + | ${SORT} -r >> ${PLIST} + @${RM} ${PKGMESSAGE} + @${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE} + @${CAT} ${PKGDIR}/${APPPKGMESSAGE} >> ${PKGMESSAGE} + @${CAT} ${WRKDIR}/message-common >> ${PKGMESSAGE} + @${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE} + @${CAT} ${WRKDIR}/message-transcoding >> ${PKGMESSAGE} + @${CAT} ${PKGDIR}/pkg-message-spacer >> ${PKGMESSAGE} do-install: - @cd ${WRKDIR} && ${COPYTREE_SHARE} ${PORTDIRNAME} ${STAGEDIR}${WEBAPPDIR} + cd ${WRKDIR} && ${COPYTREE_SHARE} ${PORTDIRNAME} ${STAGEDIR}${WEBAPPDIR} + +post-stage: + ${MKDIR} ${STAGEDIR}${SUBSONIC_HOME} + ${MKDIR} ${STAGEDIR}${SUBSONIC_HOME}/transcode .include <bsd.port.mk> Modified: head/www/subsonic/distinfo ============================================================================== --- head/www/subsonic/distinfo Sun Oct 26 06:31:35 2014 (r371496) +++ head/www/subsonic/distinfo Sun Oct 26 07:17:17 2014 (r371497) @@ -1,2 +1,2 @@ -SHA256 (subsonic-4.9-war.zip) = 64ffc808c2027652910b7a9d579fbf86a5915efda096cfaf13a0d36fcb495f98 -SIZE (subsonic-4.9-war.zip) = 21340775 +SHA256 (subsonic-5.0-war.zip) = 80374293daa2b5deeacae6fbaa725c70473585d95e100fbfb6bd805644509a3d +SIZE (subsonic-5.0-war.zip) = 26822614 Added: head/www/subsonic/files/message-common.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/files/message-common.in Sun Oct 26 07:17:17 2014 (r371497) @@ -0,0 +1,17 @@ + +On headless machines, start the container server with +%%CONTAINERFLAGS%%="-Djava.awt.headless=true" +to prevent problems showing album art thumbnails. + +You can increase the container server's memory allocation if needed like +%%CONTAINERFLAGS%%="-Xms96m -Xmx512m" + +Use a UTF-8 locale to enable support for all possible tags. Otherwise, +files with Unicode tags will not scan properly and will be unplayable. +Chapter 23 of the FreeBSD Handbook has information on using locales. +https://www.freebsd.org/doc/handbook/l10n.html + +For example, US English: +%%CONTAINERFLAGS%%="-Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US" + +Combine multiple flags into a single %%CONTAINERFLAGS%%="[...]" line. Added: head/www/subsonic/files/message-transcoding.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/files/message-transcoding.in Sun Oct 26 07:17:17 2014 (r371497) @@ -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 -] Modified: head/www/subsonic/pkg-descr ============================================================================== --- head/www/subsonic/pkg-descr Sun Oct 26 06:31:35 2014 (r371496) +++ head/www/subsonic/pkg-descr Sun Oct 26 07:17:17 2014 (r371497) @@ -1,8 +1,7 @@ -Subsonic is a free, web-based media streamer, providing ubiquitous -access to your music. Use it to share your music with friends, -or to listen to your own music while at work. -You can stream to multiple players simultaneously, -for instance to one player in your kitchen and another in your living -room. +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 Added: head/www/subsonic/pkg-message-jetty ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/pkg-message-jetty Sun Oct 26 07:17:17 2014 (r371497) @@ -0,0 +1,2 @@ +Enable or restart Jetty, then access Subsonic at http://127.0.0.1:8080/subsonic/ +(if using the default Jetty HTTP port). Added: head/www/subsonic/pkg-message-resin3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/pkg-message-resin3 Sun Oct 26 07:17:17 2014 (r371497) @@ -0,0 +1,2 @@ +Enable or restart resin3, then you can access Subsonic at +http://127.0.0.1:8080/subsonic/ if using the default Resin HTTP port. Added: head/www/subsonic/pkg-message-spacer ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/pkg-message-spacer Sun Oct 26 07:17:17 2014 (r371497) @@ -0,0 +1,3 @@ + +======================================================================== + Added: head/www/subsonic/pkg-message-tomcat ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/pkg-message-tomcat Sun Oct 26 07:17:17 2014 (r371497) @@ -0,0 +1,3 @@ +Create a manager-gui capable user in Tomcat's conf/tomcat-users.xml, +then access the Manager at http://127.0.0.1:8080/manager/html +(if using the default Tomcat HTTP port) and deploy Subsonic. Added: head/www/subsonic/pkg-plist-chunk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/subsonic/pkg-plist-chunk Sun Oct 26 07:17:17 2014 (r371497) @@ -0,0 +1,10 @@ +@unexec if [ -d %%WEBAPPS%%/subsonic ]; then rm -rf %%WEBAPPS%%/subsonic; fi +@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.") +%%FFMPEG%%@exec ln -sf %%PREFIX%%/bin/ffmpeg %%SUBSONIC_HOME%%/transcode/ffmpeg +%%FLAC%%@exec ln -sf %%PREFIX%%/bin/ffmpeg %%SUBSONIC_HOME%%/transcode/flac +%%LAME%%@exec ln -sf %%PREFIX%%/bin/lame %%SUBSONIC_HOME%%/transcode/lame +%%FFMPEG%%@unexec rm -f %%SUBSONIC_HOME%%/transcode/ffmpeg +%%FLAC%%@unexec rm -f %%SUBSONIC_HOME%%/transcode/flac +%%LAME%%@unexec rm -f %%SUBSONIC_HOME%%/transcode/lame +@dir %%SUBSONIC_HOME%%/transcode +@dir %%SUBSONIC_HOME%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410260717.s9Q7HI7m027960>