summaryrefslogtreecommitdiffstats
path: root/package/policycoreutils/0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch
blob: 636b722b7006030fc5f8f670eeb2bbd212836f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 27fd1c85ca95b5d66ab0241a08242a75b60b375c Mon Sep 17 00:00:00 2001
From: Adam Duskett <Aduskett@gmail.com>
Date: Thu, 14 Jul 2016 13:22:57 -0400
Subject: [PATCH] Change sepolicy python install arguments to be a variable

To allow the python install arguments to be overwritten, change the
arguments to be a variable. This also cleans up the DESTDIR detection a
little bit.

Updated to work with version 2.5

Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 policycoreutils/sepolicy/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sepolicy/Makefile b/sepolicy/Makefile
index a16f8de..2013301 100644
--- a/sepolicy/Makefile
+++ b/sepolicy/Makefile
@@ -1,4 +1,7 @@
 PYTHON ?= python
+ifneq ($(DESTDIR),)
+PYTHON_INSTALL_ARGS ?= --root $(DESTDIR)
+endif
 
 # Installation directories.
 PREFIX ?= $(DESTDIR)/usr
@@ -32,7 +35,7 @@ test:
 	@$(PYTHON) test_sepolicy.py -v
 
 install:
-	$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
+	$(PYTHON) setup.py install $(PYTHON_INSTALL_ARGS)
 	[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
 	install -m 755 sepolicy.py $(BINDIR)/sepolicy
 	(cd $(BINDIR); ln -sf sepolicy sepolgen)
-- 
2.7.4

OpenPOWER on IntegriCloud