summaryrefslogtreecommitdiffstats
path: root/abs/core/iproute2/libdir.patch
blob: 4e5671a9cb5f22c54e60aa18094e9da9567342c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Submitted By: Joe Ciccone <jciccone@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;