summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Escobar2019-06-17 23:29:55 -0300
committerEduardo Escobar2019-06-17 23:29:55 -0300
commitfc3d70d397fe66151528a02bf0441c9d89adafcb (patch)
tree51ec7fa32131360035b5cdab64f15d25ea11df93
downloadaur-fc3d70d397fe66151528a02bf0441c9d89adafcb.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD45
-rw-r--r--nethogs.install16
3 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..820677014d7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = nethogs-git
+ pkgdesc = A net top tool which displays traffic used per process instead of per IP or interface. GIT version
+ pkgver = v0.8.5.r59.ga46b3d6
+ pkgrel = 1
+ url = https://github.com/raboof/nethogs
+ install = nethogs.install
+ arch = x86_64
+ license = GPL
+ depends = libpcap
+ depends = ncurses
+ depends = gcc-libs
+ provides = nethogs
+ conflicts = nethogs
+ source = nethogs::git+https://github.com/raboof/nethogs
+ md5sums = SKIP
+
+pkgname = nethogs-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b7e34efd317
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Eduardo Escobar <eduardoeae(at)gmail.com>
+pkgname=nethogs-git
+_pkgname=nethogs
+pkgver=v0.8.5.r59.ga46b3d6
+pkgrel=1
+pkgdesc="A net top tool which displays traffic used per process instead of per IP or interface. GIT version"
+arch=("x86_64")
+url="https://github.com/raboof/nethogs"
+license=("GPL")
+depends=("libpcap" "ncurses" "gcc-libs")
+provides=("nethogs")
+conflicts=("nethogs")
+install="nethogs.install"
+source=("nethogs::git+https://github.com/raboof/nethogs")
+md5sums=("SKIP")
+
+pkgver() {
+ cd "$_pkgname"
+ git describe --long | sed "s/\([^-]*-g\)/r\1/;s/-/./g"
+}
+
+prepare() {
+ cd "$_pkgname"
+ sed -i "s|/sbin|/bin|" src/MakeApp.mk
+ sed -i "s|/local||" Makefile
+}
+
+build() {
+ cd "$_pkgname"
+ unset CFLAGS
+ unset CXXFLAGS
+ make prefix="/usr"
+ make prefix="/usr" libnethogs
+}
+
+check() {
+ cd "$_pkgname"
+ make -k check
+}
+
+package() {
+ cd "$_pkgname"
+ make prefix="/usr" DESTDIR="$pkgdir" install
+ make prefix="/usr" DESTDIR="$pkgdir" install_lib
+}
diff --git a/nethogs.install b/nethogs.install
new file mode 100644
index 00000000000..5ee318d7c73
--- /dev/null
+++ b/nethogs.install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+message(){
+ echo "In order to be run by a non-root user, nethogs needs the cap_net_admin and cap_net_raw capabilities. These can be set on the executable by using the setcap command, as follows:
+
+sudo setcap \"cap_net_admin,cap_net_raw+pe\" /usr/local/sbin/nethogs
+"
+}
+
+post_upgrade(){
+ message
+}
+
+post_install(){
+ message
+}