aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hping3/APKBUILD
blob: c58c0e4a011932a251307107b64eac306a80204d (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
45
46
47
48
49
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=hping3
pkgver=20051105
pkgrel=2
pkgdesc="A ping-like TCP/IP packet assembler/analyzer"
url="http://www.hping.org"
arch="all"
license="GPL"
depends=""
makedepends="libpcap-dev"
install=
subpackages="$pkgname-doc"
source="http://www.hping.org/$pkgname-$pkgver.tar.gz
	hping3-bytesex.patch"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	sed -i -e 's:net/bpf.h:pcap/bpf.h:' libpcap_stuff.c script.c || return 1

	patch -p0 < "$srcdir"/hping3-bytesex.patch
}

build() {
	cd "$_builddir"

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--no-tcl

	make || return 1
}

package() {
	cd "$_builddir"

	install -m755 -D hping3 "$pkgdir"/usr/sbin/hping3
	ln -s hping3 "$pkgdir"/usr/sbin/hping
	ln -s hping3 "$pkgdir"/usr/sbin/hping2
	install -m644 -D docs/hping2.8 "$pkgdir"/usr/share/man/man8/hping2.8
	install -m644 -D docs/hping3.8 "$pkgdir"/usr/share/man/man8/hping3.8
}

md5sums="ca4ea4e34bcc2162aedf25df8b2d1747  hping3-20051105.tar.gz
f2a6d31aa1694cfebe325929f832fd78  hping3-bytesex.patch"