Submitted By: Joe Ciccone Date: 2006-09-04 Upstream Status: Unknown Origin: Joe Ciccone Description: Changes the path of /usr/lib/tc to one defined in the Makefile. diff -Naur iproute2-2.6.16-060323.orig/Makefile iproute2-2.6.16-060323/Makefile --- iproute2-2.6.16-060323.orig/Makefile 2005-07-08 18:08:47.000000000 -0400 +++ iproute2-2.6.16-060323/Makefile 2006-09-08 20:18:32.000000000 -0400 @@ -1,5 +1,6 @@ DESTDIR= SBINDIR=/usr/sbin +LIBDIR=/usr/lib CONFDIR=/etc/iproute2 DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man @@ -22,7 +23,7 @@ CC = gcc HOSTCC = gcc CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -CFLAGS = $(CCOPTS) -I../include $(DEFINES) +CFLAGS = -DLIBDIR=\"$(LIBDIR)\" $(CCOPTS) -I../include $(DEFINES) YACCFLAGS = -d -t -v LDLIBS += -L../lib -lnetlink -lutil diff -Naur iproute2-2.6.16-060323.orig/netem/Makefile iproute2-2.6.16-060323/netem/Makefile --- iproute2-2.6.16-060323.orig/netem/Makefile 2006-03-14 14:43:59.000000000 -0500 +++ iproute2-2.6.16-060323/netem/Makefile 2006-09-08 20:15:25.000000000 -0400 @@ -4,6 +4,8 @@ HOSTCC ?= $(CC) LDLIBS += -lm +LIBDIR = /usr/lib + all: $(DISTGEN) $(DISTDATA) $(DISTGEN): @@ -16,9 +18,9 @@ ./maketable experimental.dat > experimental.dist install: all - mkdir -p $(DESTDIR)/usr/lib/tc + mkdir -p $(DESTDIR)/$(LIBDIR)/tc for i in $(DISTDATA); \ - do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \ + do install -m 755 $$i $(DESTDIR)/$(LIBDIR)/tc; \ done clean: diff -Naur iproute2-2.6.16-060323.orig/tc/Makefile iproute2-2.6.16-060323/tc/Makefile --- iproute2-2.6.16-060323.orig/tc/Makefile 2005-07-05 18:11:37.000000000 -0400 +++ iproute2-2.6.16-060323/tc/Makefile 2006-09-08 20:16:15.000000000 -0400 @@ -69,10 +69,10 @@ $(AR) rcs $@ $(TCLIB) install: all - mkdir -p $(DESTDIR)/usr/lib/tc + mkdir -p $(DESTDIR)/$(LIBDIR)/tc install -m 0755 -s tc $(DESTDIR)$(SBINDIR) for i in $(TCSO); \ - do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \ + do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \ done clean: diff -Naur iproute2-2.6.16-060323.orig/tc/q_netem.c iproute2-2.6.16-060323/tc/q_netem.c --- iproute2-2.6.16-060323.orig/tc/q_netem.c 2005-12-09 19:01:02.000000000 -0500 +++ iproute2-2.6.16-060323/tc/q_netem.c 2006-09-08 20:16:50.000000000 -0400 @@ -60,7 +60,7 @@ char *line = NULL; char name[128]; - snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type); + snprintf(name, sizeof(name), LIBDIR "/tc/%s.dist", type); if ((f = fopen(name, "r")) == NULL) { fprintf(stderr, "No distribution data for %s (%s: %s)\n", type, name, strerror(errno)); diff -Naur iproute2-2.6.16-060323.orig/tc/tc.c iproute2-2.6.16-060323/tc/tc.c --- iproute2-2.6.16-060323.orig/tc/tc.c 2005-10-07 12:33:21.000000000 -0400 +++ iproute2-2.6.16-060323/tc/tc.c 2006-09-08 20:17:29.000000000 -0400 @@ -99,7 +99,7 @@ if (strcmp(q->id, str) == 0) return q; - snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str); + snprintf(buf, sizeof(buf), LIBDIR "/tc/q_%s.so", str); dlh = dlopen(buf, RTLD_LAZY); if (!dlh) { /* look in current binary, only open once */ @@ -145,7 +145,7 @@ if (strcmp(q->id, str) == 0) return q; - snprintf(buf, sizeof(buf), "/usr/lib/tc/f_%s.so", str); + snprintf(buf, sizeof(buf), LIBDIR "/tc/f_%s.so", str); dlh = dlopen(buf, RTLD_LAZY); if (dlh == NULL) { dlh = BODY;