About

Supporting the site

App Repository‎ > ‎Archives‎ > ‎

minidlna-1.0.22

Overview

MiniDLNA requires zlib, libexif, libjpeg, libid3tag, libogg, libFLAC, libvorbis, ffmpeg, libuuid, and SQLite3. We cross-compile all of them and statically link everything for easy deployment.

Please note that the resulting compiled version may attempt to transcode media, as specified by the DLNA protocol. However, given the limitations of the DroboFS CPU, it will most likely cause stutter, or even not work at all. Unfortunately, there is nothing that can be done besides transcoding the media beforehand. Also, keep in mind that this is one of the largest DroboApps to date, given its large number of dependencies. Proceed with caution and patience.

Preparation

Make sure you have a cross-compiling virtual machine properly setup.

Compilation

export DEST=/mnt/DroboFS/Shares/DroboApps/minidlna
cd ~/code/

wget http://zlib.net/zlib-1.2.5.tar.gz
tar zxf zlib-1.2.5.tar.gz
cd zlib-1.2.5
CFLAGS="$CFLAGS -O3" ./configure --prefix=$DEST --static
make clean && make
ZLIB=`pwd`
cd ..

wget http://sourceforge.net/projects/e2fsprogs/files/e2fsprogs/1.42/e2fsprogs-libs-1.42.tar.gz
tar zxf e2fsprogs-libs-1.42.tar.gz
cd e2fsprogs-libs-1.42/
CFLAGS="$CFLAGS -O3" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --disable-elf-shlibs 
cd lib/uuid/
make clean && make
LIBUUID=`pwd`
cd ../../..

wget http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
tar zxf sqlite-autoconf-3070900.tar.gz
cd sqlite-autoconf-3070900/
CFLAGS="$CFLAGS -O3" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --disable-shared
make clean && make
SQLITE=`pwd`
cd ..

wget http://sourceforge.net/projects/libexif/files/libexif/0.6.20/libexif-0.6.20.tar.gz
tar zxf libexif-0.6.20.tar.gz 
cd libexif-0.6.20/
CFLAGS="$CFLAGS -O3" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --disable-shared
make clean && make
LIBEXIF=`pwd`
cd ..

wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar zxf jpegsrc.v8c.tar.gz
cd jpeg-8c/
CFLAGS="$CFLAGS -O3" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --enable-maxmem=32 --disable-shared
make clean && make
LIBJPEG=`pwd`
cd ..

wget http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
tar zxf libid3tag-0.15.1b.tar.gz 
cd libid3tag-0.15.1b/
CFLAGS="$CFLAGS -I$ZLIB -O3" LDFLAGS="$LDFLAGS -L$ZLIB" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --disable-shared
make clean && make
LIBID3TAG=`pwd`
cd ..

wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
tar zxf libogg-1.3.0.tar.gz 
cd libogg-1.3.0/
CFLAGS="$CFLAGS -O3" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --disable-shared
make clean && make
LIBOGG=`pwd`
cd ..

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz
tar zxf libvorbis-1.3.2.tar.gz 
cd libvorbis-1.3.2/
CFLAGS="$CFLAGS -O3" LDFLAGS="$LDFLAGS -L$LIBOGG/src/.libs" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --with-ogg=$LIBOGG --disable-shared
make clean && make
LIBVORBIS=`pwd`
cd ..

wget http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz
tar zxf flac-1.2.1.tar.gz 
cd flac-1.2.1/
CFLAGS="$CFLAGS -O3" LDFLAGS="$LDFLAGS -L$LIBOGG/src/.libs" ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --with-ogg=$LIBOGG --disable-shared
make clean && make
LIBFLAC=`pwd`
cd ..

wget http://www.ffmpeg.org/releases/ffmpeg-0.9.1.tar.gz
tar zxf ffmpeg-0.9.1.tar.gz
cd ffmpeg-0.9.1/
make distclean
./configure --enable-cross-compile --cross-prefix=arm-none-linux-gnueabi- --arch=armv5te --target-os=linux --prefix=$DEST --extra-cflags="$CFLAGS -I$ZLIB -O3" --extra-ldflags="$LDFLAGS -L$ZLIB" --enable-armv5te --enable-zlib --disable-shared --disable-debug
make
FFMPEG=`pwd`
cd ..

wget http://sourceforge.net/projects/minidlna/files/minidlna/1.0.22/minidlna_1.0.22_src.tar.gz
tar zxf minidlna_1.0.22_src.tar.gz 
cd minidlna-1.0.22/
wget -O config.h http://www.droboports.com/app-repository/minidlna-1-0-22/config.h
touch config.h
wget -O minidlna_multi.patch "http://sourceforge.net/tracker/download.php?group_id=243163&atid=1121518&file_id=381077&aid=3034326"
patch minidlna.c minidlna_multi.patch
sed -i -e "s|minidlna:.*|minidlna:\t\$(BASEOBJS) \$(LNXOBJS)|g" Makefile
make clean
make CFLAGS="$CFLAGS -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I$ZLIB -I$SQLITE -I$LIBUUID -I$LIBEXIF -I$LIBJPEG  -I$LIBID3TAG -I$LIBOGG/include -I$LIBFLAC/include -I$LIBVORBIS/include -I$FFMPEG -I$FFMPEG/libavutil -I$FFMPEG/libavcodec -I$FFMPEG/libavformat" LDFLAGS="$LDFLAGS -L$ZLIB -L$SQLITE/.libs -L$LIBUUID -L$LIBEXIF/libexif/.libs -L$LIBJPEG/.libs -L$LIBID3TAG/.libs -L$LIBOGG/src/.libs -L$LIBFLAC/src/libFLAC/.libs -L$LIBVORBIS/lib/.libs -L$FFMPEG/libavutil -L$FFMPEG/libavcodec -L$FFMPEG/libavformat" LIBS="-lsqlite3 -luuid -lexif -ljpeg -lavformat -lavcodec -lavutil -lid3tag -lFLAC -lvorbis -logg -lz -lpthread -ldl -lm" CC=$CC
make install DESTDIR=$DEST INSTALLPREFIX=$DEST LIBS=""
$STRIP $DEST/sbin/minidlna

Packaging

cd $DEST
mkdir -p var/cache var/log var/run
chmod -R a+w var
wget -O service.sh http://www.droboports.com/app-repository/minidlna-1-0-22/service.sh
chmod a+x service.sh
cd etc
rm minidlna.conf
wget -O minidlna.conf.default http://www.droboports.com/app-repository/minidlna-1-0-22/minidlna.conf.default
cd ..
~/bin/package.sh

Installing

Download the TGZ file below and place it in you DroboApps share. If you do not have SSH access, reboot your Drobo. Otherwise, SSH in and type:

/usr/bin/DroboApps.sh install

Final remarks

The default minidlna.conf indexes the content of the Public share. If you want to specify other folders, please have a look at the beginning of that file and edit accordingly. You may need to restart minidlna for the changes to take effect.

This version incorporates a patch to allow for several instances to run at the same time. Please visit this page to find more information about this feature.

Please visit the DroboSpace forums to leave your comments, suggestions and feedback.

ċ
config.h
Download
  1k v. 2 Jan 9, 2012, 6:31 AM Ricardo Padilha
ċ
minidlna.conf.default
Download
  2k v. 2 Jan 9, 2012, 6:31 AM Ricardo Padilha
ċ
minidlna.tgz
Download
DroboApp for DroboFS  4837k v. 2 Jan 9, 2012, 6:34 AM Ricardo Padilha
ċ
service.sh
Download
  1k v. 2 Jan 9, 2012, 6:32 AM Ricardo Padilha
Comments