diff options
author | VinÃcius dos Santos Oliveira | 2015-06-25 00:49:44 -0300 |
---|---|---|
committer | VinÃcius dos Santos Oliveira | 2015-06-25 00:49:44 -0300 |
commit | 6678ae4f4487dc0685d2bbaeedc63ed3007e997a (patch) | |
tree | 9687f074828c67028cc5e4548cd54167573e8ed0 | |
download | aur-linuxigd.tar.gz |
Genesis commit
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | Makefile.patch | 26 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | igd-install-destdir.patch | 29 | ||||
-rw-r--r-- | igd-iptables-arch.patch | 12 | ||||
-rw-r--r-- | upnpd.conf | 11 | ||||
-rw-r--r-- | upnpd.service | 19 |
7 files changed, 178 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..23e3465bd875 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = linuxigd + pkgdesc = Linux UPnP Internet Gateway Device. + pkgver = 1.0 + pkgrel = 9 + url = http://linux-igd.sourceforge.net/ + arch = i686 + arch = x86_64 + license = GPL + depends = libupnp>=1.4.1 + depends = iptables + backup = etc/upnpd.conf + backup = etc/conf.d/upnpd + source = http://downloads.sourceforge.net/sourceforge/linux-igd/linuxigd-1.0.tar.gz + source = igd-iptables-arch.patch + source = igd-install-destdir.patch + source = Makefile.patch + source = upnpd.conf + source = upnpd.service + sha256sums = f6335273fd6bfad7fb32e94e36461e8b74f9523e7994bad8be9fac29bee9f4cd + sha256sums = f94d0cb9a4b2c4d5a8e080c0c6e7f84404253833979cbf89e38ec27364ec2f40 + sha256sums = 3eb373026af582b06bdc74bceccb038d98a97cddd9916bbf39de1fd42d90e6f8 + sha256sums = 04abf7e4dec6c09644c16269aec60b0e64396185df5937d324ff87bf022b488f + sha256sums = a2d9036fc288b1636aa9bf97cd76ecd3a70c8ff6c536537612586d50bf294feb + sha256sums = 1ed5dab4a28a5eeed738f1abf5576382da9f5fa364c14c0d74d86ad2908d6ee7 + +pkgname = linuxigd + diff --git a/Makefile.patch b/Makefile.patch new file mode 100644 index 000000000000..0983d5a1b15d --- /dev/null +++ b/Makefile.patch @@ -0,0 +1,26 @@ +--- a/Makefile 2011-12-18 21:28:20.784339431 +0100 ++++ b/Makefile 2011-12-18 21:29:07.699390803 +0100 +@@ -33,11 +33,11 @@ clean: + rm -f *.o upnpd + + install: upnpd +- install -d $(DESTDIR)/etc/linuxigd +- install etc/gatedesc.xml $(DESTDIR)/etc/linuxigd +- install etc/gateconnSCPD.xml $(DESTDIR)/etc/linuxigd +- install etc/gateicfgSCPD.xml $(DESTDIR)/etc/linuxigd +- install etc/dummy.xml $(DESTDIR)/etc/linuxigd ++ install -m700 -d $(DESTDIR)/etc/linuxigd ++ install -m600 etc/gatedesc.xml $(DESTDIR)/etc/linuxigd ++ install -m600 etc/gateconnSCPD.xml $(DESTDIR)/etc/linuxigd ++ install -m600 etc/gateicfgSCPD.xml $(DESTDIR)/etc/linuxigd ++ install -m600 etc/dummy.xml $(DESTDIR)/etc/linuxigd + install -d $(DESTDIR)$(PREFIX) + install -d $(DESTDIR)$(PREFIX)/sbin + install upnpd $(DESTDIR)$(PREFIX)/sbin +@@ -45,5 +45,5 @@ install: upnpd + install -d $(DESTDIR)$(PREFIX)/share/man/man8 + install upnpd.8 $(DESTDIR)$(PREFIX)/share/man/man8 + install -d $(DESTDIR)/etc +- if [ ! -f $(DESTDIR)/etc/upnpd.conf ]; then install etc/upnpd.conf $(DESTDIR)/etc; fi ++ if [ ! -f $(DESTDIR)/etc/upnpd.conf ]; then install -m600 etc/upnpd.conf $(DESTDIR)/etc; fi + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3a9508ee4cb3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +pkgname="linuxigd" +pkgver="1.0" +pkgrel=9 +pkgdesc="Linux UPnP Internet Gateway Device." +url="http://linux-igd.sourceforge.net/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('libupnp>=1.4.1' 'iptables') +#source=("http://downloads.sourceforge.net/sourceforge/linux-igd/$pkgname-$pkgver.tar.gz" +# 'igd-iptables-arch.patch' 'igd-install-destdir.patch' +# 'Makefile.patch' 'upnpd.rc' 'upnpd.conf' 'upnpd.init') +source=("http://downloads.sourceforge.net/sourceforge/linux-igd/$pkgname-$pkgver.tar.gz" + 'igd-iptables-arch.patch' 'igd-install-destdir.patch' + 'Makefile.patch' 'upnpd.conf' 'upnpd.service') +backup=('etc/upnpd.conf' 'etc/conf.d/upnpd') + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -p1 -i "$srcdir/igd-iptables-arch.patch" + patch -p1 -i "$srcdir/igd-install-destdir.patch" + patch -p1 -i "$srcdir/Makefile.patch" + + CFLAGS+=\ -D_GNU_SOURCE + sed -i '1i#include <stdio.h>' gatedevice.c pmlist.c + sed -i '1i#include <string.h>' main.c pmlist.c + make + +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + #install -d $pkgdir/etc/{rc,conf}.d + #install -d $pkgdir/usr/lib/upnpd + #install -m744 $srcdir/upnpd.rc $pkgdir/etc/rc.d/upnpd + install -d "$pkgdir/etc/conf.d" + #install -d $pkgdir/usr/lib/upnpd + install -d "$pkgdir/usr/lib/systemd/system" + install -m644 "$srcdir/upnpd.conf" "$pkgdir/etc/conf.d/upnpd" + #install -m744 $srcdir/upnpd.init $pkgdir/usr/lib/upnpd/upnpd + install -m644 "$srcdir/upnpd.service" "$pkgdir/usr/lib/systemd/system/upnpd.service" + install -d "$pkgdir/usr/bin" + mv "${pkgdir}/usr/sbin/upnpd" "${pkgdir}/usr/bin/upnpd" + rm -r "${pkgdir}/usr/sbin" +} + +sha256sums=('f6335273fd6bfad7fb32e94e36461e8b74f9523e7994bad8be9fac29bee9f4cd' + 'f94d0cb9a4b2c4d5a8e080c0c6e7f84404253833979cbf89e38ec27364ec2f40' + '3eb373026af582b06bdc74bceccb038d98a97cddd9916bbf39de1fd42d90e6f8' + '04abf7e4dec6c09644c16269aec60b0e64396185df5937d324ff87bf022b488f' + 'a2d9036fc288b1636aa9bf97cd76ecd3a70c8ff6c536537612586d50bf294feb' + '1ed5dab4a28a5eeed738f1abf5576382da9f5fa364c14c0d74d86ad2908d6ee7') + +# vim: ts=2 sw=2 et diff --git a/igd-install-destdir.patch b/igd-install-destdir.patch new file mode 100644 index 000000000000..2b882f3e5016 --- /dev/null +++ b/igd-install-destdir.patch @@ -0,0 +1,29 @@ +diff -u linuxigd-1.0/Makefile linuxigd-1.0-new/Makefile +--- linuxigd-1.0/Makefile 2006-05-23 19:16:36.000000000 -0300 ++++ linuxigd-1.0-new/Makefile 2007-08-04 18:49:15.000000000 -0300 +@@ -33,11 +33,17 @@ + rm -f *.o upnpd + + install: upnpd +- install -d /etc/linuxigd +- install etc/gatedesc.xml /etc/linuxigd +- install etc/gateconnSCPD.xml /etc/linuxigd +- install etc/gateicfgSCPD.xml /etc/linuxigd +- install etc/dummy.xml /etc/linuxigd +- install upnpd $(PREFIX)/sbin +- install upnpd.8 $(PREFIX)/share/man/man8 +- if [ ! -f /etc/upnpd.conf ]; then install etc/upnpd.conf /etc; fi ++ install -d $(DESTDIR)/etc/linuxigd ++ install etc/gatedesc.xml $(DESTDIR)/etc/linuxigd ++ install etc/gateconnSCPD.xml $(DESTDIR)/etc/linuxigd ++ install etc/gateicfgSCPD.xml $(DESTDIR)/etc/linuxigd ++ install etc/dummy.xml $(DESTDIR)/etc/linuxigd ++ install -d $(DESTDIR)$(PREFIX) ++ install -d $(DESTDIR)$(PREFIX)/sbin ++ install upnpd $(DESTDIR)$(PREFIX)/sbin ++ install -d $(DESTDIR)$(PREFIX)/share/man ++ install -d $(DESTDIR)$(PREFIX)/share/man/man8 ++ install upnpd.8 $(DESTDIR)$(PREFIX)/share/man/man8 ++ install -d $(DESTDIR)/etc ++ if [ ! -f $(DESTDIR)/etc/upnpd.conf ]; then install etc/upnpd.conf $(DESTDIR)/etc; fi ++ diff --git a/igd-iptables-arch.patch b/igd-iptables-arch.patch new file mode 100644 index 000000000000..b69b0e6764f9 --- /dev/null +++ b/igd-iptables-arch.patch @@ -0,0 +1,12 @@ +diff -ur linuxigd-1.0/etc/upnpd.conf linuxigd-1.0-new/etc/upnpd.conf +--- linuxigd-1.0/etc/upnpd.conf 2006-08-16 15:19:30.000000000 -0300 ++++ linuxigd-1.0-new/etc/upnpd.conf 2007-08-04 18:57:57.000000000 -0300 +@@ -5,7 +5,7 @@ + # The full path and name of the iptables executable, + # (enclosed in quotes). + # +-iptables_location = "/sbin/iptables" ++iptables_location = "/usr/sbin/iptables" + + # + # Daemon debug level. Messages are logged via syslog to debug. diff --git a/upnpd.conf b/upnpd.conf new file mode 100644 index 000000000000..c15856b1b033 --- /dev/null +++ b/upnpd.conf @@ -0,0 +1,11 @@ +# Configuration for Linux-IGD upnpd. + +# Internal interface (local network). +INTERNAL_INTERFACE="eth0" + +# External interface (Internet access). +EXTERNAL_INTERFACE="ppp0" + +# If set to "no", the multicast route will not be created. +ALLOW_MULTICAST="yes" + diff --git a/upnpd.service b/upnpd.service new file mode 100644 index 000000000000..060262d1e738 --- /dev/null +++ b/upnpd.service @@ -0,0 +1,19 @@ +# This service relies on a netcfg profile that adds a multicast route to the internal interface e.g.: +# ... +# IP=static +# ADDR=192.168.0.1 +# ROUTES=('224.0.0.0/4 via 192.168.0.1') +# ... +# Adjust the interface names in ExecStart below to match your external and internal interfaces. + +[Unit] +Description=Linux Internet Gateway Device +Requires=network.service +After=network.service + +[Service] +EnvironmentFile=/etc/conf.d/upnpd +ExecStart=/usr/sbin/upnpd -f $EXTERNAL_INTERFACE $INTERNAL_INTERFACE + +[Install] +WantedBy=multi-user.target |