source: patches/iproute2-2.6.26-libdir-1.patch@ af6578d

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since af6578d was e8e6c4e, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Commit patches from the last commit.

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[e8e6c4e]1Submitted By: Joe Ciccone <jciccone@gmail.com>
2Date: 2008-09-31
3Upstream Status: Unknown
4Origin: Joe Ciccone
5Description: This patch gives the ability to change the libdir.
6
7--- iproute2-2.6.26.orig/Config 1969-12-31 19:00:00.000000000 -0500
8+++ iproute2-2.6.26/Config 2008-09-13 15:07:31.000000000 -0400
9@@ -0,0 +1 @@
10+# Generated config based on /usr/src/clfs-tarballs/conglomeration/iproute2-2.6.26/include
11diff -Naur iproute2-2.6.26.orig/include/iptables.h iproute2-2.6.26/include/iptables.h
12--- iproute2-2.6.26.orig/include/iptables.h 2008-07-25 16:46:07.000000000 -0400
13+++ iproute2-2.6.26/include/iptables.h 2008-09-13 15:43:33.000000000 -0400
14@@ -4,8 +4,12 @@
15 #include "iptables_common.h"
16 #include "libiptc/libiptc.h"
17
18+#ifndef LIBDIR
19+#define LIBDIR "/lib"
20+#endif
21+
22 #ifndef IPT_LIB_DIR
23-#define IPT_LIB_DIR "/usr/local/lib/iptables"
24+#define IPT_LIB_DIR LIBDIR "/iptables"
25 #endif
26
27 #ifndef IPPROTO_SCTP
28diff -Naur iproute2-2.6.26.orig/ip/iplink.c iproute2-2.6.26/ip/iplink.c
29--- iproute2-2.6.26.orig/ip/iplink.c 2008-07-25 16:46:07.000000000 -0400
30+++ iproute2-2.6.26/ip/iplink.c 2008-09-13 15:14:41.000000000 -0400
31@@ -34,7 +34,11 @@
32
33 #define IPLINK_IOCTL_COMPAT 1
34 #ifndef DESTDIR
35-#define DESTDIR "/usr/"
36+#define DESTDIR "/usr"
37+#endif
38+
39+#ifndef LIBDIR
40+#define LIBDIR "/lib"
41 #endif
42
43 static void usage(void) __attribute__((noreturn));
44@@ -81,7 +85,7 @@
45 if (strcmp(l->id, id) == 0)
46 return l;
47
48- snprintf(buf, sizeof(buf), DESTDIR "/lib/ip/link_%s.so", id);
49+ snprintf(buf, sizeof(buf), DESTDIR LIBDIR "/ip/link_%s.so", id);
50 dlh = dlopen(buf, RTLD_LAZY);
51 if (dlh == NULL) {
52 /* look in current binary, only open once */
53diff -Naur iproute2-2.6.26.orig/Makefile iproute2-2.6.26/Makefile
54--- iproute2-2.6.26.orig/Makefile 2008-07-25 16:46:07.000000000 -0400
55+++ iproute2-2.6.26/Makefile 2008-09-13 15:15:24.000000000 -0400
56@@ -1,13 +1,15 @@
57-DESTDIR=/usr/
58+DESTDIR=/usr
59 SBINDIR=/sbin
60 CONFDIR=/etc/iproute2
61 DOCDIR=/share/doc/iproute2
62 MANDIR=/share/man
63
64+LIBDIR=/lib
65+
66 # Path to db_185.h include
67 DBM_INCLUDE:=/usr/include
68
69-DEFINES= -DRESOLVE_HOSTNAMES -DDESTDIR=\"$(DESTDIR)\"
70+DEFINES= -DRESOLVE_HOSTNAMES -DDESTDIR=\"$(DESTDIR)\" -DLIBDIR=\"$(LIBDIR)\"
71
72 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
73 LDLIBS=-lresolv
74diff -Naur iproute2-2.6.26.orig/netem/Makefile iproute2-2.6.26/netem/Makefile
75--- iproute2-2.6.26.orig/netem/Makefile 2008-07-25 16:46:07.000000000 -0400
76+++ iproute2-2.6.26/netem/Makefile 2008-09-13 14:27:07.000000000 -0400
77@@ -20,9 +20,9 @@
78 $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
79
80 install: all
81- mkdir -p $(DESTDIR)/lib/tc
82+ mkdir -p $(DESTDIR)$(LIBDIR)/tc
83 for i in $(DISTDATA); \
84- do install -m 755 $$i $(DESTDIR)/lib/tc; \
85+ do install -m 755 $$i $(DESTDIR)$(LIBDIR)/tc; \
86 done
87
88 clean:
89diff -Naur iproute2-2.6.26.orig/tc/Makefile iproute2-2.6.26/tc/Makefile
90--- iproute2-2.6.26.orig/tc/Makefile 2008-07-25 16:46:07.000000000 -0400
91+++ iproute2-2.6.26/tc/Makefile 2008-09-13 14:30:37.000000000 -0400
92@@ -72,10 +72,10 @@
93 $(AR) rcs $@ $(TCLIB)
94
95 install: all
96- mkdir -p $(DESTDIR)/lib/tc
97+ mkdir -p $(DESTDIR)$(LIBDIR)/tc
98 install -m 0755 tc $(DESTDIR)$(SBINDIR)
99 for i in $(TCSO); \
100- do install -m 755 $$i $(DESTDIR)/lib/tc; \
101+ do install -m 755 $$i $(DESTDIR)$(LIBDIR)/tc; \
102 done
103
104 clean:
105diff -Naur iproute2-2.6.26.orig/tc/tc_util.c iproute2-2.6.26/tc/tc_util.c
106--- iproute2-2.6.26.orig/tc/tc_util.c 2008-07-25 16:46:07.000000000 -0400
107+++ iproute2-2.6.26/tc/tc_util.c 2008-09-13 15:15:16.000000000 -0400
108@@ -25,7 +25,11 @@
109 #include "tc_util.h"
110
111 #ifndef DESTDIR
112-#define DESTDIR "/usr/"
113+#define DESTDIR "/usr"
114+#endif
115+
116+#ifndef LIBDIR
117+#define LIBDIR "/lib"
118 #endif
119
120 const char *get_tc_lib(void)
121@@ -34,7 +38,7 @@
122
123 lib_dir = getenv("TC_LIB_DIR");
124 if (!lib_dir)
125- lib_dir = DESTDIR "/lib/tc";
126+ lib_dir = DESTDIR LIBDIR "/tc";
127
128 return lib_dir;
129 }
Note: See TracBrowser for help on using the repository browser.