aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-12-06 22:44:51 -0600
committerRobby Workman <rworkman@slackbuilds.org>2010-12-06 23:26:21 -0600
commit2ea80394f84a1897169ad75f6ec81ca6a3f003aa (patch)
treea3465fd9b22b979e0e5d9571c950b1e7829d13d7
parent4ecfc6bfd15c8e3eefdb0d19ada8d190a17f1646 (diff)
network/mediatomb: Added (an open source UPnP MediaServer)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--network/mediatomb/README7
-rw-r--r--network/mediatomb/config.xml151
-rw-r--r--network/mediatomb/doinst.sh29
-rw-r--r--network/mediatomb/mediatomb.SlackBuild118
-rw-r--r--network/mediatomb/mediatomb.info10
-rw-r--r--network/mediatomb/rc.mediatomb80
-rw-r--r--network/mediatomb/rc.mediatomb.conf21
-rw-r--r--network/mediatomb/slack-desc19
8 files changed, 435 insertions, 0 deletions
diff --git a/network/mediatomb/README b/network/mediatomb/README
new file mode 100644
index 000000000000..ff48d720029c
--- /dev/null
+++ b/network/mediatomb/README
@@ -0,0 +1,7 @@
+MediaTomb is an open source (GPL) UPnP MediaServer with a nice
+web user interface, it allows you to stream your digital media
+through your home network and listen to/watch it on a variety
+of UPnP compatible devices.
+
+mediatomb optionally depends on ffmpeg, libmp4v2, lastfmlib and
+ffmpegthumbnailer.
diff --git a/network/mediatomb/config.xml b/network/mediatomb/config.xml
new file mode 100644
index 000000000000..497ae5d2d945
--- /dev/null
+++ b/network/mediatomb/config.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
+ <server>
+ <ui enabled="yes" show-tooltips="yes">
+ <accounts enabled="no" session-timeout="30">
+ <account user="mediatomb" password="mediatomb"/>
+ </accounts>
+ </ui>
+ <name>MediaTomb</name>
+ <udn></udn>
+ <home>/var/lib/mediatomb</home>
+ <webroot>/usr/share/mediatomb/web</webroot>
+ <storage>
+ <sqlite3 enabled="yes">
+ <database-file>mediatomb.db</database-file>
+ </sqlite3>
+ <mysql enabled="no">
+ <host>localhost</host>
+ <username>mediatomb</username>
+ <database>mediatomb</database>
+ </mysql>
+ </storage>
+ <protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
+ <!--
+ Uncomment the lines below to get rid of jerky avi playback on the
+ DSM320 or to enable subtitles support on the DSM units
+ -->
+ <!--
+ <custom-http-headers>
+ <add header="X-User-Agent: redsonic"/>
+ </custom-http-headers>
+
+ <manufacturerURL>redsonic.com</manufacturerURL>
+ <modelNumber>105</modelNumber>
+ -->
+ <!-- Uncomment the line below if you have a Telegent TG100 -->
+ <!--
+ <upnp-string-limit>101</upnp-string-limit>
+ -->
+ <extended-runtime-options>
+ <ffmpegthumbnailer enabled="no">
+ <thumbnail-size>128</thumbnail-size>
+ <seek-percentage>5</seek-percentage>
+ <filmstrip-overlay>yes</filmstrip-overlay>
+ <workaround-bugs>no</workaround-bugs>
+ <image-quality>8</image-quality>
+ </ffmpegthumbnailer>
+ <mark-played-items enabled="no" suppress-cds-updates="yes">
+ <string mode="prepend">*</string>
+ <mark>
+ <content>video</content>
+ </mark>
+ </mark-played-items>
+ <lastfm enabled="no">
+ <username>lastfmuser</username>
+ <password>lastfmpass</password>
+ </lastfm>
+ </extended-runtime-options>
+ </server>
+ <import hidden-files="no">
+ <scripting script-charset="UTF-8">
+ <common-script>/usr/share/mediatomb/js/common.js</common-script>
+ <playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
+ <virtual-layout type="builtin">
+ <import-script>/usr/share/mediatomb/js/import.js</import-script>
+ </virtual-layout>
+ </scripting>
+ <mappings>
+ <extension-mimetype ignore-unknown="no">
+ <map from="mp3" to="audio/mpeg"/>
+ <map from="ogx" to="application/ogg"/>
+ <map from="ogv" to="video/ogg"/>
+ <map from="oga" to="audio/ogg"/>
+ <map from="ogg" to="audio/ogg"/>
+ <map from="ogm" to="video/ogg"/>
+ <map from="asf" to="video/x-ms-asf"/>
+ <map from="asx" to="video/x-ms-asf"/>
+ <map from="wma" to="audio/x-ms-wma"/>
+ <map from="wax" to="audio/x-ms-wax"/>
+ <map from="wmv" to="video/x-ms-wmv"/>
+ <map from="wvx" to="video/x-ms-wvx"/>
+ <map from="wm" to="video/x-ms-wm"/>
+ <map from="wmx" to="video/x-ms-wmx"/>
+ <map from="m3u" to="audio/x-mpegurl"/>
+ <map from="pls" to="audio/x-scpls"/>
+ <map from="flv" to="video/x-flv"/>
+ <map from="mkv" to="video/x-matroska"/>
+ <map from="mka" to="audio/x-matroska"/>
+ <!-- Uncomment the line below for PS3 divx support -->
+ <!-- <map from="avi" to="video/divx"/> -->
+ <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
+ <!-- <map from="avi" to="video/avi"/> -->
+ </extension-mimetype>
+ <mimetype-upnpclass>
+ <map from="audio/*" to="object.item.audioItem.musicTrack"/>
+ <map from="video/*" to="object.item.videoItem"/>
+ <map from="image/*" to="object.item.imageItem"/>
+ </mimetype-upnpclass>
+ <mimetype-contenttype>
+ <treat mimetype="audio/mpeg" as="mp3"/>
+ <treat mimetype="application/ogg" as="ogg"/>
+ <treat mimetype="audio/x-flac" as="flac"/>
+ <treat mimetype="image/jpeg" as="jpg"/>
+ <treat mimetype="audio/x-mpegurl" as="playlist"/>
+ <treat mimetype="audio/x-scpls" as="playlist"/>
+ <treat mimetype="audio/x-wav" as="pcm"/>
+ <treat mimetype="audio/L16" as="pcm"/>
+ <treat mimetype="video/x-msvideo" as="avi"/>
+ <treat mimetype="video/mp4" as="mp4"/>
+ <treat mimetype="audio/mp4" as="mp4"/>
+ <treat mimetype="application/x-iso9660" as="dvd"/>
+ <treat mimetype="application/x-iso9660-image" as="dvd"/>
+ </mimetype-contenttype>
+ </mappings>
+ <online-content>
+ <YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
+ <favorites user="mediatomb"/>
+ <standardfeed feed="most_viewed" time-range="today"/>
+ <playlists user="mediatomb"/>
+ <uploads user="mediatomb"/>
+ <standardfeed feed="recently_featured" time-range="today"/>
+ </YouTube>
+ </online-content>
+ </import>
+ <transcoding enabled="no">
+ <mimetype-profile-mappings>
+ <transcode mimetype="video/x-flv" using="vlcmpeg"/>
+ <transcode mimetype="application/ogg" using="vlcmpeg"/>
+ <transcode mimetype="application/ogg" using="oggflac2raw"/>
+ <transcode mimetype="audio/x-flac" using="oggflac2raw"/>
+ </mimetype-profile-mappings>
+ <profiles>
+ <profile name="oggflac2raw" enabled="no" type="external">
+ <mimetype>audio/L16</mimetype>
+ <accept-url>no</accept-url>
+ <first-resource>yes</first-resource>
+ <accept-ogg-theora>no</accept-ogg-theora>
+ <agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
+ <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
+ </profile>
+ <profile name="vlcmpeg" enabled="no" type="external">
+ <mimetype>video/mpeg</mimetype>
+ <accept-url>yes</accept-url>
+ <first-resource>yes</first-resource>
+ <accept-ogg-theora>yes</accept-ogg-theora>
+ <agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
+ <buffer size="14400000" chunk-size="512000" fill-size="120000"/>
+ </profile>
+ </profiles>
+ </transcoding>
+</config> \ No newline at end of file
diff --git a/network/mediatomb/doinst.sh b/network/mediatomb/doinst.sh
new file mode 100644
index 000000000000..adc456f74f25
--- /dev/null
+++ b/network/mediatomb/doinst.sh
@@ -0,0 +1,29 @@
+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...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+# Prepare the new configuration files
+config etc/mediatomb/config.xml.new
+config etc/rc.d/rc.mediatomb.conf.new
+preserve_perms etc/rc.d/rc.mediatomb.new
+
diff --git a/network/mediatomb/mediatomb.SlackBuild b/network/mediatomb/mediatomb.SlackBuild
new file mode 100644
index 000000000000..de89416ec070
--- /dev/null
+++ b/network/mediatomb/mediatomb.SlackBuild
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Slackware build script for mediatomb
+
+# Copyright 2010 Heinz Wiesinger, Amsterdam, The Netherlands
+# 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.
+
+PRGNAM=mediatomb
+VERSION=0.12.1
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+if ! grep ^mediatomb: /etc/group 2>&1 > /dev/null; then
+ echo " Must have a mediatomb group to run this script."
+ echo " # groupadd -g 241 mediatomb"
+ echo " Or something similar."
+ exit 1
+elif ! grep ^mediatomb: /etc/passwd 2>&1 > /dev/null; then
+ echo " Must have a mediatomb user to run this script."
+ echo " # useradd -u 241 -g mediatomb -d /var/lib/mediatomb mediatomb"
+ echo " Or something similar."
+ exit 1
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# We need LDFLAGS="-ldl" for proper sqlite detection
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="-ldl" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/etc/rc.d
+cp $CWD/rc.mediatomb $PKG/etc/rc.d/rc.mediatomb.new
+cp $CWD/rc.mediatomb.conf $PKG/etc/rc.d/rc.mediatomb.conf.new
+
+mkdir -p $PKG/etc/mediatomb
+install -m 644 $CWD/config.xml $PKG/etc/mediatomb/config.xml.new
+chown -R mediatomb:mediatomb $PKG/etc/mediatomb
+
+mkdir -p $PKG/var/{lib,log,run}/mediatomb
+chown mediatomb:mediatomb $PKG/var/{lib,log,run}/mediatomb
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/mediatomb/mediatomb.info b/network/mediatomb/mediatomb.info
new file mode 100644
index 000000000000..2ffe0063418c
--- /dev/null
+++ b/network/mediatomb/mediatomb.info
@@ -0,0 +1,10 @@
+PRGNAM="mediatomb"
+VERSION="0.12.1"
+HOMEPAGE="http://mediatomb.cc/"
+DOWNLOAD="http://downloads.sourceforge.net/mediatomb/mediatomb-0.12.1.tar.gz"
+MD5SUM="e927dd5dc52d3cfcebd8ca1af6f0d3c2"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Heinz Wiesinger"
+EMAIL="pprkut@liwjatan.at"
+APPROVED="rworkman"
diff --git a/network/mediatomb/rc.mediatomb b/network/mediatomb/rc.mediatomb
new file mode 100644
index 000000000000..92804835b987
--- /dev/null
+++ b/network/mediatomb/rc.mediatomb
@@ -0,0 +1,80 @@
+#!/bin/sh
+# Start/stop/restart mediatomb.
+# $Id: rc.mediatomb,v 1.0 2010/11/01
+# Authors: Heinz Wiesinger <pprkut@liwjatan.at>
+# ---------------------------------------------------------------------------
+
+MEDIATOMB_PIDFILE="/var/run/mediatomb/mediatomb.pid"
+MEDIATOMB_LOGFILE="/var/log/mediatomb/mediatomb.log"
+
+# Get additional configuration information from /etc/rc.d/rc.mediatomb.conf:
+. /etc/rc.d/rc.mediatomb.conf
+
+mediatomb_start()
+{
+ echo -n "Starting mediatomb ... "
+ if [ -e "${MEDIATOMB_PIDFILE}" ]; then
+ echo "already running!"
+ else
+ if [ "${MEDIATOMB_INTERFACE}" != "" ]; then
+ MEDIATOMB_OPTIONS="$MEDIATOMB_OPTIONS --interface ${MEDIATOMB_INTERFACE}"
+ fi
+ if [ "${MEDIATOMB_PORT}" != "" ]; then
+ MEDIATOMB_OPTIONS="$MEDIATOMB_OPTIONS --port ${MEDIATOMB_PORT}"
+ fi
+ /usr/bin/mediatomb \
+ --daemon \
+ --user ${MEDIATOMB_USER} \
+ --group ${MEDIATOMB_GROUP} \
+ --pidfile ${MEDIATOMB_PIDFILE} \
+ --logfile ${MEDIATOMB_LOGFILE} \
+ --config ${MEDIATOMB_CONFIG} \
+ ${MEDIATOMB_OPTIONS}
+ echo "done!"
+ fi
+}
+
+mediatomb_stop()
+{
+ echo -n "Stopping mediatomb ... "
+ if [ -e "${MEDIATOMB_PIDFILE}" ]; then
+ kill -TERM $(cat ${MEDIATOMB_PIDFILE}) > /dev/null 2>&1
+ echo "done!"
+ rm -f "${MEDIATOMB_PIDFILE}"
+ else
+ echo "not running!"
+ fi
+}
+
+mediatomb_restart()
+{
+ mediatomb_stop
+ sleep 1
+ mediatomb_start
+}
+
+mediatomb_status()
+{
+ if [ -e "${MEDIATOMB_PIDFILE}" ]; then
+ echo "mediatomb is running!"
+ else
+ echo "mediatomb is not running!"
+ fi
+}
+
+case "$1" in
+'start')
+ mediatomb_start
+ ;;
+'stop')
+ mediatomb_stop
+ ;;
+'status')
+ mediatomb_status
+ ;;
+'restart')
+ mediatomb_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart|status"
+esac
diff --git a/network/mediatomb/rc.mediatomb.conf b/network/mediatomb/rc.mediatomb.conf
new file mode 100644
index 000000000000..af5ea4feef9c
--- /dev/null
+++ b/network/mediatomb/rc.mediatomb.conf
@@ -0,0 +1,21 @@
+# /etc/rc.d/rc.mediatomb.conf
+#
+# This file contains the configuration settings for mediatomb.
+
+# Main configuration file that should be used for mediatomb
+MEDIATOMB_CONFIG="/etc/mediatomb/config.xml"
+
+# The user under which mediatomb should run
+MEDIATOMB_USER="mediatomb"
+
+# The group under which mediatomb should run
+MEDIATOMB_GROUP="mediatomb"
+
+# Network Interface to bind to
+MEDIATOMB_INTERFACE=""
+
+# Server port (the SDK only permits values >= 49152)
+MEDIATOMB_PORT=""
+
+# Additional mediatomb options
+MEDIATOMB_OPTIONS=""
diff --git a/network/mediatomb/slack-desc b/network/mediatomb/slack-desc
new file mode 100644
index 000000000000..ddfff1fd22c3
--- /dev/null
+++ b/network/mediatomb/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------|
+mediatomb: mediatomb (UPnP Media Server)
+mediatomb:
+mediatomb: MediaTomb is an open source (GPL) UPnP MediaServer with a nice
+mediatomb: web user interface, it allows you to stream your digital media
+mediatomb: through your home network and listen to/watch it on a variety
+mediatomb: of UPnP compatible devices.
+mediatomb:
+mediatomb: Homepage: http://mediatomb.cc/
+mediatomb:
+mediatomb:
+mediatomb: