summaryrefslogtreecommitdiffstats
path: root/nettop/PKGBUILD
blob: 5fd86ad3d64d0fc7d91fc389597c165d628c6f95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=nettop
pkgver=0.2.3
pkgrel=3
pkgdesc="A program which looks like top, but is for network packets"
arch=('i686' 'x86_64')
url="http://srparish.net/scripts/"
license=('BSD')
depends=('slang' 'libpcap')
makedepends=('patch')
source=(http://www.sourcefiles.org/Networking/Tools/Scripts/$pkgname-$pkgver.tar.gz \
        $pkgname-$pkgver-compile.diff)

md5sums=('e76602717e79a26b0ab15ab6799fb1ef'
         '49a7768aeb22df656947448b5ef6e734')

build() {
  cd ${srcdir}/$pkgname-$pkgver
  patch -Np0 -i ${srcdir}/$pkgname-$pkgver-compile.diff || return 1

  install -d ${pkgdir}/usr/bin \
             ${pkgdir}/usr/share/{doc,licenses}/${pkgname} || return 1

  ./configure --prefix=/usr --sysconfdir=/etc/nettop || return 1
  make || return 1
  make prefix=${pkgdir}/usr install || return 1

# License
  cat ${srcdir}/$pkgname-$pkgver/${pkgname}.c | tail -n+3 | head -n26 > \
      ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1

  install -D -m644 ChangeLog README THANKS ${pkgdir}/usr/share/doc/${pkgname} || return 1
}