svn commit: r453870 - in head/www: . libresonic-standalone libresonic-standalone/files
Jeremie Le Hen
jlh at FreeBSD.org
Thu Nov 9 21:17:16 UTC 2017
Author: jlh (src committer)
Date: Thu Nov 9 21:17:14 2017
New Revision: 453870
URL: https://svnweb.freebsd.org/changeset/ports/453870
Log:
Add www/libresonic-standalone port.
Libresonic is a fork of Subsonic under GPLv3.
Reviewed by: mat
Approved by: mat
Differential Revision: https://reviews.freebsd.org/D12597
Added:
head/www/libresonic-standalone/
head/www/libresonic-standalone/Makefile (contents, props changed)
head/www/libresonic-standalone/distinfo (contents, props changed)
head/www/libresonic-standalone/files/
head/www/libresonic-standalone/files/libresonic.in (contents, props changed)
head/www/libresonic-standalone/files/pkg-message.in (contents, props changed)
head/www/libresonic-standalone/pkg-descr (contents, props changed)
head/www/libresonic-standalone/pkg-plist (contents, props changed)
Modified:
head/www/Makefile
Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile Thu Nov 9 20:45:04 2017 (r453869)
+++ head/www/Makefile Thu Nov 9 21:17:14 2017 (r453870)
@@ -360,6 +360,7 @@
SUBDIR += libjwt
SUBDIR += libmicrohttpd
SUBDIR += libnghttp2
+ SUBDIR += libresonic-standalone
SUBDIR += libsocialweb
SUBDIR += libwww
SUBDIR += libxul
Added: head/www/libresonic-standalone/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/libresonic-standalone/Makefile Thu Nov 9 21:17:14 2017 (r453870)
@@ -0,0 +1,82 @@
+# Created by: Jeremie Le Hen <jlh at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= libresonic
+DISTVERSIONPREFIX= v
+DISTVERSION= 6.2
+CATEGORIES= www java
+MASTER_SITES= https://github.com/Libresonic/libresonic/releases/download/v${DISTVERSION}/
+PKGNAMESUFFIX= -standalone
+EXTRACT_SUFX= .war
+
+MAINTAINER= jlh at FreeBSD.org
+COMMENT= Subsonic streaming media server, standalone version
+
+USE_JAVA= yes
+USE_RC_SUBR= libresonic
+
+LICENSE= GPLv3
+
+OPTIONS_GROUP= TRANSCODING
+TRANSCODING_DESC= Transcoding support
+OPTIONS_GROUP_TRANSCODING= FFMPEG FLAC LAME VORBIS FAAC FAAD XMP MPC APE
+APE_DESC= Depend on mac for Monkey's Audio transcoding #'
+FAAC_DESC= Depend on FAAD for AAC/M4A transcoding
+FAAD_DESC= Depend on FAAC for AAC/M4A transcoding
+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
+MPC_DESC= Depend on mpcdec for MPC transcoding
+VORBIS_DESC= Depend on oggenc/oggdec for Vorbis transcoding
+XMP_DESC= Depend on XMP for module file transcoding
+
+OPTIONS_DEFAULT= FFMPEG
+OPTIONS_SUB= yes
+
+APE_RUN_DEPENDS= mac:audio/mac
+FAAC_RUN_DEPENDS= faac:audio/faac
+FAAD_RUN_DEPENDS= faad:audio/faad
+FFMPEG_RUN_DEPENDS= ffmpeg:multimedia/ffmpeg
+FLAC_RUN_DEPENDS= flac:audio/flac
+LAME_RUN_DEPENDS= lame:audio/lame
+MPC_RUN_DEPENDS= mpcdec:audio/musepack
+VORBIS_RUN_DEPENDS= oggenc:audio/vorbis-tools
+XMP_RUN_DEPENDS= xmp:audio/xmp
+
+# We don't want to extract the .war file, just copy it.
+EXTRACT_CMD= ${CP}
+EXTRACT_BEFORE_ARGS=
+EXTRACT_AFTER_ARGS= libresonic.war
+
+NO_WRKSUBDIR= yes
+NO_BUILD= yes
+JAVA_VERSION= 1.8+
+JAVA_RUN= yes
+# Don't waste UID/GID and reuse Subsonic's user.
+UERS= subsonic
+GROUPS= subsonic
+LIBRESONIC_HOME= /var/libresonic
+PLIST_SUB= LIBRESONIC_HOME="${LIBRESONIC_HOME}" \
+ USER="${USERS}" \
+ GROUP="${GROUPS}"
+SUB_FILES= pkg-message
+SUB_LIST= LIBRESONIC_HOME="${LIBRESONIC_HOME}" \
+ USER="${USERS}" \
+ GROUP="${GROUPS}" \
+ JAVA="${JAVA}"
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/libresonic.war ${STAGEDIR}${DATADIR}/
+ ${MKDIR} ${STAGEDIR}${LIBRESONIC_HOME}/transcode
+
+do-install-FFMPEG-on:
+ ${RLN} ${PREFIX}/bin/ffmpeg ${STAGEDIR}${LIBRESONIC_HOME}/transcode/ffmpeg
+
+do-install-FLAC-on:
+ ${RLN} ${PREFIX}/bin/flac ${STAGEDIR}${LIBRESONIC_HOME}/transcode/flac
+
+do-install-LAME-on:
+ ${RLN} ${PREFIX}/bin/lame ${STAGEDIR}${LIBRESONIC_HOME}/transcode/lame
+
+.include <bsd.port.mk>
Added: head/www/libresonic-standalone/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/libresonic-standalone/distinfo Thu Nov 9 21:17:14 2017 (r453870)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1507218527
+SHA256 (libresonic-v6.2.war) = 458249eda3f105c0023c7b51d5983ed71a2cb6a3d3a22dd39be656ee359fab99
+SIZE (libresonic-v6.2.war) = 61674004
Added: head/www/libresonic-standalone/files/libresonic.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/libresonic-standalone/files/libresonic.in Thu Nov 9 21:17:14 2017 (r453870)
@@ -0,0 +1,88 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: libresonic
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Configuration settings for libresonic in /etc/rc.conf:
+#
+# libresonic_enable (bool):
+# Set to "NO" by default.
+# Set it to "YES" to enable libresonic.
+#
+# libresonic_home (str):
+# Set to "%%LIBRESONIC_HOME%%" by default.
+#
+# libresonic_host (str):
+# Set to "0.0.0.0" by default.
+# Specify which IP address to listen to.
+#
+# libresonic_port (int):
+# Set to "4040" by default.
+# Specify which port to listen on for HTTP(S).
+#
+# libresonic_ssl (bool):
+# Set to "NO" by default.
+# Set it to "YES" to enable SSL.
+#
+# libresonic_ssl_keystore (str):
+# Optionally set path to custom SSL keystore.
+#
+# libresonic_ssl_password (str):
+# Optionally set password for custom SSL keystore.
+#
+# libresonic_context_path (str):
+# Set to "/" by default.
+# Specify the last part of the Libresonic URL, typically "/" or "/libresonic".
+#
+# libresonic_max_memory (int):
+# Set to "100" by default.
+# Specify the memory limit (Java heap size) in megabytes.
+#
+
+. /etc/rc.subr
+
+name=libresonic
+rcvar=${name}_enable
+procname="%%JAVA%%"
+
+load_rc_config "${name}"
+
+: ${libresonic_enable:="NO"}
+: ${libresonic_user:="%%USER%%"}
+: ${libresonic_group:="%%GROUP%%"}
+: ${libresonic_home:="%%LIBRESONIC_HOME%%"}
+: ${libresonic_host:="0.0.0.0"}
+: ${libresonic_port:="4040"}
+: ${libresonic_ssl:="NO"}
+: ${libresonic_context_path:="/"}
+: ${libresonic_max_memory:="100"}
+
+if checkyesno libresonic_ssl; then
+ LIBRESONIC_SSL_FLAGS="-Dlibresonic.httpsPort=${libresonic_port}" && libresonic_port="0"
+ if [ ! -z ${libresonic_ssl_keystore} ]; then
+ LIBRESONIC_SSL_FLAGS=${LIBRESONIC_SSL_FLAGS}" -Dlibresonic.ssl.keystore=${libresonic_ssl_keystore} -Dlibresonic.ssl.password=${libresonic_ssl_password}"
+ fi
+fi
+
+start_precmd="export LC_CTYPE='en_US.UTF-8'"
+libresonic_chdir="%%DATADIR%%"
+command="/usr/sbin/daemon"
+command_args="-f ${procname} \
+ -Dlibresonic.home=${libresonic_home} \
+ -Dlibresonic.host=${libresonic_host} \
+ -Dlibresonic.port=${libresonic_port} \
+ ${LIBRESONIC_SSL_FLAGS} \
+ -Dlibresonic.contextPath=${libresonic_context_path} \
+ -Dlibresonic.defaultMusicFolder=${libresonic_home}/music \
+ -Dlibresonic.defaultPodcastFolder=${libresonic_home}/Podcast \
+ -Dlibresonic.defaultPlaylistFolder=${libresonic_home}/playlists \
+ -Xmx${libresonic_max_memory}m \
+ -Djava.awt.headless=true \
+ -jar ${libresonic_chdir}/libresonic.war"
+
+run_rc_command "$1"
Added: head/www/libresonic-standalone/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/libresonic-standalone/files/pkg-message.in Thu Nov 9 21:17:14 2017 (r453870)
@@ -0,0 +1,51 @@
+
+========================================================================
+
+Enable Libresonic by putting the following line in /etc/rc.conf
+ libresonic_enable="YES"
+
+See %%LOCALBASE%%/etc/rc.d/libresonic for all the options.
+
+========================================================================
+
+Transcoding in Libresonic 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
+%%LIBRESONIC_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/libresonic-standalone/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/libresonic-standalone/pkg-descr Thu Nov 9 21:17:14 2017 (r453870)
@@ -0,0 +1,9 @@
+Libresonic is a web-based media streamer and jukebox fork of Subsonic.
+
+Libresonic instantly transports your media to any HTTP connected device
+regardless of bitrate. You can stream to multiple players simultaneously.
+Libresonic is designed to handle very large music collections. By using
+transcoder plug-ins, Libresonic supports on-the-fly conversion and streaming
+of virtually any audio format, including MP3, OGG, WMA, FLAC, APE and more.
+
+WWW: http://www.libresonic.org
Added: head/www/libresonic-standalone/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/libresonic-standalone/pkg-plist Thu Nov 9 21:17:14 2017 (r453870)
@@ -0,0 +1,7 @@
+%%DATADIR%%/libresonic.war
+%%FFMPEG%%%%LIBRESONIC_HOME%%/transcode/ffmpeg
+%%FLAC%%%%LIBRESONIC_HOME%%/transcode/flac
+%%LAME%%%%LIBRESONIC_HOME%%/transcode/lame
+ at postunexec test -d %%LIBRESONIC_HOME%% && (echo "Configuration information and database saved." && echo "If you you are permanently uninstalling this package" && echo "please remove %%LIBRESONIC_HOME%% and its contents manually.") || true
+ at dir(%%USER%%,%%GROUP%%,750) %%LIBRESONIC_HOME%%/transcode
+ at dir(%%USER%%,%%GROUP%%,750) %%LIBRESONIC_HOME%%
More information about the svn-ports-head
mailing list