[arch-commits] Commit in iproute2/trunk (PKGBUILD iproute2-fhs.patch)

Ronald van Haren ronald at archlinux.org
Wed Nov 11 21:32:18 UTC 2009


    Date: Wednesday, November 11, 2009 @ 16:32:18
  Author: ronald
Revision: 58699

upgpkg: iproute2 2.6.29-3
    make fhs compliant; patch tc to find distribution files (FS#17094)

Added:
  iproute2/trunk/iproute2-fhs.patch
Modified:
  iproute2/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   14 +++++-------
 iproute2-fhs.patch |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-11 18:15:34 UTC (rev 58698)
+++ PKGBUILD	2009-11-11 21:32:18 UTC (rev 58699)
@@ -4,7 +4,7 @@
 
 pkgname=iproute2
 pkgver=2.6.29
-pkgrel=2
+pkgrel=3
 pkgdesc="IP Routing Utilities"
 arch=('i686' 'x86_64')
 license=('GPL2')
@@ -19,16 +19,16 @@
 	'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables')
 
 source=(http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-${pkgver}.tar.bz2
-	'iftunnel.patch')
+	'iftunnel.patch' 'iproute2-fhs.patch')
 md5sums=('a3ecfaa091289656fae786b027b44eda'
-         '8b3dab19a03d8d521c690be7bb7b5c2e')
+         '8b3dab19a03d8d521c690be7bb7b5c2e'
+         'cc520ba70a1b7fae66ab003ac870d9e1')
 
 build() {
   cd $srcdir/iproute2-${pkgver}
   
-  sed -i 's|/usr/local/lib/iptables|/usr/lib/iptables|' include/iptables.h || return 1
-  sed -i 's|=/share|=/usr/share|' Makefile || return 1
-  sed -i 's|=/sbin|=/usr/sbin|' Makefile || return 1
+  # set correct fhs structure
+  patch -Np1 -i ${srcdir}/iproute2-fhs.patch || return 1
 
   # fix missing #include
   patch -Np0 -R -i ${srcdir}/iftunnel.patch || return 1
@@ -37,6 +37,4 @@
   make || return 1
   make DESTDIR=$pkgdir install || return 1
 
-#  chmod 755 $pkgdir/usr/sbin/ifcfg || return 1
-
 }

Added: iproute2-fhs.patch
===================================================================
--- iproute2-fhs.patch	                        (rev 0)
+++ iproute2-fhs.patch	2009-11-11 21:32:18 UTC (rev 58699)
@@ -0,0 +1,55 @@
+diff -Naur iproute2.old/Makefile iproute2-2.6.29/Makefile
+--- iproute2.old/Makefile	2009-11-11 22:05:21.251407668 +0100
++++ iproute2-2.6.29/Makefile	2009-11-11 22:07:09.891833516 +0100
+@@ -1,9 +1,10 @@
+ DESTDIR=/usr/
+ LIBDIR=/usr/lib/
+-SBINDIR=/sbin
++SBINDIR=/usr/sbin
+ CONFDIR=/etc/iproute2
+-DOCDIR=/share/doc/iproute2
+-MANDIR=/share/man
++DOCDIR=/usr/share/doc/iproute2
++MANDIR=/usr/share/man
++SHAREDIR=/usr/share
+ 
+ # Path to db_185.h include
+ DBM_INCLUDE:=/usr/include
+diff -Naur iproute2.old/netem/Makefile iproute2-2.6.29/netem/Makefile
+--- iproute2.old/netem/Makefile	2009-11-11 22:05:21.284750207 +0100
++++ iproute2-2.6.29/netem/Makefile	2009-11-11 22:07:54.674736924 +0100
+@@ -20,9 +20,9 @@
+ 	$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-	mkdir -p $(DESTDIR)/lib/tc
++	mkdir -p $(DESTDIR)/${SHAREDIR}/tc
+ 	for i in $(DISTDATA); \
+-	do install -m 755 $$i $(DESTDIR)/lib/tc; \
++	do install -m 755 $$i $(DESTDIR)/${SHAREDIR}/tc; \
+ 	done
+ 
+ clean:
+diff -Naur iproute2.old/tc/tc_util.c iproute2-2.6.29/tc/tc_util.c
+--- iproute2.old/tc/tc_util.c	2009-11-11 22:05:21.298076943 +0100
++++ iproute2-2.6.29/tc/tc_util.c	2009-11-11 22:09:32.865152646 +0100
+@@ -24,8 +24,8 @@
+ #include "utils.h"
+ #include "tc_util.h"
+ 
+-#ifndef LIBDIR
+-#define LIBDIR "/usr/lib/"
++#ifndef SHAREDIR
++#define SHAREDIR "/usr/share"
+ #endif
+ 
+ const char *get_tc_lib(void)
+@@ -34,7 +34,7 @@
+ 
+ 	lib_dir = getenv("TC_LIB_DIR");
+ 	if (!lib_dir)
+-		lib_dir = LIBDIR "/tc/";
++		lib_dir = SHAREDIR "/tc/";
+ 
+ 	return lib_dir;
+ }




More information about the arch-commits mailing list