121 lines
4.2 KiB
Diff
121 lines
4.2 KiB
Diff
|
From 69711944745af0078da77e108d30f89fd7e06108 Mon Sep 17 00:00:00 2001
|
||
|
From: Michal Sekletar <msekleta@redhat.com>
|
||
|
Date: Fri, 4 Apr 2014 12:01:33 +0200
|
||
|
Subject: [PATCH 05/27] build-sys: don't hardcode LIBDIR, but set it according
|
||
|
to the target platform
|
||
|
|
||
|
---
|
||
|
pppd/Makefile.linux | 3 ++-
|
||
|
pppd/pathnames.h | 2 +-
|
||
|
pppd/plugins/Makefile.linux | 2 +-
|
||
|
pppd/plugins/pppoatm/Makefile.linux | 2 +-
|
||
|
pppd/plugins/pppol2tp/Makefile.linux | 4 ++--
|
||
|
pppd/plugins/radius/Makefile.linux | 2 +-
|
||
|
pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
|
||
|
7 files changed, 9 insertions(+), 8 deletions(-)
|
||
|
|
||
|
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
||
|
index 63872eb..8ed56c1 100644
|
||
|
--- a/pppd/Makefile.linux
|
||
|
+++ b/pppd/Makefile.linux
|
||
|
@@ -8,6 +8,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
|
||
|
BINDIR = $(DESTDIR)/sbin
|
||
|
MANDIR = $(DESTDIR)/share/man/man8
|
||
|
INCDIR = $(DESTDIR)/include
|
||
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
|
||
|
|
||
|
TARGETS = pppd
|
||
|
|
||
|
@@ -32,7 +33,7 @@ endif
|
||
|
|
||
|
CC = gcc
|
||
|
#
|
||
|
-COPTS = -Wall $(RPM_OPT_FLAGS)
|
||
|
+COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
|
||
|
|
||
|
# Uncomment the next line to include support for Microsoft's
|
||
|
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
|
||
|
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
|
||
|
index a33f046..a427cb8 100644
|
||
|
--- a/pppd/pathnames.h
|
||
|
+++ b/pppd/pathnames.h
|
||
|
@@ -57,7 +57,7 @@
|
||
|
|
||
|
#ifdef PLUGIN
|
||
|
#ifdef __STDC__
|
||
|
-#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
|
||
|
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
|
||
|
#else /* __STDC__ */
|
||
|
#define _PATH_PLUGIN "/usr/lib/pppd"
|
||
|
#endif /* __STDC__ */
|
||
|
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
|
||
|
index e09a369..b474a19 100644
|
||
|
--- a/pppd/plugins/Makefile.linux
|
||
|
+++ b/pppd/plugins/Makefile.linux
|
||
|
@@ -7,7 +7,7 @@ INSTALL = install
|
||
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
||
|
BINDIR = $(DESTDIR)/sbin
|
||
|
MANDIR = $(DESTDIR)/share/man/man8
|
||
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||
|
+LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||
|
|
||
|
SUBDIRS := rp-pppoe pppoatm pppol2tp
|
||
|
# Uncomment the next line to include the radius authentication plugin
|
||
|
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
|
||
|
index 5a81447..769794b 100644
|
||
|
--- a/pppd/plugins/pppoatm/Makefile.linux
|
||
|
+++ b/pppd/plugins/pppoatm/Makefile.linux
|
||
|
@@ -7,7 +7,7 @@ INSTALL = install
|
||
|
#***********************************************************************
|
||
|
|
||
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
||
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||
|
|
||
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||
|
|
||
|
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
|
||
|
index ea3538e..4339566 100644
|
||
|
--- a/pppd/plugins/pppol2tp/Makefile.linux
|
||
|
+++ b/pppd/plugins/pppol2tp/Makefile.linux
|
||
|
@@ -6,8 +6,8 @@ INSTALL = install
|
||
|
|
||
|
#***********************************************************************
|
||
|
|
||
|
-DESTDIR = @DESTDIR@
|
||
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||
|
+DESTDIR = $(INSTROOT)@DESTDIR@
|
||
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||
|
|
||
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||
|
|
||
|
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
|
||
|
index 45b3b8d..179d0b7 100644
|
||
|
--- a/pppd/plugins/radius/Makefile.linux
|
||
|
+++ b/pppd/plugins/radius/Makefile.linux
|
||
|
@@ -5,7 +5,7 @@
|
||
|
|
||
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
||
|
MANDIR = $(DESTDIR)/share/man/man8
|
||
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||
|
|
||
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||
|
|
||
|
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
||
|
index 352991a..1305ed8 100644
|
||
|
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
||
|
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
||
|
@@ -16,7 +16,7 @@
|
||
|
|
||
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
||
|
BINDIR = $(DESTDIR)/sbin
|
||
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
|
||
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
|
||
|
|
||
|
PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||
|
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|