summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD52
-rw-r--r--minidlna-custom-icon.patch314
-rw-r--r--minidlna.install13
-rw-r--r--minidlna.service16
-rw-r--r--minidlna.sysusers1
-rw-r--r--minidlna.tmpfiles5
7 files changed, 434 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..345e72ba64a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = minidlna-custom-icon
+ pkgdesc = A DLNA/UPnP-AV Media server (aka ReadyDLNA) with patch to set a custom icon (instead of a tux)
+ pkgver = 1.1.5
+ pkgrel = 1
+ url = http://sourceforge.net/projects/minidlna/
+ install = minidlna.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = libexif
+ depends = libjpeg
+ depends = libid3tag
+ depends = flac
+ depends = libvorbis
+ depends = ffmpeg
+ depends = sqlite
+ provides = minidlna
+ conflicts = minidlna
+ conflicts = readymedia-transcode-git
+ backup = etc/minidlna.conf
+ source = http://downloads.sourceforge.net/project/minidlna/minidlna/1.1.5/minidlna-1.1.5.tar.gz
+ source = minidlna.service
+ source = minidlna.tmpfiles
+ source = minidlna.sysusers
+ source = minidlna-custom-icon.patch
+ md5sums = 1970e553a1eb8a3e7e302e2ce292cbc4
+ md5sums = 1f53adef7dfa12c1d4636737366b1d39
+ md5sums = a61f97b037ea17555f6632b3ffd761ef
+ md5sums = 5b2a57160589dfd559a23b1a7f365a23
+ md5sums = 2ea8a7cd48234900c9e510373d3d3d6a
+
+pkgname = minidlna-custom-icon
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6531a9513ee
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 141377 2015-09-21 11:12:32Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer:Biginoz < biginoz AT free point fr>
+# Contributor: Ignacio Galmarino <igalmarino@gmail.com>
+# Contributor: Matthias Sobczyk <matthias.sobczyk@googlemail.com>
+# Contributor: Kamil Kaminski <kyle@kkaminsk.com>
+
+pkgname=minidlna-custom-icon
+pkgver=1.1.5
+pkgrel=1
+pkgdesc="A DLNA/UPnP-AV Media server (aka ReadyDLNA) with patch to set a custom icon (instead of a tux)"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/minidlna/"
+license=('GPL')
+depends=('libexif' 'libjpeg' 'libid3tag' 'flac' 'libvorbis' 'ffmpeg' 'sqlite')
+provides=('minidlna')
+conflicts=('minidlna' 'readymedia-transcode-git')
+backup=('etc/minidlna.conf')
+install=minidlna.install
+source=(http://downloads.sourceforge.net/project/minidlna/minidlna/$pkgver/minidlna-$pkgver.tar.gz
+ minidlna.service
+ minidlna.tmpfiles
+ minidlna.sysusers
+ minidlna-custom-icon.patch)
+md5sums=('1970e553a1eb8a3e7e302e2ce292cbc4'
+ '1f53adef7dfa12c1d4636737366b1d39'
+ 'a61f97b037ea17555f6632b3ffd761ef'
+ '5b2a57160589dfd559a23b1a7f365a23'
+ '2ea8a7cd48234900c9e510373d3d3d6a')
+
+prepare() {
+ cd "$srcdir/minidlna-$pkgver"
+ sed -i 's|#user=.*|user=minidlna|g' minidlna.conf
+}
+
+build() {
+ cd "$srcdir/minidlna-$pkgver"
+ patch -Np1 -i ../minidlna-custom-icon.patch
+ ./configure --prefix=/usr --sbindir=/usr/bin
+ make
+}
+
+package() {
+ cd "$srcdir/minidlna-$pkgver"
+ DESTDIR=$pkgdir make install
+ install -Dm644 minidlna.conf ${pkgdir}/etc/minidlna.conf
+ install -Dm0644 $srcdir/minidlna.tmpfiles $pkgdir/usr/lib/tmpfiles.d/minidlna.conf
+ install -Dm0644 $srcdir/minidlna.sysusers $pkgdir/usr/lib/sysusers.d/minidlna.conf
+ install -Dm0644 $srcdir/minidlna.service $pkgdir/usr/lib/systemd/system/minidlna.service
+ install -Dm644 $srcdir/minidlna-$pkgver/minidlna.conf.5 $pkgdir/usr/share/man/man5/minidlna.conf.5
+ install -Dm644 $srcdir/minidlna-$pkgver/minidlnad.8 $pkgdir/usr/share/man/man8/minidlnad.8
+}
diff --git a/minidlna-custom-icon.patch b/minidlna-custom-icon.patch
new file mode 100644
index 00000000000..271aa66b6c7
--- /dev/null
+++ b/minidlna-custom-icon.patch
@@ -0,0 +1,314 @@
+diff --new-file -aur a/icons.c b/icons.c
+--- a/icons.c 2015-09-10 21:24:09.000000000 +0200
++++ b/icons.c 2015-11-15 13:42:18.581940515 +0100
+@@ -21,7 +21,7 @@
+ #ifdef NETGEAR
+ /* NG_Icon_48x48.png */
+ unsigned char
+-png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x30\x00\x00\x00\x30"
++_png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x30\x00\x00\x00\x30"
+ "\x08\x06\x00\x00\x00\x57\x02\xf9\x87\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72"
+ "\x65\x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\x79\x71\xc9\x65\x3c\x00\x00"
+ "\x03\x22\x69\x54\x58\x74\x58\x4d\x4c\x3a\x63\x6f\x6d\x2e\x61\x64\x6f\x62\x65\x2e\x78\x6d\x70\x00"
+@@ -138,7 +138,7 @@
+
+ /* NG_Icon_120x120.png */
+ unsigned char
+-png_lrg[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x78\x00\x00\x00\x78"
++_png_lrg[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x78\x00\x00\x00\x78"
+ "\x08\x06\x00\x00\x00\x39\x64\x36\xd2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72"
+ "\x65\x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\x79\x71\xc9\x65\x3c\x00\x00"
+ "\x03\x22\x69\x54\x58\x74\x58\x4d\x4c\x3a\x63\x6f\x6d\x2e\x61\x64\x6f\x62\x65\x2e\x78\x6d\x70\x00"
+@@ -355,7 +355,7 @@
+
+ /* NG_Icon_48x48.jpg */
+ unsigned char
+-jpeg_sm[] = "\xff\xd8\xff\xe1\x00\x18\x45\x78\x69\x66\x00\x00\x49\x49\x2a\x00\x08\x00\x00\x00\x00\x00\x00\x00"
++_jpeg_sm[] = "\xff\xd8\xff\xe1\x00\x18\x45\x78\x69\x66\x00\x00\x49\x49\x2a\x00\x08\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xff\xec\x00\x11\x44\x75\x63\x6b\x79\x00\x01\x00\x04\x00\x00\x00\x64\x00\x00\xff"
+ "\xe1\x03\x2b\x68\x74\x74\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\x65\x2e\x63\x6f\x6d\x2f\x78"
+ "\x61\x70\x2f\x31\x2e\x30\x2f\x00\x3c\x3f\x78\x70\x61\x63\x6b\x65\x74\x20\x62\x65\x67\x69\x6e\x3d"
+@@ -562,7 +562,7 @@
+
+ /* NG_Icon_120x120.jpg */
+ unsigned char
+-jpeg_lrg[] = "\xff\xd8\xff\xe1\x00\x18\x45\x78\x69\x66\x00\x00\x49\x49\x2a\x00\x08\x00\x00\x00\x00\x00\x00\x00"
++_jpeg_lrg[] = "\xff\xd8\xff\xe1\x00\x18\x45\x78\x69\x66\x00\x00\x49\x49\x2a\x00\x08\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xff\xec\x00\x11\x44\x75\x63\x6b\x79\x00\x01\x00\x04\x00\x00\x00\x64\x00\x00\xff"
+ "\xe1\x03\x2b\x68\x74\x74\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\x65\x2e\x63\x6f\x6d\x2f\x78"
+ "\x61\x70\x2f\x31\x2e\x30\x2f\x00\x3c\x3f\x78\x70\x61\x63\x6b\x65\x74\x20\x62\x65\x67\x69\x6e\x3d"
+@@ -1104,7 +1104,7 @@
+ #elif __FreeBSD__
+ /* Small Daemon PNG image */
+ unsigned char
+-png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x29\x00\x00\x00\x30"
++_png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x29\x00\x00\x00\x30"
+ "\x08\x06\x00\x00\x00\x8c\xb9\x53\xa5\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00"
+ "\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73"
+ "\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xdc\x03"
+@@ -1264,7 +1264,7 @@
+
+ /* Large Daemon PNG image */
+ unsigned char
+-png_lrg[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x66\x00\x00\x00\x78"
++_png_lrg[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x66\x00\x00\x00\x78"
+ "\x08\x06\x00\x00\x00\x00\x03\x87\x89\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00"
+ "\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73"
+ "\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xdc\x03"
+@@ -1932,7 +1932,7 @@
+
+ /* Small Daemon JPEG image */
+ unsigned char
+-jpeg_sm[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48\x00\x48\x00\x00\xff\xdb\x00\x43"
++_jpeg_sm[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48\x00\x48\x00\x00\xff\xdb\x00\x43"
+ "\x00\x05\x03\x04\x04\x04\x03\x05\x04\x04\x04\x05\x05\x05\x06\x07\x0c\x08\x07\x07\x07\x07\x0f\x0b"
+ "\x0b\x09\x0c\x11\x0f\x12\x12\x11\x0f\x11\x11\x13\x16\x1c\x17\x13\x14\x1a\x15\x11\x11\x18\x21\x18"
+ "\x1a\x1d\x1d\x1f\x1f\x1f\x13\x17\x22\x24\x22\x1e\x24\x1c\x1e\x1f\x1e\xff\xdb\x00\x43\x01\x05\x05"
+@@ -1984,7 +1984,7 @@
+
+ /* Large Daemon JPEG image */
+ unsigned char
+-jpeg_lrg[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48\x00\x48\x00\x00\xff\xdb\x00\x43"
++_jpeg_lrg[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48\x00\x48\x00\x00\xff\xdb\x00\x43"
+ "\x00\x05\x03\x04\x04\x04\x03\x05\x04\x04\x04\x05\x05\x05\x06\x07\x0c\x08\x07\x07\x07\x07\x0f\x0b"
+ "\x0b\x09\x0c\x11\x0f\x12\x12\x11\x0f\x11\x11\x13\x16\x1c\x17\x13\x14\x1a\x15\x11\x11\x18\x21\x18"
+ "\x1a\x1d\x1d\x1f\x1f\x1f\x13\x17\x22\x24\x22\x1e\x24\x1c\x1e\x1f\x1e\xff\xdb\x00\x43\x01\x05\x05"
+@@ -2127,7 +2127,7 @@
+ #else
+ /* Small Tux PNG image */
+ unsigned char
+-png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x29\x00\x00\x00\x30"
++_png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x29\x00\x00\x00\x30"
+ "\x08\x06\x00\x00\x00\x8c\xb9\x53\xa5\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00"
+ "\x08\xf3\x49\x44\x41\x54\x58\xc3\xc5\x99\x7b\x6c\x53\xd7\x19\xc0\x7f\xf7\x5e\x3f\x62\xe7\x69\x02"
+ "\x24\x4b\x52\xe2\x84\x24\x24\x24\x83\x50\x5a\x06\x6b\x80\x96\x74\xa5\x1b\x63\xd5\xe8\xd6\x69\x65"
+@@ -2229,7 +2229,7 @@
+
+ /* Large Tux PNG image */
+ unsigned char
+-png_lrg[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x66\x00\x00\x00\x78"
++_png_lrg[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x66\x00\x00\x00\x78"
+ "\x08\x06\x00\x00\x00\x00\x03\x87\x89\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00"
+ "\x20\x00\x49\x44\x41\x54\x78\xda\xed\x9d\x79\x78\x64\x55\x9d\xf7\x3f\xe7\xde\x5b\x7b\x65\xdf\xd3"
+ "\x7b\xd2\x49\xba\x09\xe9\x25\x0d\x74\xb3\x0c\x8d\xd0\x80\x88\xe0\x23\xa3\x88\x40\x3f\xe0\x20\xca"
+@@ -2588,7 +2588,7 @@
+
+ /* Small Tux JPEG image */
+ unsigned char
+-jpeg_sm[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x5a\x00\x5a\x00\x00\xff\xdb\x00\x43"
++_jpeg_sm[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x5a\x00\x5a\x00\x00\xff\xdb\x00\x43"
+ "\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x02\x02\x03\x02\x02\x02\x02\x02\x04\x03"
+ "\x03\x02\x03\x05\x04\x05\x05\x05\x04\x04\x04\x05\x06\x07\x06\x05\x05\x07\x06\x04\x04\x06\x09\x06"
+ "\x07\x08\x08\x08\x08\x08\x05\x06\x09\x0a\x09\x08\x0a\x07\x08\x08\x08\xff\xdb\x00\x43\x01\x01\x01"
+@@ -2673,7 +2673,7 @@
+
+ /* Large Tux JPEG image */
+ unsigned char
+-jpeg_lrg[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x5a\x00\x5a\x00\x00\xff\xdb\x00\x43"
++_jpeg_lrg[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x5a\x00\x5a\x00\x00\xff\xdb\x00\x43"
+ "\x00\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x02\x02\x03\x02\x02\x02\x02\x02\x04\x03"
+ "\x03\x02\x03\x05\x04\x05\x05\x05\x04\x04\x04\x05\x06\x07\x06\x05\x05\x07\x06\x04\x04\x06\x09\x06"
+ "\x07\x08\x08\x08\x08\x08\x05\x06\x09\x0a\x09\x08\x0a\x07\x08\x08\x08\xff\xdb\x00\x43\x01\x01\x01"
+@@ -2929,3 +2929,15 @@
+ "\x1e\x88\x20\xa8\xd8\xba\xe2\x7e\xdc\x26\x9a\x69\x08\xf7\x22\x22\x02\x82\x28\x82\x29\xe8\x88\x9e"
+ "\xda\x69\xa6\x90\x8f\xff\xd9";
+ #endif
++
++char *png_sm = (char*) _png_sm;
++size_t png_sm_size = sizeof(_png_sm);
++
++char *png_lrg = (char*) _png_lrg;
++size_t png_lrg_size = sizeof(_png_lrg);
++
++char *jpeg_sm = (char*) _jpeg_sm;
++size_t jpeg_sm_size = sizeof(_jpeg_sm);
++
++char *jpeg_lrg = (char*) _jpeg_lrg;
++size_t jpeg_lrg_size = sizeof(_jpeg_lrg);
+diff --new-file -aur a/icons.h b/icons.h
+--- a/icons.h 1970-01-01 01:00:00.000000000 +0100
++++ b/icons.h 2015-11-15 13:45:47.882281953 +0100
+@@ -0,0 +1,11 @@
++extern char *png_sm;
++extern size_t png_sm_size;
++
++extern char *png_lrg;
++extern size_t png_lrg_size;
++
++extern char *jpeg_sm;
++extern size_t jpeg_sm_size;
++
++extern char *jpeg_lrg;
++extern size_t jpeg_lrg_size;
+diff --new-file -aur a/minidlna.c b/minidlna.c
+--- a/minidlna.c 2015-09-10 21:24:09.000000000 +0200
++++ b/minidlna.c 2015-11-15 13:42:18.581940515 +0100
+@@ -94,6 +94,7 @@
+ #include "log.h"
+ #include "tivo_beacon.h"
+ #include "tivo_utils.h"
++#include "icons.h"
+
+ #if SQLITE_VERSION_NUMBER < 3005001
+ # warning "Your SQLite3 library appears to be too old! Please use 3.5.1 or newer."
+@@ -738,6 +739,68 @@
+ if (strtobool(ary_options[i].value))
+ SETFLAG(MERGE_MEDIA_DIRS_MASK);
+ break;
++ case ICON_PNG_SM:
++ case ICON_PNG_LRG:
++ case ICON_JPEG_SM:
++ case ICON_JPEG_LRG:
++ {
++ FILE *f = fopen(ary_options[i].value, "rb");
++ if (f == NULL)
++ {
++ DPRINTF(E_WARN, L_GENERAL, "Icon file not found: %s\n", ary_options[i].value);
++ DPRINTF(E_WARN, L_GENERAL, "Fallback to default icon!\n");
++ break;
++ }
++ fseek(f, 0, SEEK_END);
++ size_t fsize = ftell(f);
++ if (fsize >= 192*1024)
++ {
++ fclose(f);
++ DPRINTF(E_WARN, L_GENERAL, "Icon file to big! Maximum is 192kB! [%s]\n", ary_options[i].value);
++ DPRINTF(E_WARN, L_GENERAL, "Fallback to default icon!\n");
++ break;
++ }
++ fseek(f, 0, SEEK_SET);
++ char *data = malloc(fsize);
++ if (!data)
++ {
++ fclose(f);
++ DPRINTF(E_WARN, L_GENERAL, "Not enough memory to load icon!\n");
++ DPRINTF(E_WARN, L_GENERAL, "Fallback to default icon!\n");
++ break;
++ }
++ if (fread(data, 1, fsize, f) != fsize)
++ {
++ fclose(f);
++ free(data);
++ DPRINTF(E_WARN, L_GENERAL, "I/O error while reading icon file: %s!\n", ary_options[i].value);
++ DPRINTF(E_WARN, L_GENERAL, "Fallback to default icon!\n");
++ break;
++ }
++ fclose(f);
++
++ switch (ary_options[i].id)
++ {
++ case ICON_PNG_SM:
++ png_sm = data;
++ png_sm_size = fsize;
++ break;
++ case ICON_PNG_LRG:
++ png_lrg = data;
++ png_lrg_size = fsize;
++ break;
++ case ICON_JPEG_SM:
++ jpeg_sm = data;
++ jpeg_sm_size = fsize;
++ break;
++ case ICON_JPEG_LRG:
++ jpeg_lrg = data;
++ jpeg_lrg_size = fsize;
++ break;
++ default:;
++ }
++ }
++ break;
+ default:
+ DPRINTF(E_ERROR, L_GENERAL, "Unknown option in file %s\n",
+ optionsfile);
+diff --new-file -aur a/minidlna.conf.5 b/minidlna.conf.5
+--- a/minidlna.conf.5 2015-09-10 21:24:09.000000000 +0200
++++ b/minidlna.conf.5 2015-11-15 13:52:12.405695834 +0100
+@@ -163,6 +163,16 @@
+
+ .fi
+
++.IP "\fBicon_[format]_[size]\fP"
++Set these options to the filepath to your custom icon file.
++.nf
++The possible options are:
++ icon_png_small
++ icon_png_large
++ icon_jpeg_small
++ icon_jpeg_large
++.fi
++
+
+
+ .SH VERSION
+diff --new-file -aur a/options.c b/options.c
+--- a/options.c 2015-09-10 21:24:09.000000000 +0200
++++ b/options.c 2015-11-15 13:42:18.581940515 +0100
+@@ -64,7 +64,11 @@
+ { USER_ACCOUNT, "user" },
+ { FORCE_SORT_CRITERIA, "force_sort_criteria" },
+ { MAX_CONNECTIONS, "max_connections" },
+- { MERGE_MEDIA_DIRS, "merge_media_dirs" }
++ { MERGE_MEDIA_DIRS, "merge_media_dirs" },
++ { ICON_PNG_SM, "icon_png_small" },
++ { ICON_PNG_LRG, "icon_png_large" },
++ { ICON_JPEG_SM, "icon_jpeg_small" },
++ { ICON_JPEG_LRG, "icon_jpeg_large" }
+ };
+
+ int
+diff --new-file -aur a/options.h b/options.h
+--- a/options.h 2015-09-10 21:24:09.000000000 +0200
++++ b/options.h 2015-11-15 13:42:18.581940515 +0100
+@@ -57,7 +57,11 @@
+ USER_ACCOUNT, /* user account to run as */
+ FORCE_SORT_CRITERIA, /* force sorting by a given sort criteria */
+ MAX_CONNECTIONS, /* maximum number of simultaneous connections */
+- MERGE_MEDIA_DIRS /* don't add an extra directory level when there are multiple media dirs */
++ MERGE_MEDIA_DIRS, /* don't add an extra directory level when there are multiple media dirs */
++ ICON_PNG_SM, /* path to small png icon */
++ ICON_PNG_LRG, /* path to large png icon */
++ ICON_JPEG_SM, /* path to small jpeg icon */
++ ICON_JPEG_LRG /* path to large jpeg icon */
+ };
+
+ /* readoptionsfile()
+diff --new-file -aur a/upnphttp.c b/upnphttp.c
+--- a/upnphttp.c 2015-09-10 21:24:09.000000000 +0200
++++ b/upnphttp.c 2015-11-15 13:42:18.581940515 +0100
+@@ -1341,28 +1341,32 @@
+ {
+ DPRINTF(E_DEBUG, L_HTTP, "Sending small PNG icon\n");
+ data = (char *)png_sm;
+- size = sizeof(png_sm)-1;
++ //size = sizeof(png_sm)-1;
++ size = png_sm_size;
+ strcpy(mime+6, "png");
+ }
+ else if( strcmp(icon, "lrg.png") == 0 )
+ {
+ DPRINTF(E_DEBUG, L_HTTP, "Sending large PNG icon\n");
+ data = (char *)png_lrg;
+- size = sizeof(png_lrg)-1;
++ //size = sizeof(png_lrg)-1;
++ size = png_lrg_size;
+ strcpy(mime+6, "png");
+ }
+ else if( strcmp(icon, "sm.jpg") == 0 )
+ {
+ DPRINTF(E_DEBUG, L_HTTP, "Sending small JPEG icon\n");
+ data = (char *)jpeg_sm;
+- size = sizeof(jpeg_sm)-1;
++ //size = sizeof(jpeg_sm)-1;
++ size = jpeg_sm_size;
+ strcpy(mime+6, "jpeg");
+ }
+ else if( strcmp(icon, "lrg.jpg") == 0 )
+ {
+ DPRINTF(E_DEBUG, L_HTTP, "Sending large JPEG icon\n");
+ data = (char *)jpeg_lrg;
+- size = sizeof(jpeg_lrg)-1;
++ //size = sizeof(jpeg_lrg)-1;
++ size = jpeg_lrg_size;
+ strcpy(mime+6, "jpeg");
+ }
+ else
diff --git a/minidlna.install b/minidlna.install
new file mode 100644
index 00000000000..8337a5da5a1
--- /dev/null
+++ b/minidlna.install
@@ -0,0 +1,13 @@
+post_install() {
+ systemd-sysusers minidlna.conf
+ systemd-tmpfiles --create minidlna.conf
+ touch var/log/minidlna.log
+ chown minidlna:minidlna var/log/minidlna.log
+}
+
+post_upgrade() {
+ systemd-sysusers minidlna.conf
+ systemd-tmpfiles --create minidlna.conf
+ echo "-- minidlna uses minidlna/minidlna user/group now,"
+ echo "-- needs manual intervention in /var/cache/minidlna and /run/minidlna!"
+}
diff --git a/minidlna.service b/minidlna.service
new file mode 100644
index 00000000000..63df2606061
--- /dev/null
+++ b/minidlna.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=minidlna server
+After=network.target
+
+[Service]
+Type=simple
+User=minidlna
+Group=minidlna
+ExecStart=/usr/bin/minidlnad -S
+ProtectSystem=full
+ProtectHome=on
+PrivateDevices=on
+NoNewPrivileges=on
+
+[Install]
+WantedBy=multi-user.target
diff --git a/minidlna.sysusers b/minidlna.sysusers
new file mode 100644
index 00000000000..9fd884b0388
--- /dev/null
+++ b/minidlna.sysusers
@@ -0,0 +1 @@
+u minidlna - "minidlna server" /var/cache/minidlna
diff --git a/minidlna.tmpfiles b/minidlna.tmpfiles
new file mode 100644
index 00000000000..c679c1cdbdd
--- /dev/null
+++ b/minidlna.tmpfiles
@@ -0,0 +1,5 @@
+# systemd tmpfile settings for minidlna
+# See tmpfiles.d(5) for details
+
+d /var/run/minidlna 0755 minidlna minidlna -
+d /var/cache/minidlna 0755 minidlna minidlna -