source: patches/iproute2-2.6.16-060323-libdir-1.patch@ 65009ab2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 65009ab2 was dc580237, checked in by Jim Gifford <clfs@…>, 18 years ago

Fixed iproute libdir patch

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[dc580237]1Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
2Date: 2006-09-04
3Upstream Status: Unknown
4Origin: Joe Ciccone
5Description: Changes the path of /usr/lib/tc to one defined in the Makefile.
6
7diff -Naur iproute2-2.6.16-060323.orig/Makefile iproute2-2.6.16-060323/Makefile
8--- iproute2-2.6.16-060323.orig/Makefile 2005-07-08 18:08:47.000000000 -0400
9+++ iproute2-2.6.16-060323/Makefile 2006-09-08 20:18:32.000000000 -0400
10@@ -1,5 +1,6 @@
11 DESTDIR=
12 SBINDIR=/usr/sbin
13+LIBDIR=/usr/lib
14 CONFDIR=/etc/iproute2
15 DOCDIR=/usr/share/doc/iproute2
16 MANDIR=/usr/share/man
17@@ -22,7 +23,7 @@
18 CC = gcc
19 HOSTCC = gcc
20 CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
21-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
22+CFLAGS = -DLIBDIR=\"$(LIBDIR)\" $(CCOPTS) -I../include $(DEFINES)
23 YACCFLAGS = -d -t -v
24
25 LDLIBS += -L../lib -lnetlink -lutil
26diff -Naur iproute2-2.6.16-060323.orig/netem/Makefile iproute2-2.6.16-060323/netem/Makefile
27--- iproute2-2.6.16-060323.orig/netem/Makefile 2006-03-14 14:43:59.000000000 -0500
28+++ iproute2-2.6.16-060323/netem/Makefile 2006-09-08 20:15:25.000000000 -0400
29@@ -4,6 +4,8 @@
30 HOSTCC ?= $(CC)
31 LDLIBS += -lm
32
33+LIBDIR = /usr/lib
34+
35 all: $(DISTGEN) $(DISTDATA)
36
37 $(DISTGEN):
38@@ -16,9 +18,9 @@
39 ./maketable experimental.dat > experimental.dist
40
41 install: all
42- mkdir -p $(DESTDIR)/usr/lib/tc
43+ mkdir -p $(DESTDIR)/$(LIBDIR)/tc
44 for i in $(DISTDATA); \
45- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
46+ do install -m 755 $$i $(DESTDIR)/$(LIBDIR)/tc; \
47 done
48
49 clean:
50diff -Naur iproute2-2.6.16-060323.orig/tc/Makefile iproute2-2.6.16-060323/tc/Makefile
51--- iproute2-2.6.16-060323.orig/tc/Makefile 2005-07-05 18:11:37.000000000 -0400
52+++ iproute2-2.6.16-060323/tc/Makefile 2006-09-08 20:16:15.000000000 -0400
53@@ -69,10 +69,10 @@
54 $(AR) rcs $@ $(TCLIB)
55
56 install: all
57- mkdir -p $(DESTDIR)/usr/lib/tc
58+ mkdir -p $(DESTDIR)/$(LIBDIR)/tc
59 install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
60 for i in $(TCSO); \
61- do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
62+ do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \
63 done
64
65 clean:
66diff -Naur iproute2-2.6.16-060323.orig/tc/q_netem.c iproute2-2.6.16-060323/tc/q_netem.c
67--- iproute2-2.6.16-060323.orig/tc/q_netem.c 2005-12-09 19:01:02.000000000 -0500
68+++ iproute2-2.6.16-060323/tc/q_netem.c 2006-09-08 20:16:50.000000000 -0400
69@@ -60,7 +60,7 @@
70 char *line = NULL;
71 char name[128];
72
73- snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type);
74+ snprintf(name, sizeof(name), LIBDIR "/tc/%s.dist", type);
75 if ((f = fopen(name, "r")) == NULL) {
76 fprintf(stderr, "No distribution data for %s (%s: %s)\n",
77 type, name, strerror(errno));
78diff -Naur iproute2-2.6.16-060323.orig/tc/tc.c iproute2-2.6.16-060323/tc/tc.c
79--- iproute2-2.6.16-060323.orig/tc/tc.c 2005-10-07 12:33:21.000000000 -0400
80+++ iproute2-2.6.16-060323/tc/tc.c 2006-09-08 20:17:29.000000000 -0400
81@@ -99,7 +99,7 @@
82 if (strcmp(q->id, str) == 0)
83 return q;
84
85- snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str);
86+ snprintf(buf, sizeof(buf), LIBDIR "/tc/q_%s.so", str);
87 dlh = dlopen(buf, RTLD_LAZY);
88 if (!dlh) {
89 /* look in current binary, only open once */
90@@ -145,7 +145,7 @@
91 if (strcmp(q->id, str) == 0)
92 return q;
93
94- snprintf(buf, sizeof(buf), "/usr/lib/tc/f_%s.so", str);
95+ snprintf(buf, sizeof(buf), LIBDIR "/tc/f_%s.so", str);
96 dlh = dlopen(buf, RTLD_LAZY);
97 if (dlh == NULL) {
98 dlh = BODY;
Note: See TracBrowser for help on using the repository browser.