File adjust-installation-directories-for-SLE.patch of Package iproute2

From: Michal Kubecek <mkubecek@suse.cz>
Date: Thu, 5 Dec 2013 13:14:33 +0100
Subject: adjust installation directories for SLE
Patch-mainline: Never

Match SLE directory layout.
---
 Makefile           | 4 ++--
 include/iptables.h | 2 +-
 netem/Makefile     | 6 ++++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 543d9e8..bca551f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 ROOTDIR=$(DESTDIR)
 PREFIX=/usr
 LIBDIR=$(PREFIX)/lib
-SBINDIR=/sbin
+SBINDIR=/usr/sbin
 CONFDIR=/etc/iproute2
 DATADIR=$(PREFIX)/share
 DOCDIR=$(DATADIR)/doc/iproute2
@@ -33,7 +33,7 @@ CCOPTS = -O2
 WFLAGS := -Wall -Wstrict-prototypes  -Wmissing-prototypes
 WFLAGS += -Wmissing-declarations -Wold-style-definition
 
-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
+CFLAGS = -DLIBDIR=\"${LIBDIR}\" $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
 YACCFLAGS = -d -t -v
 
 SUBDIRS=lib ip tc bridge misc netem genl man
diff --git a/include/iptables.h b/include/iptables.h
index f1e62e2..e59de39 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -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
diff --git a/netem/Makefile b/netem/Makefile
index e52e125..6ccb379 100644
--- a/netem/Makefile
+++ b/netem/Makefile
@@ -5,6 +5,8 @@ HOSTCC ?= $(CC)
 CCOPTS  = $(CBUILD_CFLAGS)
 LDLIBS += -lm 
 
+LIBDIR = /usr/lib
+
 all: $(DISTGEN) $(DISTDATA)
 
 $(DISTGEN):
@@ -20,9 +22,9 @@ stats: stats.c
 	$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
 
 install: all
-	mkdir -p $(DESTDIR)$(LIBDIR)/tc
+	mkdir -p $(DESTDIR)/usr/share/tc
 	for i in $(DISTDATA); \
-	do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
+	do install -m 644 $$i $(DESTDIR)/usr/share/tc; \
 	done
 
 clean:
-- 
1.8.1.4