iproute2/iproute2-2.6.25-libdir-1.diff

91 lines
1.9 KiB
Diff
Raw Normal View History

--- Makefile
+++ Makefile 2008/05/13 08:16:28
@@ -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
--- 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
@@ -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;
--- netem/Makefile
+++ netem/Makefile 2008/05/13 08:18:35
@@ -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:
--- tc/Makefile
+++ tc/Makefile 2008/05/13 08:19:22
@@ -72,10 +72,10 @@
$(AR) rcs $@ $(TCLIB)
install: all
- mkdir -p $(DESTDIR)/usr/lib/tc
+ mkdir -p $(DESTDIR)/$(LIBDIR)/tc
install -m 0755 tc $(DESTDIR)$(SBINDIR)
for i in $(TCSO); \
- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
+ do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \
done
clean:
--- tc/tc_util.c
+++ tc/tc_util.c 2008/05/13 08:20:15
@@ -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;
}