summaryrefslogtreecommitdiff
path: root/community/minidlna
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/minidlna
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/minidlna')
-rw-r--r--community/minidlna/PKGBUILD31
-rwxr-xr-xcommunity/minidlna/minidlna.rc47
2 files changed, 78 insertions, 0 deletions
diff --git a/community/minidlna/PKGBUILD b/community/minidlna/PKGBUILD
new file mode 100644
index 000000000..3df7e5720
--- /dev/null
+++ b/community/minidlna/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 43934 2011-03-31 20:13:41Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer:Biginoz < biginoz AT free point fr>
+# Contributor: Ignacio Galmarino <igalmarino@gmail.com>
+# Contributor: Matthias Sobczyk <matthias.sobczyk@googlemail.com>
+
+pkgname=minidlna
+pkgver=1.0.19
+pkgrel=2
+pkgdesc="A DLNA/UPnP-AV Media server (aka ReadyDLNA)"
+arch=('i686' 'x86_64')
+url="http://minidlna.sourceforge.net"
+license=('GPL')
+depends=('libexif' 'libjpeg' 'libid3tag' 'flac' 'libvorbis' 'ffmpeg' 'sqlite3')
+conflicts=('minidlna-cvs')
+backup=('etc/minidlna.conf')
+source=(http://downloads.sourceforge.net/minidlna/minidlna_${pkgver}_src.tar.gz
+ minidlna.rc)
+md5sums=('8bb5f2c0abc009e16039d7deecf09cf6'
+ '80c423f003894ad15d7de41f3ed342c0')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ DESTDIR=$pkgdir make install
+ install -D -m755 ${srcdir}/minidlna.rc ${pkgdir}/etc/rc.d/minidlna
+}
diff --git a/community/minidlna/minidlna.rc b/community/minidlna/minidlna.rc
new file mode 100755
index 000000000..e4ca0969f
--- /dev/null
+++ b/community/minidlna/minidlna.rc
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/minidlna.conf
+
+PID=`pidof -o %PPID /usr/sbin/minidlna`
+
+case "$1" in
+ start)
+ stat_busy "Starting minidlna"
+ [ -z "$PID" ] && /usr/sbin/minidlna
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon minidlna
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping minidlna"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon minidlna
+ stat_done
+ fi
+ ;;
+ clean)
+ $0 stop
+ sleep 1
+ stat_busy "Cleaning minidlna cache"
+ [ -z $db_dir ] || rm -r $db_dir/*
+ stat_done
+ sleep 1
+ $0 start
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|clean}"
+esac
+exit 0