added gtk-gnutella-upnp
authorHarvie <tomas@mudrunka.cz>
Sun, 11 Jul 2010 14:33:19 +0000 (16:33 +0200)
committerHarvie <tomas@mudrunka.cz>
Sun, 11 Jul 2010 14:33:19 +0000 (16:33 +0200)
bash/gtk-gnutella-upnp/PKGBUILD [new file with mode: 0644]
bash/gtk-gnutella-upnp/gtk-gnutella-upnp.desktop [new file with mode: 0644]
bash/gtk-gnutella-upnp/gtk-gnutella-upnp.sh [new file with mode: 0755]

diff --git a/bash/gtk-gnutella-upnp/PKGBUILD b/bash/gtk-gnutella-upnp/PKGBUILD
new file mode 100644 (file)
index 0000000..a298cbd
--- /dev/null
@@ -0,0 +1,23 @@
+# Maintainer:  Thomas Mudrunka <harvie@@email..cz>
+# Contributor: Thomas Mudrunka <harvie@@email..cz>
+# You can also contact me on http://blog.harvie.cz/
+
+pkgname=gtk-gnutella-upnp
+pkgver=1.0
+pkgrel=1
+pkgdesc="Small wrapper to automatically enable upnp port-forwarding for gtk-gnutella (doesn't work with port randomizing)"
+arch=('any')
+license=('GPL')
+url="http://gtk-gnutella.sourceforge.net/"
+depends=(gtk-gnutella miniupnpc)
+source=("gtk-gnutella-upnp.sh" "gtk-gnutella-upnp.desktop")
+md5sums=('943e64632715b699b23c149787ead1a3'
+         'a80c6de2b89bd3f2d13dca3869c81c27')
+
+build() {
+  mkdir -p ${pkgdir}/usr/bin
+       cp ${srcdir}/gtk-gnutella-upnp.sh ${pkgdir}/usr/bin/gtk-gnutella-upnp
+  mkdir -p ${pkgdir}/usr/share/applications
+       cp ${srcdir}/gtk-gnutella-upnp.desktop ${pkgdir}/usr/share/applications/
+       chmod -R 755 ${pkgdir}
+}
diff --git a/bash/gtk-gnutella-upnp/gtk-gnutella-upnp.desktop b/bash/gtk-gnutella-upnp/gtk-gnutella-upnp.desktop
new file mode 100644 (file)
index 0000000..d23565f
--- /dev/null
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=gtk-gnutella-upnp
+Comment=A GUI based Gnutella Servent (with UPnP)
+GenericName=P2P Client (with UPnP)
+TryExec=gtk-gnutella-upnp
+Exec=gtk-gnutella-upnp
+StartupNotify=false
+Terminal=false
+Type=Application
+Categories=GTK;Application;Network;FileTransfer;P2P;
+Icon=gtk-gnutella.png
diff --git a/bash/gtk-gnutella-upnp/gtk-gnutella-upnp.sh b/bash/gtk-gnutella-upnp/gtk-gnutella-upnp.sh
new file mode 100755 (executable)
index 0000000..d3e8347
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+upnpc="$(which upnpc)";
+gnet_port="$(grep listen_port ~/.gtk-gnutella/config_gnet | grep -o [0-9]* | head -n 1)";
+test "$gnet_port" -gt 1 || upnpc=true;
+"$upnpc" -r "$gnet_port" TCP "$gnet_port" TCP;
+"$upnpc" -r "$gnet_port" UDP "$gnet_port" UDP;
+echo -e '\n======================= GTK-GNUTELLA =======================\n'
+echo "listen_port=$gnet_port"
+gtk-gnutella $@;
+echo -e '\n===================== GTK-GNUTELLA-END =====================\n'
+"$upnpc" -d "$gnet_port" TCP "$gnet_port" UDP;
This page took 0.109289 seconds and 4 git commands to generate.