[06b2d12] | 1 | Submitted By: Joe Ciccone <jciccone@gmail.com>
|
---|
| 2 | Date: 14-06-2010
|
---|
| 3 | Initial Package Version: 2.6.18
|
---|
| 4 | Upstream Status: Unknown
|
---|
| 5 | Origin: Joe Ciccone
|
---|
| 6 | Description: This patch gives the ability to change the libdir.
|
---|
| 7 | Updated for Iproute2-2.6.28 by Jim Gifford
|
---|
| 8 | Updated for Iproute2-2.6.34 by Joe Ciccone
|
---|
| 9 | Updated for Iproute2-2.6.37 by Joe Ciccone
|
---|
| 10 | Renamed for Iproute2-2.6.38 by Jonathan Norman
|
---|
| 11 | Rediffed for Iproute2-3.4.0 by William Harrington
|
---|
| 12 |
|
---|
| 13 | diff -Naur iproute2-3.4.0.orig/Makefile iproute2-3.4.0/Makefile
|
---|
| 14 | --- iproute2-3.4.0.orig/Makefile 2012-05-21 21:12:19.000000000 +0000
|
---|
| 15 | +++ iproute2-3.4.0/Makefile 2012-08-26 18:34:17.338322481 +0000
|
---|
| 16 | @@ -13,7 +13,7 @@
|
---|
| 17 |
|
---|
| 18 | SHARED_LIBS = y
|
---|
| 19 |
|
---|
| 20 | -DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
|
---|
| 21 | +DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DARPDDIR=\"$(ARPDDIR)\"
|
---|
| 22 | ifneq ($(SHARED_LIBS),y)
|
---|
| 23 | DEFINES+= -DNO_SHARED_LIBS
|
---|
| 24 | endif
|
---|
| 25 | diff -Naur iproute2-3.4.0.orig/Makefile.orig iproute2-3.4.0/Makefile.orig
|
---|
| 26 | --- iproute2-3.4.0.orig/Makefile.orig 1970-01-01 00:00:00.000000000 +0000
|
---|
| 27 | +++ iproute2-3.4.0/Makefile.orig 2012-05-21 21:12:19.000000000 +0000
|
---|
| 28 | @@ -0,0 +1,85 @@
|
---|
| 29 | +ROOTDIR=$(DESTDIR)
|
---|
| 30 | +PREFIX=/usr
|
---|
| 31 | +LIBDIR=$(PREFIX)/lib
|
---|
| 32 | +SBINDIR=/sbin
|
---|
| 33 | +CONFDIR=/etc/iproute2
|
---|
| 34 | +DATADIR=$(PREFIX)/share
|
---|
| 35 | +DOCDIR=$(DATADIR)/doc/iproute2
|
---|
| 36 | +MANDIR=$(DATADIR)/man
|
---|
| 37 | +ARPDDIR=/var/lib/arpd
|
---|
| 38 | +
|
---|
| 39 | +# Path to db_185.h include
|
---|
| 40 | +DBM_INCLUDE:=$(ROOTDIR)/usr/include
|
---|
| 41 | +
|
---|
| 42 | +SHARED_LIBS = y
|
---|
| 43 | +
|
---|
| 44 | +DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
|
---|
| 45 | +ifneq ($(SHARED_LIBS),y)
|
---|
| 46 | +DEFINES+= -DNO_SHARED_LIBS
|
---|
| 47 | +endif
|
---|
| 48 | +
|
---|
| 49 | +DEFINES+=-DCONFDIR=\"$(CONFDIR)\"
|
---|
| 50 | +
|
---|
| 51 | +#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
|
---|
| 52 | +LDLIBS=-lresolv
|
---|
| 53 | +ADDLIB=
|
---|
| 54 | +
|
---|
| 55 | +#options for decnet
|
---|
| 56 | +ADDLIB+=dnet_ntop.o dnet_pton.o
|
---|
| 57 | +
|
---|
| 58 | +#options for ipx
|
---|
| 59 | +ADDLIB+=ipx_ntop.o ipx_pton.o
|
---|
| 60 | +
|
---|
| 61 | +CC = gcc
|
---|
| 62 | +HOSTCC = gcc
|
---|
| 63 | +DEFINES += -D_GNU_SOURCE
|
---|
| 64 | +CCOPTS = -O2
|
---|
| 65 | +WFLAGS = -Wall -Wstrict-prototypes
|
---|
| 66 | +CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
|
---|
| 67 | +YACCFLAGS = -d -t -v
|
---|
| 68 | +
|
---|
| 69 | +SUBDIRS=lib ip tc misc netem genl man
|
---|
| 70 | +
|
---|
| 71 | +LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
|
---|
| 72 | +LDLIBS += $(LIBNETLINK)
|
---|
| 73 | +
|
---|
| 74 | +all: Config
|
---|
| 75 | + @set -e; \
|
---|
| 76 | + for i in $(SUBDIRS); \
|
---|
| 77 | + do $(MAKE) $(MFLAGS) -C $$i; done
|
---|
| 78 | +
|
---|
| 79 | +Config:
|
---|
| 80 | + sh configure $(KERNEL_INCLUDE)
|
---|
| 81 | +
|
---|
| 82 | +install: all
|
---|
| 83 | + install -m 0755 -d $(DESTDIR)$(SBINDIR)
|
---|
| 84 | + install -m 0755 -d $(DESTDIR)$(CONFDIR)
|
---|
| 85 | + install -m 0755 -d $(DESTDIR)$(ARPDDIR)
|
---|
| 86 | + install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
|
---|
| 87 | + install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
|
---|
| 88 | + install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
|
---|
| 89 | + $(DESTDIR)$(DOCDIR)/examples
|
---|
| 90 | + install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
|
---|
| 91 | + $(DESTDIR)$(DOCDIR)/examples/diffserv
|
---|
| 92 | + @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
|
---|
| 93 | + install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
|
---|
| 94 | +
|
---|
| 95 | +snapshot:
|
---|
| 96 | + echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \
|
---|
| 97 | + > include/SNAPSHOT.h
|
---|
| 98 | +
|
---|
| 99 | +clean:
|
---|
| 100 | + @for i in $(SUBDIRS) doc; \
|
---|
| 101 | + do $(MAKE) $(MFLAGS) -C $$i clean; done
|
---|
| 102 | +
|
---|
| 103 | +clobber:
|
---|
| 104 | + touch Config
|
---|
| 105 | + $(MAKE) $(MFLAGS) clean
|
---|
| 106 | + rm -f Config cscope.*
|
---|
| 107 | +
|
---|
| 108 | +distclean: clobber
|
---|
| 109 | +
|
---|
| 110 | +cscope:
|
---|
| 111 | + cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc
|
---|
| 112 | +
|
---|
| 113 | +.EXPORT_ALL_VARIABLES:
|
---|
| 114 | diff -Naur iproute2-3.4.0.orig/include/iptables.h iproute2-3.4.0/include/iptables.h
|
---|
| 115 | --- iproute2-3.4.0.orig/include/iptables.h 2012-05-21 21:12:19.000000000 +0000
|
---|
| 116 | +++ iproute2-3.4.0/include/iptables.h 2012-08-26 18:34:17.338322481 +0000
|
---|
| 117 | @@ -4,8 +4,12 @@
|
---|
| 118 | #include "iptables_common.h"
|
---|
| 119 | #include "libiptc/libiptc.h"
|
---|
| 120 |
|
---|
| 121 | +#ifndef LIBDIR
|
---|
| 122 | +#define LIBDIR "/usr/lib"
|
---|
| 123 | +#endif
|
---|
| 124 | +
|
---|
| 125 | #ifndef IPT_LIB_DIR
|
---|
| 126 | -#define IPT_LIB_DIR "/usr/local/lib/iptables"
|
---|
| 127 | +#define IPT_LIB_DIR LIBDIR "/iptables"
|
---|
| 128 | #endif
|
---|
| 129 |
|
---|
| 130 | #ifndef IPPROTO_SCTP
|
---|
| 131 | diff -Naur iproute2-3.4.0.orig/misc/arpd.c iproute2-3.4.0/misc/arpd.c
|
---|
| 132 | --- iproute2-3.4.0.orig/misc/arpd.c 2012-05-21 21:12:19.000000000 +0000
|
---|
| 133 | +++ iproute2-3.4.0/misc/arpd.c 2012-08-26 18:34:17.338322481 +0000
|
---|
| 134 | @@ -40,7 +40,7 @@
|
---|
| 135 | int resolve_hosts;
|
---|
| 136 |
|
---|
| 137 | DB *dbase;
|
---|
| 138 | -char *dbname = "/var/lib/arpd/arpd.db";
|
---|
| 139 | +char *dbname = ARPDDIR "/arpd.db";
|
---|
| 140 |
|
---|
| 141 | int ifnum;
|
---|
| 142 | int *ifvec;
|
---|