summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2010-12-29 16:59:25 +0000
committerMichael Weber <xmw@gentoo.org>2010-12-29 16:59:25 +0000
commita8c288b004116138bd02f3967f716e33dc4d4fcc (patch)
tree61065dccd299bf7f6cd04f75ef6b5f5cbc16e7d8 /net-misc/minidlna/files
parentFix Manifests, no idea why they were broken (diff)
downloadgentoo-2-a8c288b004116138bd02f3967f716e33dc4d4fcc.tar.gz
gentoo-2-a8c288b004116138bd02f3967f716e33dc4d4fcc.tar.bz2
gentoo-2-a8c288b004116138bd02f3967f716e33dc4d4fcc.zip
Initial import
(Portage version: 2.1.9.25/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/minidlna/files')
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch11
-rw-r--r--net-misc/minidlna/files/minidlna.confd10
-rw-r--r--net-misc/minidlna/files/minidlna.initd48
3 files changed, 69 insertions, 0 deletions
diff --git a/net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch b/net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch
new file mode 100644
index 000000000000..2ce5e64cd422
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile
++++ Makefile
+@@ -12,7 +12,7 @@
+ #
+ #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG
+ #CFLAGS = -Wall -g -Os -D_GNU_SOURCE
+-CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
++CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -I/usr/include/ffmpeg \
+ -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \
+ -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat
diff --git a/net-misc/minidlna/files/minidlna.confd b/net-misc/minidlna/files/minidlna.confd
new file mode 100644
index 000000000000..4cc286c2b9a5
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna.confd
@@ -0,0 +1,10 @@
+# /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
diff --git a/net-misc/minidlna/files/minidlna.initd b/net-misc/minidlna/files/minidlna.initd
new file mode 100644
index 000000000000..bb20626138c4
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna.initd
@@ -0,0 +1,48 @@
+#!/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 $?
+}