Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144560510
D12597.1775472262.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D12597.1775472262.diff
View Options
Index: head/www/Makefile
===================================================================
--- head/www/Makefile
+++ head/www/Makefile
@@ -360,6 +360,7 @@
SUBDIR += libjwt
SUBDIR += libmicrohttpd
SUBDIR += libnghttp2
+ SUBDIR += libresonic-standalone
SUBDIR += libsocialweb
SUBDIR += libwww
SUBDIR += libxul
Index: head/www/libresonic-standalone/Makefile
===================================================================
--- head/www/libresonic-standalone/Makefile
+++ head/www/libresonic-standalone/Makefile
@@ -0,0 +1,82 @@
+# Created by: Jeremie Le Hen <jlh@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@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>
Index: head/www/libresonic-standalone/distinfo
===================================================================
--- head/www/libresonic-standalone/distinfo
+++ head/www/libresonic-standalone/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1507218527
+SHA256 (libresonic-v6.2.war) = 458249eda3f105c0023c7b51d5983ed71a2cb6a3d3a22dd39be656ee359fab99
+SIZE (libresonic-v6.2.war) = 61674004
Index: head/www/libresonic-standalone/files/libresonic.in
===================================================================
--- head/www/libresonic-standalone/files/libresonic.in
+++ head/www/libresonic-standalone/files/libresonic.in
@@ -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"
Index: head/www/libresonic-standalone/files/pkg-message.in
===================================================================
--- head/www/libresonic-standalone/files/pkg-message.in
+++ head/www/libresonic-standalone/files/pkg-message.in
@@ -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 -]
+
+========================================================================
+
Index: head/www/libresonic-standalone/pkg-descr
===================================================================
--- head/www/libresonic-standalone/pkg-descr
+++ head/www/libresonic-standalone/pkg-descr
@@ -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
Index: head/www/libresonic-standalone/pkg-plist
===================================================================
--- head/www/libresonic-standalone/pkg-plist
+++ head/www/libresonic-standalone/pkg-plist
@@ -0,0 +1,7 @@
+%%DATADIR%%/libresonic.war
+%%FFMPEG%%%%LIBRESONIC_HOME%%/transcode/ffmpeg
+%%FLAC%%%%LIBRESONIC_HOME%%/transcode/flac
+%%LAME%%%%LIBRESONIC_HOME%%/transcode/lame
+@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
+@dir(%%USER%%,%%GROUP%%,750) %%LIBRESONIC_HOME%%/transcode
+@dir(%%USER%%,%%GROUP%%,750) %%LIBRESONIC_HOME%%
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 10:44 AM (7 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28273483
Default Alt Text
D12597.1775472262.diff (9 KB)
Attached To
Mode
D12597: Add a port for Libresonic.
Attached
Detach File
Event Timeline
Log In to Comment