1From a221304344b3f9db7e86d928cf97d77542bcf456 Mon Sep 17 00:00:00 2001 2From: Adam Duskett <aduskett@gmail.com> 3Date: Mon, 9 Oct 2017 16:47:19 -0400 4Subject: [PATCH] Add PREFIX to host paths 5 6Updates the remaining hardcoded host paths used in the build to be 7prefixed with a PREFIX path to allow cross compilation. 8 9Updated to work with version 3.2 10 11Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com> 12Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com> 13Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 14[Update for 2.8] 15Signed-off-by: Adam Duskett <aduskett@gmail.com> 16[Update for 3.2] 17--- 18 newrole/Makefile | 4 ++-- 19 run_init/Makefile | 4 ++-- 20 2 files changed, 4 insertions(+), 4 deletions(-) 21 22diff --git a/newrole/Makefile b/newrole/Makefile 23index 0e7ebce..3188cec 100644 24--- a/newrole/Makefile 25+++ b/newrole/Makefile 26@@ -4,8 +4,8 @@ PREFIX ?= /usr 27 BINDIR ?= $(PREFIX)/bin 28 MANDIR ?= $(PREFIX)/share/man 29 ETCDIR ?= /etc 30-LOCALEDIR = $(DESTDIR)$(PREFIX)/share/locale 31-INCLUDEDIR ?= $(PREFIX)/include 32+LOCALEDIR = $(DESTDIR)$(PREFIX) 33+INCLUDEDIR ?= $(LOCALEDIR)/include 34 PAMH ?= $(shell test -f $(INCLUDEDIR)/security/pam_appl.h && echo y) 35 AUDITH ?= $(shell test -f $(INCLUDEDIR)/libaudit.h && echo y) 36 # Enable capabilities to permit newrole to generate audit records. 37diff --git a/run_init/Makefile b/run_init/Makefile 38index e86364a..20a64d4 100644 39--- a/run_init/Makefile 40+++ b/run_init/Makefile 41@@ -6,8 +6,8 @@ SBINDIR ?= $(PREFIX)/sbin 42 MANDIR ?= $(PREFIX)/share/man 43 ETCDIR ?= /etc 44 LOCALEDIR ?= $(DESTDIR)$(PREFIX)/share/locale 45-PAMH ?= $(shell test -f /usr/include/security/pam_appl.h && echo y) 46-AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y) 47+PAMH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/security/pam_appl.h && echo y) 48+AUDITH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/libaudit.h && echo y) 49 50 CFLAGS ?= -Werror -Wall -W 51 override CFLAGS += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" 52-- 532.31.1 54 55