[67300de] | 1 | Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
|
---|
| 2 | Date: 2007-09-01
|
---|
| 3 | Upstream Status: Unknown
|
---|
| 4 | Origin: Joe Ciccone
|
---|
| 5 | Description: Changes the path of /usr/lib/tc to one defined in the Makefile.
|
---|
| 6 |
|
---|
| 7 | diff -Naur iproute2-2.6.22-070710.orig/include/iptables.h iproute2-2.6.22-070710/include/iptables.h
|
---|
| 8 | --- iproute2-2.6.22-070710.orig/include/iptables.h 2007-07-10 18:34:14.000000000 -0700
|
---|
| 9 | +++ iproute2-2.6.22-070710/include/iptables.h 2007-09-02 08:29:41.000000000 -0700
|
---|
| 10 | @@ -5,7 +5,7 @@
|
---|
| 11 | #include "libiptc/libiptc.h"
|
---|
| 12 |
|
---|
| 13 | #ifndef IPT_LIB_DIR
|
---|
| 14 | -#define IPT_LIB_DIR "/usr/local/lib/iptables"
|
---|
| 15 | +#define IPT_LIB_DIR LIBDIR
|
---|
| 16 | #endif
|
---|
| 17 |
|
---|
| 18 | #ifndef IPPROTO_SCTP
|
---|
| 19 | diff -Naur iproute2-2.6.22-070710.orig/Makefile iproute2-2.6.22-070710/Makefile
|
---|
| 20 | --- iproute2-2.6.22-070710.orig/Makefile 2007-07-10 18:34:14.000000000 -0700
|
---|
| 21 | +++ iproute2-2.6.22-070710/Makefile 2007-09-02 08:38:27.000000000 -0700
|
---|
| 22 | @@ -1,5 +1,7 @@
|
---|
| 23 | DESTDIR=
|
---|
| 24 | SBINDIR=/usr/sbin
|
---|
| 25 | +LIBDIR=/usr/lib
|
---|
| 26 | +VARLIB=/var/lib
|
---|
| 27 | CONFDIR=/etc/iproute2
|
---|
| 28 | DOCDIR=/usr/share/doc/iproute2
|
---|
| 29 | MANDIR=/usr/share/man
|
---|
| 30 | @@ -22,7 +24,7 @@
|
---|
| 31 | CC = gcc
|
---|
| 32 | HOSTCC = gcc
|
---|
| 33 | CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
|
---|
| 34 | -CFLAGS = $(CCOPTS) -I../include $(DEFINES)
|
---|
| 35 | +CFLAGS = -DLIBDIR=\"$(LIBDIR)\" -DVARLIB=\"$(VARLIB)\" $(CCOPTS) -I../include $(DEFINES)
|
---|
| 36 | YACCFLAGS = -d -t -v
|
---|
| 37 |
|
---|
| 38 | LDLIBS += -L../lib -lnetlink -lutil
|
---|
| 39 | diff -Naur iproute2-2.6.22-070710.orig/misc/arpd.c iproute2-2.6.22-070710/misc/arpd.c
|
---|
| 40 | --- iproute2-2.6.22-070710.orig/misc/arpd.c 2007-07-10 18:34:14.000000000 -0700
|
---|
| 41 | +++ iproute2-2.6.22-070710/misc/arpd.c 2007-09-02 08:38:08.000000000 -0700
|
---|
| 42 | @@ -40,7 +40,7 @@
|
---|
| 43 | int resolve_hosts;
|
---|
| 44 |
|
---|
| 45 | DB *dbase;
|
---|
| 46 | -char *dbname = "/var/lib/arpd/arpd.db";
|
---|
| 47 | +char *dbname = VARLIB "/arpd/arpd.db";
|
---|
| 48 |
|
---|
| 49 | int ifnum;
|
---|
| 50 | int *ifvec;
|
---|
| 51 | diff -Naur iproute2-2.6.22-070710.orig/netem/Makefile iproute2-2.6.22-070710/netem/Makefile
|
---|
| 52 | --- iproute2-2.6.22-070710.orig/netem/Makefile 2007-07-10 18:34:14.000000000 -0700
|
---|
| 53 | +++ iproute2-2.6.22-070710/netem/Makefile 2007-09-02 08:29:41.000000000 -0700
|
---|
| 54 | @@ -4,6 +4,8 @@
|
---|
| 55 | HOSTCC ?= $(CC)
|
---|
| 56 | LDLIBS += -lm
|
---|
| 57 |
|
---|
| 58 | +LIBDIR = /usr/lib
|
---|
| 59 | +
|
---|
| 60 | all: $(DISTGEN) $(DISTDATA)
|
---|
| 61 |
|
---|
| 62 | $(DISTGEN):
|
---|
| 63 | @@ -19,9 +21,9 @@
|
---|
| 64 | $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
|
---|
| 65 |
|
---|
| 66 | install: all
|
---|
| 67 | - mkdir -p $(DESTDIR)/usr/lib/tc
|
---|
| 68 | + mkdir -p $(DESTDIR)/$(LIBDIR)/tc
|
---|
| 69 | for i in $(DISTDATA); \
|
---|
| 70 | - do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
|
---|
| 71 | + do install -m 755 $$i $(DESTDIR)/$(LIBDIR)/tc; \
|
---|
| 72 | done
|
---|
| 73 |
|
---|
| 74 | clean:
|
---|
| 75 | diff -Naur iproute2-2.6.22-070710.orig/tc/Makefile iproute2-2.6.22-070710/tc/Makefile
|
---|
| 76 | --- iproute2-2.6.22-070710.orig/tc/Makefile 2007-07-10 18:34:14.000000000 -0700
|
---|
| 77 | +++ iproute2-2.6.22-070710/tc/Makefile 2007-09-02 08:29:41.000000000 -0700
|
---|
| 78 | @@ -69,10 +69,10 @@
|
---|
| 79 | $(AR) rcs $@ $(TCLIB)
|
---|
| 80 |
|
---|
| 81 | install: all
|
---|
| 82 | - mkdir -p $(DESTDIR)/usr/lib/tc
|
---|
| 83 | + mkdir -p $(DESTDIR)/$(LIBDIR)/tc
|
---|
| 84 | install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
|
---|
| 85 | for i in $(TCSO); \
|
---|
| 86 | - do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
|
---|
| 87 | + do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \
|
---|
| 88 | done
|
---|
| 89 |
|
---|
| 90 | clean:
|
---|
| 91 | diff -Naur iproute2-2.6.22-070710.orig/tc/tc_util.c iproute2-2.6.22-070710/tc/tc_util.c
|
---|
| 92 | --- iproute2-2.6.22-070710.orig/tc/tc_util.c 2007-07-10 18:34:14.000000000 -0700
|
---|
| 93 | +++ iproute2-2.6.22-070710/tc/tc_util.c 2007-09-02 08:33:48.000000000 -0700
|
---|
| 94 | @@ -30,7 +30,7 @@
|
---|
| 95 |
|
---|
| 96 | lib_dir = getenv("TC_LIB_DIR");
|
---|
| 97 | if (!lib_dir)
|
---|
| 98 | - lib_dir = "/usr/lib/tc";
|
---|
| 99 | + lib_dir = LIBDIR "/tc";
|
---|
| 100 |
|
---|
| 101 | return lib_dir;
|
---|
| 102 | }
|
---|