aboutsummaryrefslogtreecommitdiffstats
path: root/main/libpcap/APKBUILD
blob: 292f88f6e66fb07c85782114a6ab0abd9377c0cd (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.5.1
_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="b51f0c611b1e21b73f9ba120023bf972  libpcap-1.5.1.tar.gz"
sha256sums="259db4fe1e9f0b6b9c43a057ec5916dec7d0a821b00d6d6c4dff7db2445fa7e4  libpcap-1.5.1.tar.gz"
sha512sums="c2b8b4771127278b7986650961efa0745789a33e717866a5ee4ee84333b7592738b12be12c1113075a5bf9e8edd03b3f6e6b3c018ef29383834608af5153ed39  libpcap-1.5.1.tar.gz"