Commit f5ec1322 authored by Carlo Landmeter's avatar Carlo Landmeter

testing/minidlna: new aport

fixes #576
parent 82dc433e
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=minidlna
pkgver=1.0.19
pkgrel=0
pkgdesc="A small dlna server"
url="http://sourceforge.net/projects/minidlna/"
arch="all"
license="GPL"
depends=
depends_dev="libvorbis-dev libogg-dev libid3tag-dev libexif-dev jpeg-dev
sqlite-dev ffmpeg-dev flac-dev"
makedepends="$depends_dev"
install=""
subpackages=""
source="http://downloads.sourceforge.net/minidlna/${pkgname}_${pkgver}_src.tar.gz
$pkgname.initd
$pkgname.confd"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
# fix for busybox install
sed -i 's/--mode=0644/-m0644/g' Makefile || return 1
}
build() {
cd "$_builddir"
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
install -m644 -D "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
}
md5sums="8bb5f2c0abc009e16039d7deecf09cf6 minidlna_1.0.19_src.tar.gz
c9965792baec8d2dc6953c7e28eda8bd minidlna.initd
6dc0cf1e59e0d53b910f306f81cb7e7f minidlna.confd"
# /etc/conf.d/minidlna
# Should minidlna rescan the entire collection on startup?
# Warning: This may take a long time!
RESCAN="false"
# The location of the config file
#CONFIG="/etc/minidlna.conf"
# vim: ft=gentoo-conf-d
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/files/minidlna.initd,v 1.1 2010/12/29 16:59:25 xmw Exp $
depend() {
need net
}
start() {
ebegin "Starting MiniDLNA"
local params=""
local stop=0
if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
params="$params -R"
fi
#set the config file and check if it exists
if [ -z "${CONFIG}" ]; then
if [ ! -f "/etc/minidlna.conf" ]; then
ewarn "You did not set the config file correctly"
stop=1
fi
params="$params -f /etc/minidlna.conf"
else
if [ ! -f "${CONFIG}" ]; then
ewarn "The specified config file does not exist"
stop=1
fi
params="$params -f ${CONFIG}"
fi
if [ $stop -eq 1 ]; then
eend 1
else
start-stop-daemon --start \
--exec /usr/sbin/minidlna -- ${params}
eend $?
fi
}
stop() {
ebegin "Stopping MiniDLNA"
start-stop-daemon --stop --quiet --exec /usr/sbin/minidlna
eend $?
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment