summaryrefslogtreecommitdiff
path: root/core/libpcap/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'core/libpcap/PKGBUILD')
-rw-r--r--core/libpcap/PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/libpcap/PKGBUILD b/core/libpcap/PKGBUILD
new file mode 100644
index 000000000..845ff13bf
--- /dev/null
+++ b/core/libpcap/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 103439 2010-12-19 15:40:24Z andyrtr $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgname=libpcap
+pkgver=1.1.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)
+sha256sums=('508cca15547e55d1318498b838456a21770c450beb2dc7d7d4a96d90816e5a85')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --enable-ipv6
+ 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
+}