aboutsummaryrefslogtreecommitdiffstats
path: root/testing/netsniff-ng/APKBUILD
blob: 8f80d6e98ebaf1eacbfe435537729839f8434206 (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
35
36
37
38
39
40
41
42
43
44
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=netsniff-ng
pkgver=0.5.6
pkgrel=0
pkgdesc="A network analyzer and networking toolkit"
url="http://netsniff-ng.org/"
arch="all"
license="GPL2"
depends=""
depends_dev=""
makedepends="cmake perl"
install=""
subpackages="$pkgname-doc"
source="http://www.netsniff-ng.org/pub/netsniff-ng/$pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"/src
	mkdir -p build && cd build
	cmake -D CMAKE_INSTALL_PREFIX=/usr ..
	make \
		BINDIR="/usr/sbin"		\
		ETCDIR="/etc"		\
		MANDIR="/usr/share/man" \
		|| return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install -C src/build || return 1
}

md5sums="9db3d2027c1f59437890f637178c1a02  netsniff-ng-0.5.6.tar.gz"