[arch-commits] Commit in libpcap/trunk (PKGBUILD libpcap-shared.patch)

Thomas Bächler thomas at archlinux.org
Mon Dec 1 12:51:44 UTC 2008


    Date: Monday, December 1, 2008 @ 07:51:44
  Author: thomas
Revision: 20197

Update libpcap to version 1.0.0
libpcap now includes shared linking by itself and sets a proper SONAME (.so.1),
so I won't have to chop anyone's head off in the future.

Modified:
  libpcap/trunk/PKGBUILD
Deleted:
  libpcap/trunk/libpcap-shared.patch

----------------------+
 PKGBUILD             |   44 +++++++++++++++---------------------------
 libpcap-shared.patch |   51 -------------------------------------------------
 2 files changed, 16 insertions(+), 79 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-12-01 12:13:25 UTC (rev 20196)
+++ PKGBUILD	2008-12-01 12:51:44 UTC (rev 20197)
@@ -1,44 +1,32 @@
 # $Id$
-# Maintainer: dorphell <dorphell at archlinux.org>
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
 
 pkgname=libpcap
-pkgver=0.9.8
-pkgrel=2
+pkgver=1.0.0
+pkgrel=1
 pkgdesc="A system-independent interface for user-level packet capture"
-arch=(i686 x86_64)
+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
-        libpcap-shared.patch)
-md5sums=('5208f24d0328ee7c20b52c43eaa9aa0e'
-         'b8a9c5e5cea0b89a8a7456c6c4d59db4')
+source=(http://www.tcpdump.org/release/libpcap-${pkgver}.tar.gz)
+md5sums=('9ad1358c5dec48456405eac197a46d3d')
 
-# This package has a strict SONAME that changes in EVERY MINOR
-# release. Whenever you feel like updating this package, DON'T,
-# it will break a number of essential system tools.
-# Again, for dummies: IF YOU UPDATE THIS PACKAGE DIRECTLY TO CORE,
-# I WILL PERSONALLY CHOP YOUR HEAD OFF!
-
 build() {
-  cd ${startdir}/src/${pkgname}-${pkgver}
-  patch -Np1 -i ${startdir}/libpcap-shared.patch || return 1
-  sed -i -e "s/@MAJOR@/`awk -F '.' '{ print $1 }' VERSION`/" \
-         -e "s/@MINOR@/`awk -F '.' '{ print $2 }' VERSION`/" \
-	 -e "s/@SUBMINOR@/`awk -F '.' '{ print $3 }' VERSION`/" \
-	 -e "s/@VERSION@/`cat VERSION`/" Makefile.in
-  
+  cd ${srcdir}/${pkgname}-${pkgver}
   ./configure --prefix=/usr --enable-ipv6
-  DEFS="-g -D_U_=\"\" -fPIC -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" 
-  make -j1 DEFS="${DEFS}" || return 1
-  make DESTDIR=${startdir}/pkg install
-#  # backwards compatibility, programs often look for net/bpf.h
-  mkdir -p ${startdir}/pkg/usr/include/net
-  cd ${startdir}/pkg/usr/include/net
+  make
+  make shared
+  make DESTDIR=${pkgdir} install install-shared
+  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 $startdir/src/$pkgname-$pkgver/LICENSE $startdir/pkg/usr/share/licenses/$pkgname/LICENSE
+  install -D -m644 ${srcdir}/$pkgname-$pkgver/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
 }

Deleted: libpcap-shared.patch
===================================================================
--- libpcap-shared.patch	2008-12-01 12:13:25 UTC (rev 20196)
+++ libpcap-shared.patch	2008-12-01 12:51:44 UTC (rev 20197)
@@ -1,51 +0,0 @@
-diff -u -r libpcap-0.6.2/Makefile.in libpcap-shared/Makefile.in
---- libpcap-0.6.2/Makefile.in	Thu Jan 18 05:06:24 2001
-+++ libpcap-shared/Makefile.in	Fri Jul 20 16:26:05 2001
-@@ -22,6 +22,10 @@
- #
- # Various configurable paths (remember to edit Makefile.in, not Makefile)
- #
-+MAJOR = @MAJOR@
-+MINOR = @MINOR@
-+SUBMINOR = @SUBMINOR@
-+VERSION = @VERSION@
- 
- # Top level hierarchy
- prefix = @prefix@
-@@ -47,7 +51,7 @@
- DEFS = @DEFS@
- 
- # Standard CFLAGS
--CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
-+CFLAGS = $(CCOPT) $(INCLS) $(DEFS) -fPIC -DPIC
- 
- INSTALL = @INSTALL@
- INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -91,9 +95,14 @@
- TAGFILES = \
- 	$(SRC) $(HDR) $(TAGHDR)
- 
--CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
- 
--all: libpcap.a
-+
-+CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so.$(VERSION)
-+
-+all: libpcap.a libpcap.so.$(VERSION)
-+
-+libpcap.so.$(VERSION):
-+	gcc -shared -Wl,-soname -Wl,libpcap.so.$(VERSION) -o libpcap.so.$(VERSION) $(OBJ) -lc
- 
- libpcap.a: $(OBJ)
- 	@rm -f $@
-@@ -139,6 +148,10 @@
- 	[ -d $(DESTDIR)$(libdir) ] || \
- 	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
- 	$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
-+	$(INSTALL_DATA) libpcap.so.$(VERSION)  $(DESTDIR)$(libdir)/libpcap.so.$(VERSION)
-+	ln -s libpcap.so.$(VERSION) $(DESTDIR)$(libdir)/libpcap.so
-+	ln -s libpcap.so.$(VERSION) $(DESTDIR)$(libdir)/libpcap.so.$(MAJOR)
-+	ln -s libpcap.so.$(VERSION) $(DESTDIR)$(libdir)/libpcap.so.$(MAJOR).$(MINOR)
- 	$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
- 	[ -d $(DESTDIR)$(includedir) ] || \
- 	    (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))




More information about the arch-commits mailing list