summaryrefslogtreecommitdiff
path: root/community/nethogs
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-05-17 22:43:03 +0000
committerroot <root@rshg047.dnsready.net>2011-05-17 22:43:03 +0000
commit4a67ab8a761f1d0ef59988a513f9f2163f94a869 (patch)
treeef060a1cf768b53a89958df6252193bda9c86d25 /community/nethogs
parent2f0d12506e7145c0fe4c056e4fbcda1e724dda95 (diff)
Tue May 17 22:43:03 UTC 2011
Diffstat (limited to 'community/nethogs')
-rw-r--r--community/nethogs/PKGBUILD28
-rw-r--r--community/nethogs/gcc44.patch11
2 files changed, 39 insertions, 0 deletions
diff --git a/community/nethogs/PKGBUILD b/community/nethogs/PKGBUILD
new file mode 100644
index 000000000..b07aa4762
--- /dev/null
+++ b/community/nethogs/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Kyle Keen <keenerd@gmail.com>
+# Contributor: ViNS <gladiator@fastwebnet.it>
+# Contributor: Daenyth
+pkgname=nethogs
+pkgver=0.7.0
+pkgrel=3
+pkgdesc="A net top tool which displays traffic used per process instead of per IP or interface"
+url="http://nethogs.sourceforge.net"
+license=(GPL)
+depends=(libpcap ncurses gcc-libs)
+arch=(i686 x86_64)
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz gcc44.patch)
+md5sums=('e5f04071571e469e14c89f637cfa34a2'
+ '62eb824fbbadd1c60d0749593c16d293')
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ sed -i '/sbin :=/ s/sbin/bin/g' Makefile
+
+ # Patch the code to work with gcc 4.4
+ patch -Np1 -i "$srcdir/gcc44.patch"
+
+ make
+ install -d "$pkgdir/usr/{bin,share/man/man8}"
+ make DESTDIR="$pkgdir/usr" install
+}
+# vim:set ts=2 sw=2 et:
diff --git a/community/nethogs/gcc44.patch b/community/nethogs/gcc44.patch
new file mode 100644
index 000000000..7fedbf978
--- /dev/null
+++ b/community/nethogs/gcc44.patch
@@ -0,0 +1,11 @@
+diff -ruN nethogs-old/conninode.cpp nethogs/conninode.cpp
+--- nethogs-old/conninode.cpp 2009-05-17 09:05:32.000000000 -0400
++++ nethogs/conninode.cpp 2009-05-17 09:06:47.000000000 -0400
+@@ -1,6 +1,7 @@
+ #include <netinet/in.h>
+ #include <map>
+ #include <stdlib.h>
++#include <cstdio>
+
+ #include "nethogs.h"
+ #include "conninode.h"