summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/SlimServer/README33
-rw-r--r--audio/SlimServer/SlimServer.SlackBuild88
-rw-r--r--audio/SlimServer/SlimServer.info8
-rw-r--r--audio/SlimServer/doinst.sh48
-rw-r--r--audio/SlimServer/logrotate.slimserver14
-rw-r--r--audio/SlimServer/rc.slimserver52
-rw-r--r--audio/SlimServer/slack-desc12
7 files changed, 255 insertions, 0 deletions
diff --git a/audio/SlimServer/README b/audio/SlimServer/README
new file mode 100644
index 0000000000..eee38865db
--- /dev/null
+++ b/audio/SlimServer/README
@@ -0,0 +1,33 @@
+SlimServer (network music player)
+
+Slim Devices is a powerful and free Open Source application that will
+power any Squeezebox or Transporter but also any software MP3 player
+on your network.
+
+You will need to create a "slimserver" user on the system prior to
+installing this package - if the user is not present, then the
+post-install script will print and error and exit.
+
+If you want SlimServer to start at boot, you will need to make the
+/etc/rc.d/rc.slimserver file executable and add the following to
+/etc/rc.d/rc.local:
+ if [ -x /etc/rc.d/rc.slimserver ]; then
+ /etc/rc.d/rc.slimserver start
+ fi
+
+To setup your SlimServer, open your web browser on the system you installed
+SlimServer on and go to http://localhost:9000 to access the web interface.
+To tell SlimServer where your music is stored, click the "Server Settings"
+link on the left. You will find a "Music Folder" section to enter the path.
+
+By default, SlimServer will let anyone connect and stream music. You may
+want to check out the Security section and setup a username and password.
+
+You have to register your player with SlimServer before you can start
+playing music. To do that, open the URL http://localhost:9000/stream.mp3
+in your music player. After that you can control everything via the web
+interface. You can down sample the bit rate in the player specific audio
+settings.
+
+For more setup info check out the Help section at the bottom of the left
+hand panel. I'll leave the rest for you to explore on your own. Enjoy!
diff --git a/audio/SlimServer/SlimServer.SlackBuild b/audio/SlimServer/SlimServer.SlackBuild
new file mode 100644
index 0000000000..8011e4812b
--- /dev/null
+++ b/audio/SlimServer/SlimServer.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Slackware build script for SlimServer
+
+# Copyright 2007 Brian Reichert <rignes@pobox.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+
+PRGNAM=SlimServer
+VERSION=6.5.4
+ARCH=${ARCH:-noarch}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}_v${VERSION}.tar.gz
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+mkdir -p $PKG/opt/slimserver/playlists
+mkdir -p $PKG/var/cache/slimserver
+
+cp -a ${PRGNAM}_v${VERSION}/* $PKG/opt/slimserver
+
+# Install logrotate script
+mkdir -p $PKG/etc/logrotate.d
+cat $CWD/logrotate.slimserver > $PKG/etc/logrotate.d/slimserver
+
+# Install init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.slimserver > $PKG/etc/rc.d/rc.slimserver.new
+
+# Install an empty config file; it will only be left on the system
+# if one doesn't already exist.
+cat << EOF > $PKG/etc/slimserver.conf.new
+# This is the config file for SlimServer.
+# It is intentionally left empty by default.
+EOF
+
+# Remove a few things that obviously don't pertain to Slackware
+( cd $PKG/opt/slimserver
+ rm -rf Bin/darwin
+ rm -rf Bin/powerpc-hardhat-linux
+ rm -rf CPAN/arch/5.8/darwin-thread-multi-2level
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cd $PKG/opt/slimserver
+mv Changelog*.html Installation.txt License.txt revision.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/audio/SlimServer/SlimServer.info b/audio/SlimServer/SlimServer.info
new file mode 100644
index 0000000000..91a243d482
--- /dev/null
+++ b/audio/SlimServer/SlimServer.info
@@ -0,0 +1,8 @@
+PRGNAM="SlimServer"
+VERSION="6.5.4"
+HOMEPAGE="http://www.slimdevices.com"
+DOWNLOAD="http://www.slimdevices.com/downloads/SlimServer_v6.5.4/SlimServer_v6.5.4.tar.gz"
+MD5SUM="d51282b251ae5e0c3d2352597801b09b"
+MAINTAINER="Brian Reichert"
+EMAIL="rignes@pobox.com"
+APPROVED="rworkman"
diff --git a/audio/SlimServer/doinst.sh b/audio/SlimServer/doinst.sh
new file mode 100644
index 0000000000..0af3004881
--- /dev/null
+++ b/audio/SlimServer/doinst.sh
@@ -0,0 +1,48 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.slimserver.new:
+if [ -e etc/rc.d/rc.slimserver ]; then
+ cp -a etc/rc.d/rc.slimserver etc/rc.d/rc.slimserver.new.incoming
+ cat etc/rc.d/rc.slimserver.new > etc/rc.d/rc.slimserver.new.incoming
+ mv etc/rc.d/rc.slimserver.new.incoming etc/rc.d/rc.slimserver.new
+fi
+
+config etc/rc.d/rc.slimserver.new
+
+# Create a log file - this won't be removed when the package is uninstalled
+# (this is as it should be)
+touch var/log/slimserver.log
+
+# If a slimserver.conf file exists, there's no need to install the empty one
+# with a .new suffix
+if [ -e etc/slimserver.conf ]; then
+ rm -f etc/slimserver.conf.new
+else
+ mv etc/slimserver.conf.new etc/slimserver.conf
+fi
+
+# If there's no slimserver user, then bail out now.
+if ! grep -q ^slimserver etc/passwd ; then
+ echo
+ echo "There is no 'slimserver' user present."
+ echo "Add the user and then reinstall the SlimServer package."
+ echo "Exiting..."
+ exit 1
+fi
+
+chroot . /bin/chown slimserver:users /etc/slimserver.conf \
+ /var/log/slimserver.log /var/cache/slimserver
+chroot . /bin/chown -R slimserver:users /opt/slimserver
+
+
diff --git a/audio/SlimServer/logrotate.slimserver b/audio/SlimServer/logrotate.slimserver
new file mode 100644
index 0000000000..3cfa59bbbd
--- /dev/null
+++ b/audio/SlimServer/logrotate.slimserver
@@ -0,0 +1,14 @@
+/var/log/slimserver.log {
+ size 5M
+ compress
+ create 0644 slimserver users
+ missingok
+ prerotate
+ /etc/rc.d/rc.slimserver stop
+ endscript
+
+ postrotate
+ /etc/rc.d/rc.slimserver start
+ endscript
+}
+
diff --git a/audio/SlimServer/rc.slimserver b/audio/SlimServer/rc.slimserver
new file mode 100644
index 0000000000..9148e2a47f
--- /dev/null
+++ b/audio/SlimServer/rc.slimserver
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.slimserver
+#
+
+# Edit this to suit your setup
+SLIMSERVER_USER="slimserver"
+SLIMSERVER_HOME="/opt/slimserver"
+SLIMSERVER_CFG="/etc/slimserver.conf"
+SLIMSERVER_LOG="/var/log/slimserver.log"
+SLIMSERVER_CACHE="/var/cache/slimserver"
+SLIMSERVER_PLAYLISTS="/opt/slimserver/playlists"
+SLIMSERVER_ARGS="--daemon --cachedir=$SLIMSERVER_CACHE \
+ --playlistdir=$SLIMSERVER_PLAYLISTS \
+ --prefsfile=$SLIMSERVER_CFG \
+ --logfile=$SLIMSERVER_LOG"
+SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"
+
+
+slimserver_start() {
+ if [ -x $SLIMSERVER_BIN -a -r $SLIMSERVER_CFG ]; then
+ echo "Starting Slimserver..."
+ $SLIMSERVER_BIN --user $SLIMSERVER_USER $SLIMSERVER_ARGS
+ fi
+}
+
+slimserver_stop() {
+ echo "Stopping Slimserver..."
+ killall slimserver.pl
+}
+
+slimserver_restart() {
+ slimserver_stop
+ sleep 2
+ slimserver_start
+}
+
+
+case "$1" in
+'start')
+ slimserver_start
+ ;;
+'stop')
+ slimserver_stop
+ ;;
+'restart')
+ slimserver_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
+
diff --git a/audio/SlimServer/slack-desc b/audio/SlimServer/slack-desc
new file mode 100644
index 0000000000..e8f9897218
--- /dev/null
+++ b/audio/SlimServer/slack-desc
@@ -0,0 +1,12 @@
+ |-----handy-ruler------------------------------------------------------|
+SlimServer: SlimServer (network music player)
+SlimServer:
+SlimServer: Slim Devices introduces SlimServer 6.5.2, a powerful and free Open
+SlimServer: Source software. Not only will it power any Squeezebox or Transporter,
+SlimServer: but also any software MP3 player on your network. SlimServer 6.5.2
+SlimServer: runs on Windows, Mac, Linux, BSD and Solaris.
+SlimServer:
+SlimServer:
+SlimServer:
+SlimServer: Homepage: http://www.slimdevices.com
+SlimServer: