summaryrefslogtreecommitdiff
path: root/core/libpcap/PKGBUILD
blob: 2e200ea46350e7319f63f9e50777e2959c9e1eec (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
# $Id: PKGBUILD 185218 2013-05-12 09:08:12Z thomas $
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=libpcap
pkgver=1.4.0
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' 'sh' 'libusbx')
makedepends=('flex')
source=(http://www.tcpdump.org/release/libpcap-${pkgver}.tar.gz{,.sig})
sha256sums=('7c6a2a4f71e8ab09804e6b4fb3aff998c5583108ac42c0e2967eee8e1dbc7406'
            'SKIP')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-ipv6 --with-libnl
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  install -d -m755 ${pkgdir}/usr/bin
  make DESTDIR=${pkgdir} install
  # remove static library
  rm -rf ${pkgdir}/usr/lib/libpcap.a
  
  # 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
}