Browse Source

n/mediatomb: Removed.

slackware-14.2
Damien Goutte-Gattat 9 years ago
parent
commit
b10296d9a2
  1. 25
      n/mediatomb/doinst.sh
  2. 132
      n/mediatomb/mediatomb.SlackBuild
  3. 26
      n/mediatomb/mediatomb.xml
  4. 34
      n/mediatomb/rc.mediatomb
  5. 12
      n/mediatomb/slack-desc

25
n/mediatomb/doinst.sh

@ -1,25 +0,0 @@
#!/bin/sh
config()
{
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
rm $NEW
fi
}
config etc/mediatomb.xml.new
if ! grep ^mediatomb /etc/group > /dev/null ; then
/usr/sbin/groupadd -g 272 mediatomb
fi
if ! grep ^mediatomb /etc/passwd > /dev/null ; then
/usr/sbin/useradd -u 272 -c MediaTomb -d /var/lib/mediatomb -g mediatomb mediatomb
mkdir -p /var/lib/mediatomb
chown mediatomb:mediatomb /var/lib/mediatomb
fi
chown -f mediatomb:mediatomb etc/mediatomb.xml etc/mediatomb.xml.new

132
n/mediatomb/mediatomb.SlackBuild

@ -1,132 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2011,2013 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# 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.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest mediatomb sourcecode is available at: <http://mediatomb.cc/>.
#
# Optional: xap/ffmpeg
# Source package infos
NAMESRC=${NAMESRC:-mediatomb}
VERSION=${VERSION:-0.12.1}
REVISION=${REVISION:-b66dc1f0421b6b82c0241bb5cc8299c127babe32}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
REPOS=${REPOS:-git://mediatomb.git.sourceforge.net/gitroot/mediatomb/mediatomb}
# Build infos
NAMEPKG=${NAMEPKG:-mediatomb}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get the source
if [ ! -r $ARCHIVE ]; then
git clone $REPOS
cd mediatomb
git archive --prefix=$NAMESRC-$VERSION/ $REVISION | \
gzip -c > ../$ARCHIVE
cd ..
rm -rf mediatomb
fi
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Extract
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Compile
autoreconf -i
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--mandir=/usr/man
make -j $JOBS
make install-strip DESTDIR=$PKG
# Compress man pages
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 AUTHORS COPYING ChangeLog README \
doc/*.txt $PKG/usr/doc/$NAME
# Install control script and default configuration file
install -D -m 644 $CWD/rc.mediatomb $PKG/etc/rc.d/rc.mediatomb
install -m 644 $CWD/mediatomb.xml $PKG/etc/mediatomb.xml.new
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

26
n/mediatomb/mediatomb.xml

@ -1,26 +0,0 @@
<?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>
<port>49152</port>
<ip>127.0.0.1</ip>
<interface>lo</interface>
<name>MediaTomb</name>
<udn />
<home>/var/lib/mediatomb</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage caching="yes">
<sqlite3 enabled="yes">
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled="no">
<host>localhost</host>
<port>3306</port>
<username>mediatomb</username>
<password>mediatomb</password>
<database>mediatomb</database>
</mysql>
</storage>
</server>
</config>

34
n/mediatomb/rc.mediatomb

@ -1,34 +0,0 @@
#!/bin/sh
PIDFILE=/var/run/mediatomb.pid
case "$1" in
start)
/usr/bin/mediatomb -c /etc/mediatomb.xml -d \
-u mediatomb -g mediatomb -P $PIDFILE
;;
stop)
[ -f $PIDIFLE ] && kill -TERM `cat $PIDFILE`
rm -f $PIDFILE
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
if [ -f $PIDFILE ] && kill -0 `cat $PIDFILE` ; then
echo "Mediatomb is running"
else
echo "Mediatomb is not running"
fi
;;
*)
echo "usage: $0 {start|stop|restart}"
exit 1
;;
esac

12
n/mediatomb/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler----------------------------------------------------|
mediatomb: mediatomb (UPnP media server)
mediatomb:
mediatomb: MediaTomb is an open source (GPL) UPnP MediaServer with a nice web
mediatomb: user interface, it allows you to stream your digital media through
mediatomb: your home network and listen to/watch it on a variety of UPnP
mediatomb: compatible devices.
mediatomb:
mediatomb:
mediatomb:
mediatomb:
mediatomb:
Loading…
Cancel
Save