summaryrefslogtreecommitdiffstats
path: root/abs/core/libpcap/PKGBUILD
blob: d471be1648938947901e1f4ed7587126dae26d34 (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
# $Id: PKGBUILD 77149 2010-04-11 11:02:48Z thomas $
# Maintainer: Thomas Bächler <thomas@archlinux.org>

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

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-ipv6
  make || return 1
  make shared || return 1
}
package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  
  install -d -m755 ${pkgdir}/usr/bin
  make DESTDIR=${pkgdir} install install-shared || return 1
#  ln -s libpcap.so.${pkgver} ${pkgdir}/usr/lib/libpcap.so.1
#  ln -s libpcap.so.${pkgver} ${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
}