aboutsummaryrefslogtreecommitdiffstats
path: root/testing/minidlna
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-11-19 20:21:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-11-19 20:21:31 +0000
commit4ab6246313f2d357aa6aafe30b0711ad9e26e56c (patch)
treecb7a750b32c98194cf9e7ab9ea1b17cd7de403fe /testing/minidlna
parent044801b10f02ef9a8419a68820fea7b5ed60d7ab (diff)
downloadaports-4ab6246313f2d357aa6aafe30b0711ad9e26e56c.tar.bz2
aports-4ab6246313f2d357aa6aafe30b0711ad9e26e56c.tar.xz
testing/minidlna: update to 1.0.25 and misc fixes
- create minidlna user - fix initd script - ship default config
Diffstat (limited to 'testing/minidlna')
-rw-r--r--testing/minidlna/APKBUILD16
-rw-r--r--testing/minidlna/ffmpeg.patch17
-rw-r--r--testing/minidlna/makefile.patch27
-rw-r--r--testing/minidlna/minidlna.confd4
-rw-r--r--testing/minidlna/minidlna.initd50
-rw-r--r--testing/minidlna/minidlna.pre-install6
6 files changed, 76 insertions, 44 deletions
diff --git a/testing/minidlna/APKBUILD b/testing/minidlna/APKBUILD
index 9589baaad1..1ec66a1eba 100644
--- a/testing/minidlna/APKBUILD
+++ b/testing/minidlna/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=minidlna
-pkgver=1.0.24
+pkgver=1.0.25
pkgrel=0
pkgdesc="A small dlna server"
url="http://sourceforge.net/projects/minidlna/"
@@ -11,9 +11,11 @@ depends=
depends_dev="libvorbis-dev libogg-dev libid3tag-dev libexif-dev jpeg-dev
sqlite-dev ffmpeg-dev flac-dev"
makedepends="$depends_dev"
-install=""
+install="minidlna.pre-install"
subpackages=""
source="http://downloads.sourceforge.net/minidlna/${pkgname}_${pkgver}_src.tar.gz
+ ffmpeg.patch
+ makefile.patch
$pkgname.initd
$pkgname.confd"
@@ -38,11 +40,13 @@ build() {
package() {
cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ make DESTDIR="$pkgdir" install install-conf || 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="be9b4c91e3fcde592dc3f9828098ca0f minidlna_1.0.24_src.tar.gz
-c9965792baec8d2dc6953c7e28eda8bd minidlna.initd
-6dc0cf1e59e0d53b910f306f81cb7e7f minidlna.confd"
+md5sums="d966256baf2f9b068b9de871ab5dade5 minidlna_1.0.25_src.tar.gz
+a7f73ca82e3ad1e5c4dae9900680bbbd ffmpeg.patch
+0eae51746bf6d0e85906bf2507200d10 makefile.patch
+f8afd49854ab20538b459f220165233b minidlna.initd
+59d14c1bf3cd637138bfa58db7255d78 minidlna.confd"
diff --git a/testing/minidlna/ffmpeg.patch b/testing/minidlna/ffmpeg.patch
new file mode 100644
index 0000000000..d55ddc089b
--- /dev/null
+++ b/testing/minidlna/ffmpeg.patch
@@ -0,0 +1,17 @@
+diff --git a/metadata.c b/metadata.c
+index 39a65ef..74d5488 100644
+--- a/metadata.c
++++ b/metadata.c
+@@ -30,9 +30,9 @@
+ #include "image_utils.h"
+ #include <jpeglib.h>
+ #include <setjmp.h>
+-#include <avutil.h>
+-#include <avcodec.h>
+-#include <avformat.h>
++#include <libavutil/avutil.h>
++#include <libavfilter/avcodec.h>
++#include <libavformat/avformat.h>
+ #include "tagutils/tagutils.h"
+
+ #include "upnpglobalvars.h"
diff --git a/testing/minidlna/makefile.patch b/testing/minidlna/makefile.patch
new file mode 100644
index 0000000000..a3be83f82c
--- /dev/null
+++ b/testing/minidlna/makefile.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile b/Makefile
+index 86e03a3..17871ea 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,13 +12,17 @@
+ #
+ #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 \
+- -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
++
++libavutil_cflags := $(shell pkg-config --cflags libavutil)
++libavformat_cflags := $(shell pkg-config --cflags libavformat)
++libavfilter_cflags := $(shell pkg-config --cflags libavfilter)
++
++CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I. \
++ $(libavutil_cflags) $(libavfilter_cflags) $(libavformat_clfags)
++
+ #STATIC_LINKING: CFLAGS += -DSTATIC
+ #STATIC_LINKING: LDFLAGS = -static
+-CC = gcc
++CC ?= gcc
+ RM = rm -f
+ INSTALL = install
+
diff --git a/testing/minidlna/minidlna.confd b/testing/minidlna/minidlna.confd
index 4cc286c2b9..97d15b00c3 100644
--- a/testing/minidlna/minidlna.confd
+++ b/testing/minidlna/minidlna.confd
@@ -7,4 +7,8 @@ RESCAN="false"
# The location of the config file
#CONFIG="/etc/minidlna.conf"
+# Specify the user/group minidlna should run as
+#M_USER="minidlna"
+#M_GROUP="minidlna"
+
# vim: ft=gentoo-conf-d
diff --git a/testing/minidlna/minidlna.initd b/testing/minidlna/minidlna.initd
index bb20626138..a31c5aea97 100644
--- a/testing/minidlna/minidlna.initd
+++ b/testing/minidlna/minidlna.initd
@@ -1,48 +1,22 @@
#!/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 $
+
+name="MiniDLNA"
+configfile="${CONFIG:-/etc/minidlna.conf}"
+start_stop_daemon_args="--user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna}"
+command=/usr/sbin/minidlna
+command_args="-f ${configfile}"
depend() {
need net
}
-start() {
- ebegin "Starting MiniDLNA"
- local params=""
- local stop=0
-
- if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
- params="$params -R"
+start_pre() {
+ if ! [ -f "${configfile}" ]; then
+ eerror "${configfile} is missing"
+ return 1
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 $?
+ if yesno "${RESCAN}"; then
+ command_args="$command_args -R"
fi
}
-stop() {
- ebegin "Stopping MiniDLNA"
- start-stop-daemon --stop --quiet --exec /usr/sbin/minidlna
- eend $?
-}
diff --git a/testing/minidlna/minidlna.pre-install b/testing/minidlna/minidlna.pre-install
new file mode 100644
index 0000000000..78fb2d47d5
--- /dev/null
+++ b/testing/minidlna/minidlna.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S minidlna 2>/dev/null
+adduser -S -H -h /var/run/minidlna -s /sbin/nologin -D -G minidlna \
+ minidlna 2>/dev/null
+exit 0