Subject: [alpine-devel] [PATCH] testing/minidlna: fix headers, remove CHOST and CBUILD, update initd

From: Peter Bui <[email-masked]>
Date: Sat, 23 Aug 2014 01:14:12 -0500

- Added missing headers to a few files to fix compilation errors.
- Removed CHOST and CBUILD which caused configure to error.
- Ensure /var/run/minidlna is writable by M_GROUP and M_USER.
---
 testing/minidlna/APKBUILD       | 12 +++++++-----
 testing/minidlna/headers.patch  | 20 ++++++++++++++++++++
 testing/minidlna/minidlna.initd |  4 ++++
 3 files changed, 31 insertions(+), 5 deletions(-)
 create mode 100644 testing/minidlna/headers.patch
 mode change 100644 => 100755 testing/minidlna/minidlna.initd

diff --git a/testing/minidlna/APKBUILD b/testing/minidlna/APKBUILD
index 6f84f2c..015108c 100644
--- a/testing/minidlna/APKBUILD
+++ b/testing/minidlna/APKBUILD
@@ -16,6 +16,7 @@ subpackages=""
 pkgusers="$pkgname"
 pkggroups="$pkgname"
 source="http://downloads.sourceforge.net/project/minidlna/minidlna/$pkgver/minidlna-$pkgver.tar.gz
+	headers.patch
 	$pkgname.initd
 	$pkgname.confd"
 
@@ -34,8 +35,6 @@ prepare() {
 build() {
 	cd "$_builddir"
 	./configure \
-		--build=$CBUILD \
-		--host=$CHOST \
 		--prefix=/usr \
 		|| return 1
 	make || return 1
@@ -52,11 +51,14 @@ package() {
 }
 
 md5sums="26484a84af3fceafdee26595aae097f7  minidlna-1.1.0.tar.gz
-b87ac6bcab9f51bc79daa4141bd4e9a7  minidlna.initd
+452a71cf87d610abbb3722c8dba8e69a  headers.patch
+56e2ca0edc0135a2d57ed7954ba5eefa  minidlna.initd
 59d14c1bf3cd637138bfa58db7255d78  minidlna.confd"
 sha256sums="c2ef2ebe4311d08a60a87ec0c86fbe5e7f4fd25b947841f1d71b0508c60a90e2  minidlna-1.1.0.tar.gz
-d3f2c77adb61de55dd857b1dde2a8494c85f9e4642d4a23527cbdf0496ef073b  minidlna.initd
+737eb9bac19da46a6b6549e551aad5ec576673644ea35c3e8c0f3ded75bef4b7  headers.patch
+9513a21d7b65e41a68f0012879a0ea465aa3a862f806048cc331cf8ae26d1eb2  minidlna.initd
 67603d65c6bd3918255f050cb5cfd6fc1373b024bca1ce728f03491a90d79e19  minidlna.confd"
 sha512sums="9240d857fc3927c06183c04c4d657c1b2b0596f63dbc549f331b52032698349e82244870f2ebf6f8bc8bf0ff5f2ff88df69b53d280f5e5f9b618a5de58ac6f57  minidlna-1.1.0.tar.gz
-db407248d7f3a711c9da3400319fd83e6531424993924d1755ebb53a1a94b12e3816355e4fa2d0f4be707785f820d6b7b5667c9a71a5364600748b647b179eab  minidlna.initd
+47c4525881bddb3412183bc89010e17307765baac477a2ee4133f91514399cd56a8674965c17e254151bf5477b4767c3b04cb0f4688f2af28b532dde8ea7f805  headers.patch
+9042ff0370105aef492ee7162fd6d69ccf13948fc517c7323e89ac51d3112ba170d306c76609a9aa53c7ac2d9f035a464d81875150af3c10147c1946c7ad8db4  minidlna.initd
 e209848af0d79069ac989ad61d3be610b4c0c2783a207a50463a25ec3811b04d1da3a2acde54749878bec44e1567874ede827b978d5472c00f6a855663e5cbf8  minidlna.confd"
diff --git a/testing/minidlna/headers.patch b/testing/minidlna/headers.patch
new file mode 100644
index 0000000..8e994db
--- /dev/null
+++ b/testing/minidlna/headers.patch
@@ -0,0 +1,20 @@
+--- ./minissdp.c.orig	2014-08-23 00:40:46.218655070 +0500
++++ ./minissdp.c	2014-08-23 00:41:17.972176864 +0500
+@@ -41,6 +41,7 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <errno.h>
++#include <sys/time.h>
+ 
+ #include "minidlnapath.h"
+ #include "upnphttp.h"
+--- ./clients.h.orig	2014-08-23 00:39:47.001636613 +0500
++++ ./clients.h	2014-08-23 00:39:56.545026648 +0500
+@@ -2,6 +2,7 @@
+ #define __CLIENTS_H__
+ #include <stdint.h>
+ #include <netinet/in.h>
++#include <time.h>
+ 
+ #define CLIENT_CACHE_SLOTS 20
+ 
diff --git a/testing/minidlna/minidlna.initd b/testing/minidlna/minidlna.initd
old mode 100644
new mode 100755
index 5236551..d04c4b3
--- a/testing/minidlna/minidlna.initd
+++ b/testing/minidlna/minidlna.initd
@@ -18,5 +18,9 @@ start_pre() {
 	if yesno "${RESCAN}"; then
 		command_args="$command_args -R"
 	fi
+
+	if ! [ -d /var/run/minidlna ]; then
+		install -d -o ${M_USER:-minidlna} -g ${M_GROUP:-minidlna} /var/run/minidlna
+	fi
 }
 
-- 
2.1.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---