diff options
author | Chocobo1 | 2017-01-02 13:20:02 +0800 |
---|---|---|
committer | Chocobo1 | 2017-01-02 13:20:02 +0800 |
commit | b2116ca9a22fc30ea089874ac23cbaff5be8b9c7 (patch) | |
tree | 57247615fcd67e0e71e87aa5a346663964a46c68 | |
download | aur-b2116ca9a22fc30ea089874ac23cbaff5be8b9c7.tar.gz |
newpkg: miniupnpd-git r60.ge7068a7
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | miniupnpd.systemd | 14 |
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7b3cfca8e185 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = miniupnpd-git + pkgdesc = Lightweight UPnP IGD daemon (git) + pkgver = r60.ge7068a7 + pkgrel = 1 + url = http://miniupnp.free.fr + arch = i686 + arch = x86_64 + license = BSD + makedepends = git + makedepends = lsb-release + depends = iptables + depends = net-tools + depends = util-linux + backup = etc/miniupnpd/miniupnpd.conf + source = git+https://github.com/miniupnp/miniupnp.git + source = miniupnpd.systemd + sha256sums = SKIP + sha256sums = 66cd1ed0ae55c683910d46c2e486a8b52e48088b70248323cf894bc962ede48f + +pkgname = miniupnpd-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f8b8cc6d5b2e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> + +pkgname=miniupnpd-git +pkgver=r60.ge7068a7 +pkgrel=1 +pkgdesc="Lightweight UPnP IGD daemon (git)" +arch=('i686' 'x86_64') +url="http://miniupnp.free.fr" +license=('BSD') +backup=(etc/miniupnpd/miniupnpd.conf) +depends=('iptables' 'net-tools' 'util-linux') +makedepends=('git' 'lsb-release') +source=("git+https://github.com/miniupnp/miniupnp.git" + miniupnpd.systemd) +sha256sums=('SKIP' + '66cd1ed0ae55c683910d46c2e486a8b52e48088b70248323cf894bc962ede48f') + + +pkgver() { + cd "miniupnp" + + git describe --long --tags | sed 's/[^-]*-\(.*\)/r\1/;s/-/./g' +} + +build() { + cd "miniupnp/miniupnpd" + + CONFIG_OPTIONS="--ipv6 --leasefile" make -f Makefile.linux config.h + make -f Makefile.linux +} + +package() { + cd "miniupnp/miniupnpd" + + make PREFIX="$pkgdir" SBININSTALLDIR="$pkgdir/usr/bin" -f Makefile.linux install + + 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" + + 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/miniupnpd.systemd b/miniupnpd.systemd new file mode 100644 index 000000000000..7da147f6eea9 --- /dev/null +++ b/miniupnpd.systemd @@ -0,0 +1,14 @@ +[Unit] +Description=Lightweight UPnP IGD daemon +Documentation=man:miniupnpd(8) +After=network.target + +[Service] +Type=forking +ExecStartPre=/etc/miniupnpd/iptables_init.sh +ExecStart=/usr/bin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf +ExecStopPost=/etc/miniupnpd/iptables_removeall.sh +PIDFile=/run/miniupnpd.pid + +[Install] +WantedBy=network.target |