diff options
Diffstat (limited to 'media-sound/subsonic-bin')
-rw-r--r-- | media-sound/subsonic-bin/Manifest | 7 | ||||
-rw-r--r-- | media-sound/subsonic-bin/files/subsonic.confd | 20 | ||||
-rw-r--r-- | media-sound/subsonic-bin/files/subsonic.initd | 43 | ||||
-rw-r--r-- | media-sound/subsonic-bin/metadata.xml | 11 | ||||
-rw-r--r-- | media-sound/subsonic-bin/subsonic-bin-5.2.1-r1.ebuild | 62 |
5 files changed, 143 insertions, 0 deletions
diff --git a/media-sound/subsonic-bin/Manifest b/media-sound/subsonic-bin/Manifest new file mode 100644 index 000000000000..7f6210cfc38e --- /dev/null +++ b/media-sound/subsonic-bin/Manifest @@ -0,0 +1,7 @@ +AUX subsonic.confd 420 SHA256 cc4b3a8dc7ffd6e77e91455f001ce6988952b0626f1e342f72d92eeb4b53692d SHA512 2e79c5a6fb12d0b8d4c5107175da8ca65bcc10e42c385b056ba5c5bb4c98c7d9995c391a5bddd726237a1f13bf37d1cbdc48f7fa7b9d3dd1e3aab20a212b00be WHIRLPOOL 5a53efeb87ba989f0e0907d002d598a013e03a6799e35e85f6f5fe6633b8671202cf2bd1692249e2437a27b0f86ac64daded7c1405e56393deee30e4e64e5908 +AUX subsonic.initd 1194 SHA256 7bdfd069c58333393bf8e9a6e423d708ff2f9ce70e6613c73fa27f08b0037d16 SHA512 7e99eaf2663d346d42e883f3501017e4da565f7b07ef390e370e097d13f4fd039ddccaa761562c2f43c28dbf3ad5c355dbfcef7b4e67ecccf3cd31819c86b14b WHIRLPOOL c55fcb29af11868286e4eee0821c98496b4e185116410d105768af84078a7ed7af121b9b217b493cb112ba65b4199bac37c8e64ee9e49c07ee5f13341a34f4f2 +DIST subsonic-5.2.1-standalone.tar.gz 43671795 SHA256 523fa8357c961c1ae742a15f0ceaabdd41fcba9137c29d244957922af90ee791 SHA512 1251b77cfbee80224d3e332945fecec981c79b27c129cb47f5880a82344db15d1f8d17b11dd272a4ad3d9794f4e3055d4a59826623d543b676de73fe1c83b936 WHIRLPOOL 72f5c38e59afab4cec95ff1b76b3b8be70f5f25508f4044dac4ba795382069ca54e01c1ff75e30c4220489bfe4c0958c5062168121e8f3e74a226d5a4863970d +EBUILD subsonic-bin-5.2.1-r1.ebuild 1400 SHA256 304fd5d9fdda40e4e7f3a60a40ad0cb58a455ae391d196be3e727d0eee3a16d2 SHA512 6b11a68226344537b38591f5a5778af950021bcafbc3cecc3e9a376df9b327bc8dc1ebfb1a6f970026cd1fd238884ce4f2c2e0528c057551b64ee6836222a855 WHIRLPOOL e5b0d05af8706d96d3a7b213688f0444646b5b353ba8ead1ed705ef7fdcfb5b603c9cdaa7142ac0ee97b350579b273939ab539d5c67fc6ac2be59d336abf7b0f +MISC ChangeLog 2246 SHA256 001c7b19fbdf6238730f4894be3090c24eaea78dd60a0b410b91635f30114125 SHA512 116823082270dc8ddf6def72ff1a7c266b5afbeebee00364a5e27854b9240e7d37919e0799aafb75ac182302fbe435ffbe65d7aec96b37a02c8a704e66b036da WHIRLPOOL 006eb1ac15e8f6df7582f249310b2d5392fba122a0f0a0fb07a8861f9d9b020d3d6e7527025b52bb58fb6baa8208edfd9e26567e49f2befb253a7865d56f5ccd +MISC ChangeLog-2015 681 SHA256 c1586650dc9bf4c913aece052577126fa63e4d220851ec20cd66d26744cb3fb8 SHA512 acaeea401e211585ebcb3f39febec0da0607c5291f675f56135408b911b5a7bed5ba86fc8647286f2d5832aca29968f77bc47af5794bd60ffd965c70b983e0da WHIRLPOOL 12c060676b42a9047dca7f559342d10497dcf536e84a460af8997d014051e8b106c56c1bd1bd15645e1e8f296195ecf7289c33ceb72c371b534c4c60c5624c26 +MISC metadata.xml 325 SHA256 17390f7dd95b34e23ca75dd56910d8f4f113b6d7e696ad8f7ea4b9b2804cdf7e SHA512 f6fe0547df26e6c4f94b6b1e915a51731fa3d6f565c71adc64f2fc3d858dc67d4664e46fbb654fa982bf0ba5915d673e0891f20aabfaadc84c0df2c44df46865 WHIRLPOOL 2840aaa1f621283b914a3bbf05b982e89df2f18d3684a3a32d3e447fccc6604aa2193568dbdd5eaa5b8e338d55a2b116224e544a64e79979bf5a177f6ba31d62 diff --git a/media-sound/subsonic-bin/files/subsonic.confd b/media-sound/subsonic-bin/files/subsonic.confd new file mode 100644 index 000000000000..63b303ae6a4e --- /dev/null +++ b/media-sound/subsonic-bin/files/subsonic.confd @@ -0,0 +1,20 @@ + +# Host and port to listen on +SUBSONIC_HOST=0.0.0.0 +SUBSONIC_PORT=4040 + +# To disable https, set to 0 +SUBSONIC_HTTPS_PORT=0 + +SUBSONIC_CONTEXT_PATH=/ +SUBSONIC_MAX_MEMORY=100 + +# Music directories +SUBSONIC_DEFAULT_MUSIC_FOLDER=/var/music +SUBSONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast +SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists + +NICELEVEL=0 + +# Further subsonic start script options, if ever needed +SUBSONIC_OPTS="" diff --git a/media-sound/subsonic-bin/files/subsonic.initd b/media-sound/subsonic-bin/files/subsonic.initd new file mode 100644 index 000000000000..cabd3604ac0f --- /dev/null +++ b/media-sound/subsonic-bin/files/subsonic.initd @@ -0,0 +1,43 @@ +#!/sbin/openrc-run +# Distributed under the terms of the GNU General Public License, v2 or later + +SUBSONIC_HOME=${SUBSONIC_HOME:-/var/lib/${SVCNAME}} +SUBSONIC_USER=${SUBSONIC_USER:-${SVCNAME}} +PIDFILE=/run/subsonic/subsonic.pid + +depend() { + after net +} + +start() { + checkpath -dq -o subsonic:subsonic -m 755 /run/subsonic/ + + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start --user "${SUBSONIC_USER}" --name subsonic \ + --env HOME="${SUBSONIC_HOME}" --exec /usr/bin/subsonic \ + --pidfile="${PIDFILE}" \ + --nicelevel "${NICELEVEL}" \ + -- \ + --home="${SUBSONIC_HOME}" \ + --host="${SUBSONIC_HOST}" \ + --port="${SUBSONIC_PORT}" \ + --https-port="${SUBSONIC_HTTPS_PORT}" \ + --context-path="${SUBSONIC_CONTEXT_PATH}" \ + --max-memory="${SUBSONIC_MAX_MEMORY}" \ + --default-music-folder="${SUBSONIC_DEFAULT_MUSIC_FOLDER}" \ + --default-podcast-folder="${SUBSONIC_DEFAULT_PODCAST_FOLDER}" \ + --default-playlist-folder="${SUBSONIC_DEFAULT_PLAYLIST_FOLDER}" \ + --pidfile="${PIDFILE}" --quiet \ + ${SUBSONIC_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --user "${SUBSONIC_USER}" \ + --pidfile "${PIDFILE}" \ + --wait 15000 \ + --progress + eend $? +} diff --git a/media-sound/subsonic-bin/metadata.xml b/media-sound/subsonic-bin/metadata.xml new file mode 100644 index 000000000000..207efe7b11ee --- /dev/null +++ b/media-sound/subsonic-bin/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>perfinion@gentoo.org</email> + <name>Jason Zaman</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">subsonic</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-sound/subsonic-bin/subsonic-bin-5.2.1-r1.ebuild b/media-sound/subsonic-bin/subsonic-bin-5.2.1-r1.ebuild new file mode 100644 index 000000000000..7c7c9f760f5d --- /dev/null +++ b/media-sound/subsonic-bin/subsonic-bin-5.2.1-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils user + +MY_PN="${PN//-bin}" + +DESCRIPTION="Subsonic is a complete, personal media streaming solution" +HOMEPAGE="http://www.subsonic.org/" +SRC_URI="mirror://sourceforge/${MY_PN}/${PV}/${MY_PN}-${PV}-standalone.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ffmpeg lame selinux" + +DEPEND="" +RDEPEND="virtual/jre + lame? ( media-sound/lame ) + ffmpeg? ( virtual/ffmpeg ) + selinux? ( sec-policy/selinux-subsonic )" + +S="${WORKDIR}/" +SUBSONIC_HOME="/var/lib/${MY_PN}" +USER_GROUP="subsonic" + +pkg_setup() { + enewgroup "${USER_GROUP}" + enewuser "${USER_GROUP}" -1 -1 ${SUBSONIC_HOME} "${USER_GROUP}" +} + +src_install() { + local dir="/usr/libexec/${MY_PN}" + + dodoc README.TXT "Getting Started.html" + + insinto ${dir} + doins subsonic-booter-jar-with-dependencies.jar subsonic.war + + exeinto ${dir} + doexe subsonic.sh + + keepdir ${SUBSONIC_HOME} + fowners ${USER_GROUP}:${USER_GROUP} ${SUBSONIC_HOME} + + newinitd "${FILESDIR}/subsonic.initd" subsonic + newconfd "${FILESDIR}/subsonic.confd" subsonic + + make_wrapper ${MY_PN} "${dir}/subsonic.sh" + + if use ffmpeg; then + dodir ${SUBSONIC_HOME}/transcode + dosym /usr/bin/ffmpeg ${SUBSONIC_HOME}/transcode/ffmpeg + fi + + if use lame; then + dodir ${SUBSONIC_HOME}/transcode + dosym /usr/bin/lame ${SUBSONIC_HOME}/transcode/lame + fi +} |