2008-07-14 17:48:50 +02:00
|
|
|
--- Makefile
|
|
|
|
+++ Makefile 2008/05/13 08:16:28
|
2007-10-26 20:58:21 +02:00
|
|
|
@@ -1,5 +1,7 @@
|
|
|
|
DESTDIR=
|
|
|
|
SBINDIR=/usr/sbin
|
|
|
|
+LIBDIR=/usr/lib
|
|
|
|
+VARLIB=/var/lib
|
|
|
|
CONFDIR=/etc/iproute2
|
|
|
|
DOCDIR=/usr/share/doc/iproute2
|
|
|
|
MANDIR=/usr/share/man
|
|
|
|
@@ -22,7 +24,7 @@
|
|
|
|
CC = gcc
|
|
|
|
HOSTCC = gcc
|
|
|
|
CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
|
|
|
|
-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
|
|
|
|
+CFLAGS = -DLIBDIR=\"$(LIBDIR)\" -DVARLIB=\"$(VARLIB)\" $(CCOPTS) -I../include $(DEFINES)
|
|
|
|
YACCFLAGS = -d -t -v
|
|
|
|
|
|
|
|
LDLIBS += -L../lib -lnetlink -lutil
|
2008-07-14 17:48:50 +02:00
|
|
|
--- include/iptables.h
|
|
|
|
+++ include/iptables.h 2008/05/13 08:14:15
|
|
|
|
@@ -5,7 +5,7 @@
|
|
|
|
#include "libiptc/libiptc.h"
|
|
|
|
|
|
|
|
#ifndef IPT_LIB_DIR
|
|
|
|
-#define IPT_LIB_DIR "/usr/local/lib/iptables"
|
|
|
|
+#define IPT_LIB_DIR LIBDIR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef IPPROTO_SCTP
|
|
|
|
--- misc/arpd.c
|
|
|
|
+++ misc/arpd.c 2008/05/13 08:17:25
|
2007-10-26 20:58:21 +02:00
|
|
|
@@ -40,7 +40,7 @@
|
|
|
|
int resolve_hosts;
|
|
|
|
|
|
|
|
DB *dbase;
|
|
|
|
-char *dbname = "/var/lib/arpd/arpd.db";
|
|
|
|
+char *dbname = VARLIB "/arpd/arpd.db";
|
|
|
|
|
|
|
|
int ifnum;
|
|
|
|
int *ifvec;
|
2008-07-14 17:48:50 +02:00
|
|
|
--- netem/Makefile
|
|
|
|
+++ netem/Makefile 2008/05/13 08:18:35
|
2007-10-26 20:58:21 +02:00
|
|
|
@@ -4,6 +4,8 @@
|
|
|
|
HOSTCC ?= $(CC)
|
|
|
|
LDLIBS += -lm
|
|
|
|
|
|
|
|
+LIBDIR = /usr/lib
|
|
|
|
+
|
|
|
|
all: $(DISTGEN) $(DISTDATA)
|
|
|
|
|
|
|
|
$(DISTGEN):
|
|
|
|
@@ -19,9 +21,9 @@
|
|
|
|
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
|
|
|
|
|
|
|
|
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:
|
2008-07-14 17:48:50 +02:00
|
|
|
--- tc/Makefile
|
|
|
|
+++ tc/Makefile 2008/05/13 08:19:22
|
|
|
|
@@ -72,10 +72,10 @@
|
2007-10-26 20:58:21 +02:00
|
|
|
$(AR) rcs $@ $(TCLIB)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
- mkdir -p $(DESTDIR)/usr/lib/tc
|
|
|
|
+ mkdir -p $(DESTDIR)/$(LIBDIR)/tc
|
2008-07-14 17:48:50 +02:00
|
|
|
install -m 0755 tc $(DESTDIR)$(SBINDIR)
|
2007-10-26 20:58:21 +02:00
|
|
|
for i in $(TCSO); \
|
2008-07-14 17:48:50 +02:00
|
|
|
- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
|
2007-10-26 20:58:21 +02:00
|
|
|
+ do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \
|
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
2008-07-14 17:48:50 +02:00
|
|
|
--- tc/tc_util.c
|
|
|
|
+++ tc/tc_util.c 2008/05/13 08:20:15
|
2007-10-26 20:58:21 +02:00
|
|
|
@@ -30,7 +30,7 @@
|
|
|
|
|
|
|
|
lib_dir = getenv("TC_LIB_DIR");
|
|
|
|
if (!lib_dir)
|
|
|
|
- lib_dir = "/usr/lib/tc";
|
|
|
|
+ lib_dir = LIBDIR "/tc";
|
|
|
|
|
|
|
|
return lib_dir;
|
|
|
|
}
|