From 4ec41bff266d59247a08b043633aeb20ce06f9a0 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 12 Oct 2015 18:53:40 +0200 Subject: [PATCH] New package: minissdpd-1.4 --- srcpkgs/minissdpd/files/minissdpd/run | 4 +++ srcpkgs/minissdpd/patches/foreground.patch | 30 ++++++++++++++++++++++ srcpkgs/minissdpd/template | 21 +++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 srcpkgs/minissdpd/files/minissdpd/run create mode 100644 srcpkgs/minissdpd/patches/foreground.patch create mode 100644 srcpkgs/minissdpd/template diff --git a/srcpkgs/minissdpd/files/minissdpd/run b/srcpkgs/minissdpd/files/minissdpd/run new file mode 100644 index 0000000000..1d9999f814 --- /dev/null +++ b/srcpkgs/minissdpd/files/minissdpd/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec 2>&1 +exec minissdpd ${OPTS} -D diff --git a/srcpkgs/minissdpd/patches/foreground.patch b/srcpkgs/minissdpd/patches/foreground.patch new file mode 100644 index 0000000000..561adf8544 --- /dev/null +++ b/srcpkgs/minissdpd/patches/foreground.patch @@ -0,0 +1,30 @@ +diff --git minissdpd.c minissdpd.c +index 6295af9..39dddb6 100644 +--- minissdpd.c ++++ minissdpd.c +@@ -1066,6 +1066,7 @@ int main(int argc, char * * argv) + const char * sockpath = "/var/run/minissdpd.sock"; + const char * pidfilename = "/var/run/minissdpd.pid"; + int debug_flag = 0; ++ int foreground_flag = 0; + #ifdef ENABLE_IPV6 + int ipv6 = 0; + #endif /* ENABLE_IPV6 */ +@@ -1086,6 +1087,8 @@ int main(int argc, char * * argv) + { + if(0==strcmp(argv[i], "-d")) + debug_flag = 1; ++ else if(0==strcmp(argv[i], "-D")) ++ foreground_flag = 1; + #ifdef ENABLE_IPV6 + else if(0==strcmp(argv[i], "-6")) + ipv6 = 1; +@@ -1228,7 +1231,7 @@ int main(int argc, char * * argv) + #endif + + /* daemonize or in any case get pid ! */ +- if(debug_flag) ++ if(debug_flag || foreground_flag) + pid = getpid(); + else { + #ifdef USE_DAEMON diff --git a/srcpkgs/minissdpd/template b/srcpkgs/minissdpd/template new file mode 100644 index 0000000000..9aaa729cbc --- /dev/null +++ b/srcpkgs/minissdpd/template @@ -0,0 +1,21 @@ +# Template file for 'minissdpd' +pkgname=minissdpd +version=1.4 +revision=1 +build_style=gnu-makefile +makedepends="libnfnetlink-devel" +short_desc="MiniSSDP Daemon to speed up UPnP device discovery" +maintainer="Duncaen " +license="3-clause-BSD" +homepage="http://miniupnp.free.fr/minissdpd.html" +distfiles="http://miniupnp.free.fr/files/minissdpd-${version}.tar.gz" +checksum=46a2c7e9d45021e9a6e992f54a013f81b54e5900fe19dbc81ff9c2b40032a010 + +CFLAGS="-D_GNU_SOURCE" + +do_install() { + vbin minissdpd + vman minissdpd.1 + vlicense LICENSE + vsv minissdpd +}