diff options
author | rodrigo <rodrigo@FreeBSD.org> | 2014-11-26 17:26:43 +0800 |
---|---|---|
committer | rodrigo <rodrigo@FreeBSD.org> | 2014-11-26 17:26:43 +0800 |
commit | d125aaead13a489f6a50c285d498477c28be35f0 (patch) | |
tree | 7b06cc7c0b774c59b8361881cf4198ff1cbfbc39 /www | |
parent | 93dae198a7c478adfc2907118f9dfbfb6d92764f (diff) | |
download | freebsd-ports-gnome-d125aaead13a489f6a50c285d498477c28be35f0.tar.gz freebsd-ports-gnome-d125aaead13a489f6a50c285d498477c28be35f0.tar.zst freebsd-ports-gnome-d125aaead13a489f6a50c285d498477c28be35f0.zip |
Add new port www/madsonic, a network media streamer
Madsonic is a fork of Subsonic, offering more features
and mobile client access without the subscription fee.
PR: ports/186860
Submitted by: Nicole Reid <root@cooltrainer.org>
Diffstat (limited to 'www')
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/madsonic/Makefile | 156 | ||||
-rw-r--r-- | www/madsonic/distinfo | 4 | ||||
-rw-r--r-- | www/madsonic/files/message-common.in | 17 | ||||
-rw-r--r-- | www/madsonic/files/message-transcoding.in | 38 | ||||
-rw-r--r-- | www/madsonic/pkg-descr | 10 | ||||
-rw-r--r-- | www/madsonic/pkg-message-jetty | 2 | ||||
-rw-r--r-- | www/madsonic/pkg-message-resin3 | 2 | ||||
-rw-r--r-- | www/madsonic/pkg-message-spacer | 3 | ||||
-rw-r--r-- | www/madsonic/pkg-message-tomcat | 3 | ||||
-rw-r--r-- | www/madsonic/pkg-plist-chunk | 10 |
11 files changed, 246 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index bc072df5ba4c..18e3934f7fe8 100644 --- a/www/Makefile +++ b/www/Makefile @@ -391,6 +391,7 @@ SUBDIR += luakit SUBDIR += lynx SUBDIR += lynx-current + SUBDIR += madsonic SUBDIR += magento SUBDIR += mahara SUBDIR += man2web diff --git a/www/madsonic/Makefile b/www/madsonic/Makefile new file mode 100644 index 000000000000..05ee6dc5b0f9 --- /dev/null +++ b/www/madsonic/Makefile @@ -0,0 +1,156 @@ +# Created by: Nicole Reid <root@cooltrainer.org> +# $FreeBSD$ + +PORTNAME= madsonic +PORTVERSION= 5.1.5200 +CATEGORIES= www java +MASTER_SITES= http://www.madsonic.org/download/5.1/ +DISTFILES= ${DISTDATE}_${PORTNAME}-${PORTVERSION}-war-tomcat.zip \ + ${DISTDATE}_${PORTNAME}-${PORTVERSION}-war-jspc.zip + +MAINTAINER= root@cooltrainer.org +COMMENT= Madsonic streaming media server + +LICENSE= GPLv3 + +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> + +NO_BUILD= yes +DISTDATE= 20141017 +USE_JAVA= yes +JAVA_VERSION= 1.7+ +USES= zip +USER= www +GROUP= www +MADSONIC_HOME= /var/madsonic +WRKSRC= ${WRKDIR}/${PORTNAME} +WEBAPPDIR= ${PREFIX}/${SERVERDIR}/webapps +PKGMESSAGE= ${WRKDIR}/pkg-message +PLIST= ${WRKDIR}/plist +PLIST_SUB+= MADSONIC_HOME="${MADSONIC_HOME}" \ + WEBAPPS=${WEBAPPDIR:S|^${PREFIX}/||} +SUB_FILES= message-common\ + message-transcoding +SUB_LIST= MADSONIC_HOME="${MADSONIC_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 + +do-extract: + ${EXTRACT_CMD} -qo ${DISTDIR}/${DISTDATE}_${PORTNAME}-${PORTVERSION}-war-${DISTVER}.zip -d ${WRKDIR} + +post-extract: + @${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} + +post-stage: + ${MKDIR} ${STAGEDIR}${MADSONIC_HOME} + ${MKDIR} ${STAGEDIR}${MADSONIC_HOME}/transcode + +.include <bsd.port.mk> diff --git a/www/madsonic/distinfo b/www/madsonic/distinfo new file mode 100644 index 000000000000..b24dfe734e66 --- /dev/null +++ b/www/madsonic/distinfo @@ -0,0 +1,4 @@ +SHA256 (20141017_madsonic-5.1.5200-war-tomcat.zip) = 25d6d1f1e9d9a19a597a8dfeaeeeea6e56c9c630d3d4f7bf6fa7bcf0745f4fb3 +SIZE (20141017_madsonic-5.1.5200-war-tomcat.zip) = 47586400 +SHA256 (20141017_madsonic-5.1.5200-war-jspc.zip) = d99a465169f4f98c3fa7b86813122b79f98ba4e91fb056c49f83f755f5056782 +SIZE (20141017_madsonic-5.1.5200-war-jspc.zip) = 47588753 diff --git a/www/madsonic/files/message-common.in b/www/madsonic/files/message-common.in new file mode 100644 index 000000000000..10ae657f055e --- /dev/null +++ b/www/madsonic/files/message-common.in @@ -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. diff --git a/www/madsonic/files/message-transcoding.in b/www/madsonic/files/message-transcoding.in new file mode 100644 index 000000000000..87e3d6fc81fb --- /dev/null +++ b/www/madsonic/files/message-transcoding.in @@ -0,0 +1,38 @@ +Transcoding in Madsonic 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 +%%MADSONIC_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 -] diff --git a/www/madsonic/pkg-descr b/www/madsonic/pkg-descr new file mode 100644 index 000000000000..e328a485a4b5 --- /dev/null +++ b/www/madsonic/pkg-descr @@ -0,0 +1,10 @@ +Madsonic instantly transports your media to any HTTP connected device +regardless of bitrate. You can stream to multiple players simultaneously. +Madsonic is designed to handle very large music collections. By using +transcoder plug-ins, Madsonic supports on-the-fly conversion and streaming +of virtually any audio format, including MP3, OGG, WMA, FLAC, APE and more. + +Madsonic is a fork of Subsonic, offering more features and mobile client +access without the subscription fee. + +WWW: http://www.madsonic.org diff --git a/www/madsonic/pkg-message-jetty b/www/madsonic/pkg-message-jetty new file mode 100644 index 000000000000..194a2841905e --- /dev/null +++ b/www/madsonic/pkg-message-jetty @@ -0,0 +1,2 @@ +Enable or restart Jetty, then access Madsonic at http://127.0.0.1:8080/madsonic/ +(if using the default Jetty HTTP port). diff --git a/www/madsonic/pkg-message-resin3 b/www/madsonic/pkg-message-resin3 new file mode 100644 index 000000000000..bc4ee38640a0 --- /dev/null +++ b/www/madsonic/pkg-message-resin3 @@ -0,0 +1,2 @@ +Enable or restart resin3, then you can access Madsonic at +http://127.0.0.1:8080/madsonic/ if using the default Resin HTTP port. diff --git a/www/madsonic/pkg-message-spacer b/www/madsonic/pkg-message-spacer new file mode 100644 index 000000000000..c2c7e42958f6 --- /dev/null +++ b/www/madsonic/pkg-message-spacer @@ -0,0 +1,3 @@ + +======================================================================== + diff --git a/www/madsonic/pkg-message-tomcat b/www/madsonic/pkg-message-tomcat new file mode 100644 index 000000000000..1005c54a186d --- /dev/null +++ b/www/madsonic/pkg-message-tomcat @@ -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 Madsonic. diff --git a/www/madsonic/pkg-plist-chunk b/www/madsonic/pkg-plist-chunk new file mode 100644 index 000000000000..a00371dfc574 --- /dev/null +++ b/www/madsonic/pkg-plist-chunk @@ -0,0 +1,10 @@ +@unexec if [ -d %%WEBAPPS%%/madsonic ]; then rm -rf %%WEBAPPS%%/madsonic; fi +@unexec test -d %%MADSONIC_HOME%% && (echo "Configuration information and database saved." && echo "If you you are permanently uninstalling this package" && echo "please remove %%MADSONIC_HOME%% and its contents manually.") +%%FFMPEG%%@exec ln -sf %%PREFIX%%/bin/ffmpeg %%MADSONIC_HOME%%/transcode/ffmpeg +%%FLAC%%@exec ln -sf %%PREFIX%%/bin/ffmpeg %%MADSONIC_HOME%%/transcode/flac +%%LAME%%@exec ln -sf %%PREFIX%%/bin/lame %%MADSONIC_HOME%%/transcode/lame +%%FFMPEG%%@unexec rm -f %%MADSONIC_HOME%%/transcode/ffmpeg +%%FLAC%%@unexec rm -f %%MADSONIC_HOME%%/transcode/flac +%%LAME%%@unexec rm -f %%MADSONIC_HOME%%/transcode/lame +@dir %%MADSONIC_HOME%%/transcode +@dir %%MADSONIC_HOME%% |