summaryrefslogtreecommitdiff
path: root/media-sound/subsonic-bin
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/subsonic-bin
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/subsonic-bin')
-rw-r--r--media-sound/subsonic-bin/Manifest1
-rw-r--r--media-sound/subsonic-bin/files/subsonic.confd20
-rw-r--r--media-sound/subsonic-bin/files/subsonic.initd43
-rw-r--r--media-sound/subsonic-bin/metadata.xml11
-rw-r--r--media-sound/subsonic-bin/subsonic-bin-5.2.1-r1.ebuild63
5 files changed, 138 insertions, 0 deletions
diff --git a/media-sound/subsonic-bin/Manifest b/media-sound/subsonic-bin/Manifest
new file mode 100644
index 00000000000..8fc732f70d7
--- /dev/null
+++ b/media-sound/subsonic-bin/Manifest
@@ -0,0 +1 @@
+DIST subsonic-5.2.1-standalone.tar.gz 43671795 SHA256 523fa8357c961c1ae742a15f0ceaabdd41fcba9137c29d244957922af90ee791 SHA512 1251b77cfbee80224d3e332945fecec981c79b27c129cb47f5880a82344db15d1f8d17b11dd272a4ad3d9794f4e3055d4a59826623d543b676de73fe1c83b936 WHIRLPOOL 72f5c38e59afab4cec95ff1b76b3b8be70f5f25508f4044dac4ba795382069ca54e01c1ff75e30c4220489bfe4c0958c5062168121e8f3e74a226d5a4863970d
diff --git a/media-sound/subsonic-bin/files/subsonic.confd b/media-sound/subsonic-bin/files/subsonic.confd
new file mode 100644
index 00000000000..63b303ae6a4
--- /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 00000000000..cabd3604ac0
--- /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 00000000000..712a578d062
--- /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>
+ <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 00000000000..f08b8188be0
--- /dev/null
+++ b/media-sound/subsonic-bin/subsonic-bin-5.2.1-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}