aboutsummaryrefslogtreecommitdiffstats
path: root/main/libpcap/APKBUILD
blob: 1ccc184edf4f1431d9ac9cac8883173e0f777515 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libpcap
pkgver=1.6.2
_sover=1.0.0
pkgrel=0
pkgdesc="A system-independent interface for user-level packet capture"
url="http://www.tcpdump.org/"
arch="all"
license="BSD"
depends=
makedepends="bison flex autoconf"
source="http://www.tcpdump.org/release/$pkgname-$pkgver.tar.gz
	"
subpackages="$pkgname-doc $pkgname-dev"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in "$srcdir"/*.patch; do
		[ -r "$i" ] || continue
		msg "Applying $i..."
		patch -p1 -i $i || return 1
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-ipv6 \
		|| return 1
	# seems to be problem with timestamps
	sleep 1
	./config.status
	make all shared || return 1
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir/usr/bin"
	make -j1 DESTDIR="$pkgdir" install install-shared
}
md5sums="5f14191c1a684a75532c739c2c4059fa  libpcap-1.6.2.tar.gz"
sha256sums="5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690  libpcap-1.6.2.tar.gz"
sha512sums="e84fc2192b3ca34df679db6405205aff110d46bc7499b50f6da0c6f4c00381b403a03b632edc33d9314e3b2a17ba7fb876a6e391a2f06b3bd759372d62de485d  libpcap-1.6.2.tar.gz"