diff options
author | Nicolás Reynolds <fauno@parabola.nu> | 2013-05-07 22:24:18 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@parabola.nu> | 2013-05-07 22:24:18 -0300 |
commit | da483892765a9334d375a500f05a4431ee928e15 (patch) | |
tree | ec8d55ab47d284b296ad0544e59e0eae2a78e423 | |
parent | 2a96914890c8e562f895094e0677c0353fa33d9c (diff) |
update + ipv6 support
-rw-r--r-- | pcr/miniupnpd/PKGBUILD | 40 | ||||
-rw-r--r-- | pcr/miniupnpd/miniupnpd.init | 51 |
2 files changed, 16 insertions, 75 deletions
diff --git a/pcr/miniupnpd/PKGBUILD b/pcr/miniupnpd/PKGBUILD index 30108d4d5..543002e04 100644 --- a/pcr/miniupnpd/PKGBUILD +++ b/pcr/miniupnpd/PKGBUILD @@ -1,49 +1,41 @@ # $Id$ # Maintainer: None pkgname=miniupnpd -pkgver=1.7.20121005 -pkgrel=4 +pkgver=1.8.20130503 +pkgrel=1 pkgdesc="Lightweight UPnP IGD daemon" arch=('i686' 'x86_64' 'mips64el') url="http://miniupnp.free.fr" license=('BSD') backup=(etc/miniupnpd/miniupnpd.conf) -depends=('libnfnetlink') -source=("http://miniupnp.free.fr/files/$pkgname-$pkgver.tar.gz" miniupnpd.init miniupnpd.systemd) -sha1sums=('4579c4711a8455bf455f3757ac9ce0dc40088901' - 'c84031d7af122c5bede8609bcfa80bc31f2a5e61' - '9cf48feb98dadee8a566b2dc7811a95020ad3895') - -_ipt_arch_ver=$(pacman -Ss iptables | awk '/\/iptables/ { print $2 }') -depends+=("iptables=$_ipt_arch_ver") +depends=('libnfnetlink' 'iptables>=1.4.3') +makedepends=('lsb-release') +source=("http://miniupnp.free.fr/files/$pkgname-$pkgver.tar.gz" + miniupnpd.systemd) +md5sums=('484dbda7c428b2d5f3768500a48d3375' + 'f862f79b673359adc80faf0be914394f' + '2cc73f661cacb2fa374eee3d1030f428') build() { - ipt_upstream_ver=iptables-${_ipt_arch_ver%%-*} - if [ ! -d $ipt_upstream_ver ]; then - curl -O "http://www.iptables.org/projects/iptables/files/${ipt_upstream_ver}.tar.bz2" - bsdtar -jxvf $ipt_upstream_ver.tar.bz2 - fi - - cd "$srcdir/$ipt_upstream_ver" - ./configure --enable-static - make - cd "$srcdir/$pkgname-$pkgver" - make -f Makefile.linux config.h - IPTABLESPATH="$srcdir/$ipt_upstream_ver" make -f Makefile.linux + + CONFIG_OPTIONS="--strict --ipv6" make -f Makefile.linux config.h + make -f Makefile.linux } package() { cd "$srcdir/$pkgname-$pkgver" mkdir -p "$pkgdir/usr/share/man/man8" + make PREFIX="$pkgdir/" -f Makefile.linux install + rm -r "${pkgdir}/etc/init.d" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm755 "${srcdir}/miniupnpd.init" "${pkgdir}/etc/rc.d/miniupnpd" install -Dm644 "${srcdir}/miniupnpd.systemd" "${pkgdir}/usr/lib/systemd/system/miniupnpd.service" + sed -i 's:/sbin/iptables:/usr/sbin/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/pcr/miniupnpd/miniupnpd.init b/pcr/miniupnpd/miniupnpd.init deleted file mode 100644 index e09ac3ade..000000000 --- a/pcr/miniupnpd/miniupnpd.init +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -MINIUPNPD=/usr/sbin/miniupnpd -ARGS='-f /etc/miniupnpd/miniupnpd.conf' -PIDFILE='/var/run/miniupnpd.pid' -IPTABLES_CREATE=/etc/miniupnpd/iptables_init.sh -IPTABLES_REMOVE=/etc/miniupnpd/iptables_removeall.sh - -. /etc/rc.d/functions - -case "$1" in - start) - stat_busy "Starting MiniUPNPd" - - if ! pidof -o %PPID $MINIUPNPD &> /dev/null; then - rm -f "$PIDFILE" - fi - - $IPTABLES_CREATE > /dev/null 2>&1 - - PID="$(cat "$PIDFILE" 2> /dev/null)" - - if [ -z "$PID" ] && $MINIUPNPD $ARGS; then - add_daemon miniupnpd - stat_done - else - stat_fail - fi - ;; - stop) - stat_busy "Stopping MiniUPNPd" - PID="$(cat "$PIDFILE" 2> /dev/null)" - if [ -n "$PID" ] && kill "$PID" &> /dev/null; then - rm -f "$PIDFILE" - rm_daemon miniupnpd - stat_done - else - stat_fail - fi - ;; - restart) - "$0" stop - sleep 1 - "$0" start - ;; - *) - echo "Usage: /etc/rc.d/miniupnpd {start|stop|restart}" - exit 2 - ;; -esac -exit 0 |