summaryrefslogtreecommitdiff
path: root/testing/libpcap/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libpcap/PKGBUILD')
-rw-r--r--testing/libpcap/PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/libpcap/PKGBUILD b/testing/libpcap/PKGBUILD
new file mode 100644
index 000000000..9d62dd421
--- /dev/null
+++ b/testing/libpcap/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 150316 2012-02-16 20:41:44Z heftig $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgname=libpcap
+pkgver=1.2.1
+pkgrel=2
+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')
+makedepends=('flex')
+source=(http://www.tcpdump.org/release/libpcap-${pkgver}.tar.gz{,.sig}
+ libnl32.patch)
+sha256sums=('a135a6ef7e539729a57c7ed345bdb9b64159e13404174006a7972eb33f00debd'
+ 'dc82ca7e7f737885969af0f78ad0f0eef8206062087e0261ca2799ef26d569b4'
+ '7d0cbd49e55405cb2b55852223cd4965526e518cfb4f547ab9cc9b95b8f9c9e6')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np1 -i "${srcdir}/libnl32.patch"
+ autoreconf -f -i
+ ./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
+}