summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/libpcap/PKGBUILD
blob: e5c11e24539634943fe1ba0724ef9f1ff56ade1c (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
# $Id: PKGBUILD 20200 2008-12-01 17:56:56Z thomas $
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=libpcap
pkgver=1.0.0
pkgrel=1
pkgdesc="A system-independent interface for user-level packet capture"
arch=('i686' 'x86_64')
url="http://www.tcpdump.org/"
license=('BSD')
groups=('base')
depends=('glibc')
makedepends=('flex')
source=(http://www.tcpdump.org/release/libpcap-${pkgver}.tar.gz)
md5sums=('9ad1358c5dec48456405eac197a46d3d')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-ipv6
  make || return 1
  make shared || return 1
  
  install -d -m755 ${pkgdir}/usr/bin
  make DESTDIR=${pkgdir} install install-shared || return 1
  ln -s libpcap.so.1.0.0 ${pkgdir}/usr/lib/libpcap.so.1
  ln -s libpcap.so.1.0.0 ${pkgdir}/usr/lib/libpcap.so
  # backwards compatibility, programs often look for net/bpf.h
  mkdir -p ${pkgdir}/usr/include/net
  cd ${pkgdir}/usr/include/net
  ln -s ../pcap-bpf.h bpf.h

  #install the license
  install -D -m644 ${srcdir}/$pkgname-$pkgver/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
}