summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD59
-rw-r--r--changelog4
-rw-r--r--minidlna.service16
-rw-r--r--minidlna.sysusers1
-rw-r--r--minidlna.tmpfiles5
-rw-r--r--minidlna_listen_interface.patch27
7 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..516a0a03e53
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = minidlna-listen-interface-fix
+ pkgdesc = A DLNA/UPnP-AV Media server (aka ReadyDLNA), with fixes from https://sourceforge.net/p/minidlna/bugs/297/
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = https://sourceforge.net/projects/minidlna/
+ changelog = changelog
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ 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 = minidlna::git+https://git.code.sf.net/p/minidlna/git#tag=v1_2_1
+ source = minidlna.service
+ source = minidlna.tmpfiles
+ source = minidlna.sysusers
+ source = minidlna_listen_interface.patch
+ sha512sums = SKIP
+ sha512sums = f428710f3ad2de007ba2e4e8937a0b9262b5c6b4a63da536190e2866ae48c35be81672e3b097c8eb479d5749dd07be40c5a6a8c98e9c0a10ba08607d56b1a590
+ sha512sums = c58631c20416997c538be6258ef9c13b9304d5906b19f063157df70f672b7153b452ffb9612be267a90942bd880af8d665ebe3c53a2926ffa99acc943d875d97
+ sha512sums = e3e6c46faac768b283134a47013b77c4152840c61d3503f51fbe154bf25fe8a0e585ed9a40950212254b4a844b007f674875e4d25f55af51914694213fecc420
+ sha512sums = ce477b6967ef045398e70d5c05c586abf048722cd886e9b2b9f72495c052baec931f5cabc73c148dbd11f200d242c6c85c62ac36e883767a18d57dea7fcb2cb1
+
+pkgname = minidlna-listen-interface-fix
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6837d83ebd1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Garfield <kiddyfurby AAT gmail com>
+# Contributor: Shrimpkin <https://sourceforge.net/u/shrimpkin/profile/>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: 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
+pkgname=minidlna-listen-interface-fix
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="A DLNA/UPnP-AV Media server (aka ReadyDLNA), with fixes from https://sourceforge.net/p/minidlna/bugs/297/"
+arch=('x86_64')
+url="https://sourceforge.net/projects/minidlna/"
+license=('GPL')
+depends=('libexif' 'libjpeg' 'libid3tag' 'flac' 'libvorbis' 'ffmpeg' 'sqlite')
+makedepends=('git')
+provides=('minidlna')
+conflicts=('minidlna' 'readymedia-transcode-git')
+backup=('etc/minidlna.conf')
+changelog=changelog
+source=("minidlna::git+https://git.code.sf.net/p/minidlna/git#tag=v${pkgver//./_}"
+ minidlna.service
+ minidlna.tmpfiles
+ minidlna.sysusers
+ minidlna_listen_interface.patch
+)
+sha512sums=('SKIP'
+ 'f428710f3ad2de007ba2e4e8937a0b9262b5c6b4a63da536190e2866ae48c35be81672e3b097c8eb479d5749dd07be40c5a6a8c98e9c0a10ba08607d56b1a590'
+ 'c58631c20416997c538be6258ef9c13b9304d5906b19f063157df70f672b7153b452ffb9612be267a90942bd880af8d665ebe3c53a2926ffa99acc943d875d97'
+ 'e3e6c46faac768b283134a47013b77c4152840c61d3503f51fbe154bf25fe8a0e585ed9a40950212254b4a844b007f674875e4d25f55af51914694213fecc420'
+ 'ce477b6967ef045398e70d5c05c586abf048722cd886e9b2b9f72495c052baec931f5cabc73c148dbd11f200d242c6c85c62ac36e883767a18d57dea7fcb2cb1'
+)
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+ sed -i 's|#user=.*|user=minidlna|g' minidlna.conf
+ patch -Np1 -i ../minidlna_listen_interface.patch
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+ [ -x configure ] || ./autogen.sh
+ ./configure --prefix=/usr --sbindir=/usr/bin
+ make
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+ 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"/$_pkgname/minidlna.conf.5 "$pkgdir"/usr/share/man/man5/minidlna.conf.5
+ install -Dm644 "$srcdir"/$_pkgname/minidlnad.8 "$pkgdir"/usr/share/man/man8/minidlnad.8
+}
diff --git a/changelog b/changelog
new file mode 100644
index 00000000000..35bf6239c47
--- /dev/null
+++ b/changelog
@@ -0,0 +1,4 @@
+2011-08-29 Sergej Pupykin <sergej@p5n.pp.ru>
+
+ * 1.0.22-3 :
+ add user configuration to /etc/conf.d/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..663222fe917
--- /dev/null
+++ b/minidlna.tmpfiles
@@ -0,0 +1,5 @@
+# systemd tmpfile settings for minidlna
+# See tmpfiles.d(5) for details
+
+d /run/minidlna 0755 minidlna minidlna -
+d /var/cache/minidlna 0755 minidlna minidlna -
diff --git a/minidlna_listen_interface.patch b/minidlna_listen_interface.patch
new file mode 100644
index 00000000000..b8620dcc80b
--- /dev/null
+++ b/minidlna_listen_interface.patch
@@ -0,0 +1,27 @@
+diff --git a/minidlna.c b/minidlna.c
+index 10b4806..2a274c7 100644
+--- a/minidlna.c
++++ b/minidlna.c
+@@ -126,7 +126,21 @@ OpenAndConfHTTPSocket(unsigned short port)
+ memset(&listenname, 0, sizeof(struct sockaddr_in));
+ listenname.sin_family = AF_INET;
+ listenname.sin_port = htons(port);
+- listenname.sin_addr.s_addr = htonl(INADDR_ANY);
++
++ /* TODO: network_interfaces supports 8 interfaces. */
++
++ /* bind to one network_interface, otherwise fallback to INADDR_ANY */
++ if (runtime_vars.ifaces[0] && !runtime_vars.ifaces[1]) {
++ reload_ifaces(0);
++ DPRINTF(E_INFO, L_GENERAL, "Using interface %s and address %s\n", runtime_vars.ifaces[0], lan_addr[0].str);
++ if (!lan_addr[0].str[0])
++ return -1;
++ listenname.sin_addr = lan_addr[0].addr;
++ }
++ else {
++ DPRINTF(E_WARN, L_GENERAL, "Using INADDR_ANY\n");
++ listenname.sin_addr.s_addr = htonl(INADDR_ANY);
++ }
+
+ if (bind(s, (struct sockaddr *)&listenname, sizeof(struct sockaddr_in)) < 0)
+ {