summaryrefslogtreecommitdiff
path: root/community/miniupnpd
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-04-24 03:30:57 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-04-24 03:30:57 +0000
commit431023a318e680258f02c1fb5fdca176c68e5cb7 (patch)
treecedbdd37d2a93310636cf71c781041a2b5ee68a3 /community/miniupnpd
parent0459e6459ee534bf22ab8a5381cd485e6035e9e2 (diff)
Thu Apr 24 03:25:33 UTC 2014
Diffstat (limited to 'community/miniupnpd')
-rw-r--r--community/miniupnpd/PKGBUILD40
-rw-r--r--community/miniupnpd/miniupnpd-1.8.20140401-foreground.patch40
-rw-r--r--community/miniupnpd/miniupnpd.systemd3
3 files changed, 65 insertions, 18 deletions
diff --git a/community/miniupnpd/PKGBUILD b/community/miniupnpd/PKGBUILD
index 4cfee322b..559f9443f 100644
--- a/community/miniupnpd/PKGBUILD
+++ b/community/miniupnpd/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 109008 2014-04-09 11:00:33Z tredaelli $
+# $Id: PKGBUILD 110046 2014-04-23 15:59:45Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: fauno <fauno@parabola.nu>
pkgname=miniupnpd
pkgver=1.8.20140401
-pkgrel=1
+pkgrel=2
pkgdesc="Lightweight UPnP IGD daemon"
arch=('i686' 'x86_64')
url="http://miniupnp.free.fr"
@@ -12,30 +12,38 @@ backup=(etc/miniupnpd/miniupnpd.conf)
depends=('libnfnetlink' 'iptables' 'net-tools' 'util-linux')
makedepends=('lsb-release')
source=("http://miniupnp.free.fr/files/$pkgname-$pkgver.tar.gz"
+ miniupnpd-1.8.20140401-foreground.patch
miniupnpd.systemd)
sha256sums=('086dfffa59e8e86e792b73a71d275fec55ef17fe3e94a8c140301aceb05bcdbd'
- '2707d028f28fbb28c3a9d13605c9c738e9628f828e22288a8a1492ac93f9ad7c')
+ '79350f2dbb695b58744aa9036d34a7dfdcfc97cf0f5f3419b86bd9ca58482f8e'
+ 'baac6223eb35729ea301bd658dc2df6aad5396c7c0b1ec15c8aac1803ef37f6a')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -p0 -i "$srcdir"/miniupnpd-1.8.20140401-foreground.patch
+}
build() {
- cd "$pkgname-$pkgver"
+ cd "$pkgname-$pkgver"
- CONFIG_OPTIONS="--strict --ipv6 --leasefile" make -f Makefile.linux config.h
- make -f Makefile.linux
+ CONFIG_OPTIONS="--strict --ipv6 --leasefile" make -f Makefile.linux config.h
+ make -f Makefile.linux
}
package() {
- cd "$pkgname-$pkgver"
- mkdir -p "$pkgdir/usr/share/man/man8"
+ cd "$pkgname-$pkgver"
+ mkdir -p "$pkgdir/usr/share/man/man8"
- make PREFIX="$pkgdir/" SBININSTALLDIR="$pkgdir/usr/bin" -f Makefile.linux install
+ make PREFIX="$pkgdir/" SBININSTALLDIR="$pkgdir/usr/bin" -f Makefile.linux install
- rm -r "${pkgdir}/etc/init.d"
+ rm -r "${pkgdir}/etc/init.d"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 "${srcdir}/miniupnpd.systemd" "${pkgdir}/usr/lib/systemd/system/miniupnpd.service"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${srcdir}/miniupnpd.systemd" "${pkgdir}/usr/lib/systemd/system/miniupnpd.service"
- sed -i 's:/s\?bin/iptables:/usr/bin/iptables:
- s:eth0:"`cat /etc/miniupnpd/miniupnpd.conf | '"awk -F= '/^ext_ifname/ { print \$2 }'"'`":' "${pkgdir}"/etc/miniupnpd/*.sh
- sed -i -e "s/^uuid=[-0-9a-f]*/uuid=00000000-0000-0000-0000-000000000000/
- s/make genuuid/uuidgen/" "${pkgdir}/etc/miniupnpd/miniupnpd.conf"
+ sed -i 's:/s\?bin/iptables:/usr/bin/iptables:
+ s:eth0:"`cat /etc/miniupnpd/miniupnpd.conf | '"awk -F= '/^ext_ifname/ { print \$2 }'"'`":' "${pkgdir}"/etc/miniupnpd/*.sh
+ sed -i -e "s/^uuid=[-0-9a-f]*/uuid=00000000-0000-0000-0000-000000000000/
+ s/make genuuid/uuidgen/" "${pkgdir}/etc/miniupnpd/miniupnpd.conf"
}
diff --git a/community/miniupnpd/miniupnpd-1.8.20140401-foreground.patch b/community/miniupnpd/miniupnpd-1.8.20140401-foreground.patch
new file mode 100644
index 000000000..7d40fadc7
--- /dev/null
+++ b/community/miniupnpd/miniupnpd-1.8.20140401-foreground.patch
@@ -0,0 +1,40 @@
+--- ./miniupnpd.c.orig 2014-04-23 15:41:11.783562093 +0000
++++ ./miniupnpd.c 2014-04-23 15:43:19.672842038 +0000
+@@ -797,7 +797,7 @@
+ {
+ int i;
+ int pid;
+- int debug_flag = 0;
++ int debug_flag = 0, foreground_flag = 0;
+ int openlog_option;
+ struct sigaction sa;
+ /*const char * logfilename = 0;*/
+@@ -1159,6 +1159,9 @@
+ case 'd':
+ debug_flag = 1;
+ break;
++ case 'D':
++ foreground_flag = 1;
++ break;
+ case 'w':
+ if(i+1 < argc)
+ presurl = argv[++i];
+@@ -1273,7 +1276,7 @@
+ goto print_usage;
+ }
+
+- if(debug_flag)
++ if(debug_flag || foreground_flag)
+ {
+ pid = getpid();
+ }
+@@ -1413,7 +1416,8 @@
+ "\tNotify interval is in seconds. Default is 30 seconds.\n"
+ "\tDefault pid file is '%s'.\n"
+ "\tDefault config file is '%s'.\n"
+- "\tWith -d miniupnpd will run as a standard program.\n"
++ "\tWith -D miniupnpd will run as a standard program.\n"
++ "\tWith -d miniupnpd will run as a standard program in debug mode.\n"
+ #if defined(USE_PF) || defined(USE_IPF)
+ "\t-L sets packet log in pf and ipf on.\n"
+ #endif
diff --git a/community/miniupnpd/miniupnpd.systemd b/community/miniupnpd/miniupnpd.systemd
index 88973535c..304c4fe8e 100644
--- a/community/miniupnpd/miniupnpd.systemd
+++ b/community/miniupnpd/miniupnpd.systemd
@@ -3,10 +3,9 @@ Description=Lightweight UPnP IGD daemon
[Service]
ExecStartPre=/etc/miniupnpd/iptables_init.sh
-ExecStart=/usr/bin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf -d
+ExecStart=/usr/bin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf -D
ExecStopPost=/etc/miniupnpd/iptables_removeall.sh
PIDFile=/run/miniupnpd.pid
-StandardOutput=null
[Install]
WantedBy=network.target