svn commit: r373441 - in head/www: . madsonic madsonic/files

Rodrigo Osorio rodrigo at FreeBSD.org
Wed Nov 26 09:26:47 UTC 2014


Author: rodrigo
Date: Wed Nov 26 09:26:43 2014
New Revision: 373441
URL: https://svnweb.freebsd.org/changeset/ports/373441
QAT: https://qat.redports.org/buildarchive/r373441/

Log:
  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 at cooltrainer.org>

Added:
  head/www/madsonic/
  head/www/madsonic/Makefile   (contents, props changed)
  head/www/madsonic/distinfo   (contents, props changed)
  head/www/madsonic/files/
  head/www/madsonic/files/message-common.in   (contents, props changed)
  head/www/madsonic/files/message-transcoding.in   (contents, props changed)
  head/www/madsonic/pkg-descr   (contents, props changed)
  head/www/madsonic/pkg-message-jetty   (contents, props changed)
  head/www/madsonic/pkg-message-resin3   (contents, props changed)
  head/www/madsonic/pkg-message-spacer   (contents, props changed)
  head/www/madsonic/pkg-message-tomcat   (contents, props changed)
  head/www/madsonic/pkg-plist-chunk   (contents, props changed)
Modified:
  head/www/Makefile

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Wed Nov 26 07:52:12 2014	(r373440)
+++ head/www/Makefile	Wed Nov 26 09:26:43 2014	(r373441)
@@ -391,6 +391,7 @@
     SUBDIR += luakit
     SUBDIR += lynx
     SUBDIR += lynx-current
+    SUBDIR += madsonic
     SUBDIR += magento
     SUBDIR += mahara
     SUBDIR += man2web

Added: head/www/madsonic/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/Makefile	Wed Nov 26 09:26:43 2014	(r373441)
@@ -0,0 +1,156 @@
+# Created by: Nicole Reid <root at 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 at 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>

Added: head/www/madsonic/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/distinfo	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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

Added: head/www/madsonic/files/message-common.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/files/message-common.in	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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/madsonic/files/message-transcoding.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/files/message-transcoding.in	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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 -]

Added: head/www/madsonic/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/pkg-descr	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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

Added: head/www/madsonic/pkg-message-jetty
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/pkg-message-jetty	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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).

Added: head/www/madsonic/pkg-message-resin3
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/pkg-message-resin3	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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.

Added: head/www/madsonic/pkg-message-spacer
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/pkg-message-spacer	Wed Nov 26 09:26:43 2014	(r373441)
@@ -0,0 +1,3 @@
+
+========================================================================
+

Added: head/www/madsonic/pkg-message-tomcat
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/pkg-message-tomcat	Wed Nov 26 09:26:43 2014	(r373441)
@@ -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.

Added: head/www/madsonic/pkg-plist-chunk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/madsonic/pkg-plist-chunk	Wed Nov 26 09:26:43 2014	(r373441)
@@ -0,0 +1,10 @@
+ at unexec if [ -d %%WEBAPPS%%/madsonic ]; then rm -rf %%WEBAPPS%%/madsonic; fi
+ at 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
+ at dir %%MADSONIC_HOME%%/transcode
+ at dir %%MADSONIC_HOME%%


More information about the svn-ports-all mailing list