[arch-commits] Commit in iproute/trunk (PKGBUILD libdir.patch)

Ronald van Haren ronald at archlinux.org
Thu Oct 30 17:47:25 EDT 2008


    Date: Thursday, October 30, 2008 @ 17:47:24
  Author: ronald
Revision: 17519

getting PKGBUILD in shape for 2.6.26 release

Added:
  iproute/trunk/libdir.patch
Modified:
  iproute/trunk/PKGBUILD

--------------+
 PKGBUILD     |   35 +++++++++------
 libdir.patch |  129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 150 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-10-30 21:34:10 UTC (rev 17518)
+++ PKGBUILD	2008-10-30 21:47:24 UTC (rev 17519)
@@ -1,26 +1,33 @@
 # $Id$
-# Maintainer: Judd Vinet <jvinet at zeroflux.org>
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Judd Vinet <jvinet at zeroflux.org>
+
 pkgname=iproute
-#_dlver=2.6.24-rc7
-#pkgver=$(echo ${_dlver} | sed 's|-|_|g')
-pkgver=2.6.25
+pkgver=2.6.26
 pkgrel=1
 pkgdesc="IP Routing Utilities"
-arch=(i686 x86_64)
-license=('GPL')
+arch=('i686' 'x86_64')
+license=('GPL2')
 url="http://www.linux-foundation.org/en/Net:Iproute2"
-depends=('db>=4.7')
-source=(#http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-${_dlver}.tar.bz2
-	http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-${pkgver}.tar.bz2)
-options=('force')
-md5sums=('5737bade2f5e03fad0e2c81da91e551e')
+depends=('db>=4.7' 'linux-atm') # build with atm support? optdepends?
 
+source=(http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-${pkgver}.tar.bz2 \
+	libdir.patch)
+md5sums=('7d221e735cba05709341cd46401c4ecd'
+         '5b3d76477d26e2b532e940cbbfe9856e')
+
 build() {
-  #cd $srcdir/iproute2-${_dlver}
   cd $srcdir/iproute2-${pkgver}
+  
+  patch -Np1 -i $srcdir/libdir.patch || return 1
   sed -i 's|/usr/local/lib/iptables|/usr/lib/iptables|' include/iptables.h || return 1
-  ./configure 
+  sed -i 's|=/share|=/usr/share|' Makefile || return 1
+  sed -i 's|=/sbin|=/usr/sbin|' Makefile || return 1
+
+  ./configure || return 1
   make || return 1
   make DESTDIR=$pkgdir install || return 1
-  chmod 755 $pkgdir/usr/sbin/ifcfg
+
+#  chmod 755 $pkgdir/usr/sbin/ifcfg || return 1
+
 }

Added: libdir.patch
===================================================================
--- libdir.patch	                        (rev 0)
+++ libdir.patch	2008-10-30 21:47:24 UTC (rev 17519)
@@ -0,0 +1,129 @@
+Submitted By: Joe Ciccone <jciccone at gmail.com>
+Date: 2008-09-31
+Upstream Status: Unknown
+Origin: Joe Ciccone
+Description: This patch gives the ability to change the libdir.
+
+--- iproute2-2.6.26.orig/Config	1969-12-31 19:00:00.000000000 -0500
++++ iproute2-2.6.26/Config	2008-09-13 15:07:31.000000000 -0400
+@@ -0,0 +1 @@
++# Generated config based on /usr/src/clfs-tarballs/conglomeration/iproute2-2.6.26/include
+diff -Naur iproute2-2.6.26.orig/include/iptables.h iproute2-2.6.26/include/iptables.h
+--- iproute2-2.6.26.orig/include/iptables.h	2008-07-25 16:46:07.000000000 -0400
++++ iproute2-2.6.26/include/iptables.h	2008-09-13 15:43:33.000000000 -0400
+@@ -4,8 +4,12 @@
+ #include "iptables_common.h"
+ #include "libiptc/libiptc.h"
+ 
++#ifndef LIBDIR
++#define LIBDIR "/usr/lib"
++#endif
++
+ #ifndef IPT_LIB_DIR
+-#define IPT_LIB_DIR "/usr/local/lib/iptables"
++#define IPT_LIB_DIR LIBDIR "/iptables"
+ #endif
+ 
+ #ifndef IPPROTO_SCTP
+diff -Naur iproute2-2.6.26.orig/ip/iplink.c iproute2-2.6.26/ip/iplink.c
+--- iproute2-2.6.26.orig/ip/iplink.c	2008-07-25 16:46:07.000000000 -0400
++++ iproute2-2.6.26/ip/iplink.c	2008-09-13 15:14:41.000000000 -0400
+@@ -34,7 +34,11 @@
+ 
+ #define IPLINK_IOCTL_COMPAT	1
+ #ifndef DESTDIR
+-#define DESTDIR "/usr/"
++#define DESTDIR "/usr"
++#endif
++
++#ifndef LIBDIR
++#define LIBDIR "/usr/lib"
+ #endif
+ 
+ static void usage(void) __attribute__((noreturn));
+@@ -81,7 +85,7 @@
+ 		if (strcmp(l->id, id) == 0)
+ 			return l;
+ 
+-	snprintf(buf, sizeof(buf), DESTDIR "/lib/ip/link_%s.so", id);
++	snprintf(buf, sizeof(buf), DESTDIR LIBDIR "/ip/link_%s.so", id);
+ 	dlh = dlopen(buf, RTLD_LAZY);
+ 	if (dlh == NULL) {
+ 		/* look in current binary, only open once */
+diff -Naur iproute2-2.6.26.orig/Makefile iproute2-2.6.26/Makefile
+--- iproute2-2.6.26.orig/Makefile	2008-07-25 16:46:07.000000000 -0400
++++ iproute2-2.6.26/Makefile	2008-09-13 15:15:24.000000000 -0400
+@@ -1,13 +1,15 @@
+-DESTDIR=/usr/
++DESTDIR=/usr
+ SBINDIR=/sbin
+ CONFDIR=/etc/iproute2
+ DOCDIR=/share/doc/iproute2
+ MANDIR=/share/man
+ 
++LIBDIR=/usr/lib
++
+ # Path to db_185.h include
+ DBM_INCLUDE:=/usr/include
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DDESTDIR=\"$(DESTDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DDESTDIR=\"$(DESTDIR)\" -DLIBDIR=\"$(LIBDIR)\"
+ 
+ #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
+ LDLIBS=-lresolv
+diff -Naur iproute2-2.6.26.orig/netem/Makefile iproute2-2.6.26/netem/Makefile
+--- iproute2-2.6.26.orig/netem/Makefile	2008-07-25 16:46:07.000000000 -0400
++++ iproute2-2.6.26/netem/Makefile	2008-09-13 14:27:07.000000000 -0400
+@@ -20,9 +20,9 @@
+ 	$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-	mkdir -p $(DESTDIR)/lib/tc
++	mkdir -p $(DESTDIR)$(LIBDIR)/tc
+ 	for i in $(DISTDATA); \
+-	do install -m 755 $$i $(DESTDIR)/lib/tc; \
++	do install -m 755 $$i $(DESTDIR)$(LIBDIR)/tc; \
+ 	done
+ 
+ clean:
+diff -Naur iproute2-2.6.26.orig/tc/Makefile iproute2-2.6.26/tc/Makefile
+--- iproute2-2.6.26.orig/tc/Makefile	2008-07-25 16:46:07.000000000 -0400
++++ iproute2-2.6.26/tc/Makefile	2008-09-13 14:30:37.000000000 -0400
+@@ -72,10 +72,10 @@
+ 	$(AR) rcs $@ $(TCLIB)
+ 
+ install: all
+-	mkdir -p $(DESTDIR)/lib/tc
++	mkdir -p $(DESTDIR)$(LIBDIR)/tc
+ 	install -m 0755 tc $(DESTDIR)$(SBINDIR)
+ 	for i in $(TCSO); \
+-	do install -m 755 $$i $(DESTDIR)/lib/tc; \
++	do install -m 755 $$i $(DESTDIR)$(LIBDIR)/tc; \
+ 	done
+ 
+ clean:
+diff -Naur iproute2-2.6.26.orig/tc/tc_util.c iproute2-2.6.26/tc/tc_util.c
+--- iproute2-2.6.26.orig/tc/tc_util.c	2008-07-25 16:46:07.000000000 -0400
++++ iproute2-2.6.26/tc/tc_util.c	2008-09-13 15:15:16.000000000 -0400
+@@ -25,7 +25,11 @@
+ #include "tc_util.h"
+ 
+ #ifndef DESTDIR
+-#define DESTDIR "/usr/"
++#define DESTDIR "/usr"
++#endif
++
++#ifndef LIBDIR
++#define LIBDIR "/usr/lib"
+ #endif
+ 
+ const char *get_tc_lib(void)
+@@ -34,7 +38,7 @@
+ 
+ 	lib_dir = getenv("TC_LIB_DIR");
+ 	if (!lib_dir)
+-		lib_dir = DESTDIR "/lib/tc";
++		lib_dir = DESTDIR LIBDIR "/tc";
+ 
+ 	return lib_dir;
+




More information about the arch-commits mailing list