0004-Change-sepolicy-python-install-arguments-to-be-a-var.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 27fd1c85ca95b5d66ab0241a08242a75b60b375c Mon Sep 17 00:00:00 2001
  2. From: Adam Duskett <Aduskett@gmail.com>
  3. Date: Thu, 14 Jul 2016 13:22:57 -0400
  4. Subject: [PATCH] Change sepolicy python install arguments to be a variable
  5. To allow the python install arguments to be overwritten, change the
  6. arguments to be a variable. This also cleans up the DESTDIR detection a
  7. little bit.
  8. Updated to work with version 2.5
  9. Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
  10. Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
  11. Signed-off-by: Adam Duskett <Aduskett@gmail.com>
  12. ---
  13. policycoreutils/sepolicy/Makefile | 5 ++++-
  14. 1 file changed, 4 insertions(+), 1 deletion(-)
  15. diff --git a/sepolicy/Makefile b/sepolicy/Makefile
  16. index a16f8de..2013301 100644
  17. --- a/sepolicy/Makefile
  18. +++ b/sepolicy/Makefile
  19. @@ -1,4 +1,7 @@
  20. PYTHON ?= python
  21. +ifneq ($(DESTDIR),)
  22. +PYTHON_INSTALL_ARGS ?= --root $(DESTDIR)
  23. +endif
  24. # Installation directories.
  25. PREFIX ?= $(DESTDIR)/usr
  26. @@ -32,7 +35,7 @@ test:
  27. @$(PYTHON) test_sepolicy.py -v
  28. install:
  29. - $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
  30. + $(PYTHON) setup.py install $(PYTHON_INSTALL_ARGS)
  31. [ -d $(BINDIR) ] || mkdir -p $(BINDIR)
  32. install -m 755 sepolicy.py $(BINDIR)/sepolicy
  33. (cd $(BINDIR); ln -sf sepolicy sepolgen)
  34. --
  35. 2.7.4