--- /dev/null
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=minidlna
+PKG_VERSION:=1.0.18
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_src.tar.gz
+PKG_SOURCE_URL:=@SF/minidlna
+PKG_MD5SUM:=8681b100242f0a2fef93cab7cdef061e
+PKG_BUILD_DIR:=$(BUILD_DIR)/minidlna
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/minidlna
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE:=UPnP A/V & DLNA Media Server
+ URL:=http://minidlna.sourceforge.net/
+ DEPENDS:=+libintl +libiconv +libpthread +libexif +libjpeg \
++libsqlite3 +libffmpeg +libid3tag +libflac +libvorbis +libuuid
+endef
+
+define Package/minidlna/description
+ MiniDLNA (aka ReadyDLNA) is server software with the aim of
+ being fully compliant with DLNA/UPnP-AV clients.
+endef
+
+define Package/minidlna/install
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/minidlna.conf $(1)/etc/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlna $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
+endef
+
+$(eval $(call BuildPackage,minidlna))
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 OpenWrt.org
+
+START=50
+BIN=/usr/bin/minidlna
+PID=/var/run/minidlna.pid
+SSD=start-stop-daemon
+
+start() {
+ $SSD -p $PID -S -x $BIN -- -P $PID -R
+}
+
+stop() {
+ $SSD -p $PID -K -s SIGINT
+}
--- /dev/null
+--- a/genconfig.sh
++++ b/genconfig.sh
+@@ -24,22 +24,22 @@
+
+ # Detect if there are missing headers
+ # NOTE: This check only works with a normal distro
+-[ ! -e "/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"
+-[ ! -e "/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"
+-[ ! -e "/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"
+-[ ! -e "/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"
+-[ ! -e "/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"
+-[ ! -e "/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"
+-[ ! -e "/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"
+-[ ! -e "/usr/include/ffmpeg/avutil.h" -a \
+- ! -e "/usr/include/libavutil/avutil.h" -a \
+- ! -e "/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"
+-[ ! -e "/usr/include/ffmpeg/avformat.h" -a \
+- ! -e "/usr/include/libavformat/avformat.h" -a \
+- ! -e "/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"
+-[ ! -e "/usr/include/ffmpeg/avcodec.h" -a \
+- ! -e "/usr/include/libavcodec/avcodec.h" -a \
+- ! -e "/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/ffmpeg/avutil.h" -a \
++ ! -e "$STAGING_DIR/usr/include/libavutil/avutil.h" -a \
++ ! -e "$STAGING_DIR/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/ffmpeg/avformat.h" -a \
++ ! -e "$STAGING_DIR/usr/include/libavformat/avformat.h" -a \
++ ! -e "$STAGING_DIR/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"
++[ ! -e "$STAGING_DIR/usr/include/ffmpeg/avcodec.h" -a \
++ ! -e "$STAGING_DIR/usr/include/libavcodec/avcodec.h" -a \
++ ! -e "$STAGING_DIR/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"
+ if [ -n "$MISSING" ]; then
+ echo -e "\nERROR! Cannot continue."
+ echo -e "The following required libraries are either missing, or are missing development headers:\n"
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -13,9 +13,21 @@
+ #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
++ -I$(STAGING_DIR)/usr/include \
++ -I$(STAGING_DIR)/usr/include/FLAC \
++ -I$(STAGING_DIR)/usr/include/libavcodec \
++ -I$(STAGING_DIR)/usr/include/libavformat \
++ -I$(STAGING_DIR)/usr/include/libavutil \
++ -I$(STAGING_DIR)/usr/include/libexif \
++ -I$(STAGING_DIR)/usr/include/uuid \
++ -I$(STAGING_DIR)/usr/include/vorbis \
++ -I$(STAGING_DIR)/usr/lib/libiconv/include \
++ -I$(STAGING_DIR)/usr/lib/libintl/include
++LDFLAGS = -L$(STAGING_DIR)/usr/lib \
++ -L$(STAGING_DIR)/usr/lib/libintl/lib \
++ -L$(STAGING_DIR)/usr/lib/libiconv/lib \
++ -Wl,-rpath=$(STAGING_DIR)/usr/lib \
++ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+ #STATIC_LINKING: LDFLAGS = -static
+ CC = gcc
+ RM = rm -f
+@@ -36,7 +48,7 @@
+
+ ALLOBJS = $(BASEOBJS) $(LNXOBJS)
+
+-LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis
++LIBS = -lintl -liconv -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis -luuid
+ #STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm
+
+ TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
+@@ -58,7 +70,7 @@
+ $(INSTALL) -d $(ETCINSTALLDIR)
+ $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR)
+
+-minidlna: $(BASEOBJS) $(LNXOBJS) $(LIBS)
++minidlna: $(BASEOBJS) $(LNXOBJS)
+ @echo Linking $@
+ @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS)
+
--- /dev/null
+--- a/minidlna.c
++++ b/minidlna.c
+@@ -20,6 +20,7 @@
+ #include <fcntl.h>
+ #include <sys/file.h>
+ #include <sys/time.h>
++#include <sys/stat.h>
+ #include <time.h>
+ #include <signal.h>
+ #include <sys/param.h>
--- /dev/null
+--- a/minidlna.conf
++++ b/minidlna.conf
+@@ -2,7 +2,7 @@
+ port=8200
+
+ # network interface to bind to (this is the only interface that will serve files)
+-#network_interface=eth0
++network_interface=br-lan
+
+ # set this to the directory you want scanned.
+ # * if have multiple directories, you can have multiple media_dir= lines
+@@ -11,10 +11,10 @@
+ # + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)
+ # + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
+ # + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
+-media_dir=/opt
++media_dir=/mnt
+
+ # set this if you want to customize the name that shows up on your clients
+-#friendly_name=My DLNA Server
++friendly_name=My DLNA Server
+
+ # set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
+ #db_dir=/var/cache/minidlna
+@@ -25,7 +25,7 @@
+
+ # set this to no to disable inotify monitoring to automatically discover new files
+ # note: the default is yes
+-inotify=yes
++inotify=no
+
+ # set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
+ enable_tivo=no