Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 32/36] libsemanage: rework host installation
Date: Wed, 5 Jul 2017 13:14:49 +0200	[thread overview]
Message-ID: <20170705111453.2284-33-arnout@mind.be> (raw)
In-Reply-To: <20170705111453.2284-1-arnout@mind.be>

libsemanage has a pretty peculiar interpretation of DESTDIR and PREFIX.
PREFIX is not consistently used: some installation paths are forced to
$(DESTDIR)/usr/... . In other cases, PREFIX is indeed used. PREFIX
defaults to $(DESTDIR)/usr

Try to be a little bit more correct by passing both DESTDIR and PREFIX,
both set to $(HOST_DIR). This is not a complete fix: man pages are
still installed in $(HOST_DIR)/usr - but we don't care about that.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/libsemanage/libsemanage.mk | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/package/libsemanage/libsemanage.mk b/package/libsemanage/libsemanage.mk
index 5ef2d57e35..2964c56f96 100644
--- a/package/libsemanage/libsemanage.mk
+++ b/package/libsemanage/libsemanage.mk
@@ -29,7 +29,12 @@ endef
 
 HOST_LIBSEMANAGE_DEPENDENCIES = host-bison host-audit host-libsepol host-libselinux \
 				host-ustr host-bzip2 host-swig
-HOST_LIBSEMANAGE_MAKE_OPTS += $(HOST_CONFIGURE_OPTS) \
+
+# DESTDIR is needed during the compile to compute library and header paths.
+HOST_LIBSEMANAGE_MAKE_OPTS += \
+	$(HOST_CONFIGURE_OPTS) \
+	DESTDIR=$(HOST_DIR) \
+	PREFIX=$(HOST_DIR) \
 	SWIG_LIB="$(HOST_DIR)/share/swig/$(SWIG_VERSION)/"
 
 ifeq ($(BR2_PACKAGE_PYTHON3),y)
@@ -47,15 +52,13 @@ HOST_LIBSEMANAGE_MAKE_OPTS += \
 endif
 
 define HOST_LIBSEMANAGE_BUILD_CMDS
-	# DESTDIR is needed during the compile to compute library and
-	# header paths.
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) all
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) all
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) swigify pywrap
 endef
 
 define HOST_LIBSEMANAGE_INSTALL_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) install
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) install
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) install-pywrap
 endef
 
 $(eval $(generic-package))
-- 
2.13.2

  parent reply	other threads:[~2017-07-05 11:14 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 11:14 [Buildroot] [PATCH v4 00/36] Remove /usr component from HOST_DIR (continued) Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 01/36] generic packages: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 02/36] Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 03/36] Globally replace $(HOST_DIR)/usr/sbin with $(HOST_DIR)/sbin Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 04/36] Globally replace $(HOST_DIR)/usr/lib with $(HOST_DIR)/lib Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 05/36] Globally replace $(HOST_DIR)/usr/include with $(HOST_DIR)/include Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 06/36] Globally replace $(HOST_DIR)/usr/share with $(HOST_DIR)/share Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 07/36] Globally replace $(HOST_DIR)/usr with $(HOST_DIR) Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 08/36] qt: fix up alignment after mechanical replacement Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 09/36] boards: replace $HOST_DIR/usr/ with $HOST_DIR/ in scripts Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 10/36] chromebook snow: remove $(HOST_DIR)/usr reference from README Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 11/36] warpboard: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 12/36] stm32f429-disco: replace $HOST_DIR/usr with $HOST_DIR in flash script Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 13/36] stm32f469-disco: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 14/36] eclipse-register-toolchain: toolchain is no longer installed in $(HOST_DIR)/usr Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 15/36] manual: remove references to host/usr paths Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 16/36] grub2: remove host/usr reference from help text Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 17/36] lttng-tools: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 18/36] mfgtools: remove host/usr reference from readme.txt Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 19/36] lesstif: remove host/usr reference from .mk comment Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 20/36] board/gdb/bfin-bf512: remove host/usr reference from readme.txt Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 21/36] board/csky: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 22/36] libffi: avoid $(HOST_DIR)/usr while moving headers Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 23/36] genromfs: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 24/36] libcap: use $(HOST_DIR) as prefix instead of DESTDIR Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 25/36] lzip: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 26/36] opkg-utils: use $(HOST_DIR) as PREFIX " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 27/36] raspberrypi-usbboot: remove /usr from DESTDIR-based install commands Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 28/36] dos2unix: use prefix instead of DESTDIR for host installation Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 29/36] imx-uxb-loader: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 30/36] grub2: install in $(HOST_DIR) instead of $(HOST_DIR)/usr Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 31/36] sepolgen: strip /usr/ part from HOST_DIR Arnout Vandecappelle
2017-07-05 11:14 ` Arnout Vandecappelle [this message]
2017-07-05 11:14 ` [Buildroot] [PATCH v4 33/36] libselinux: rework host installation Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 34/36] checkpolicy: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 35/36] policycoreutils: " Arnout Vandecappelle
2017-07-05 11:14 ` [Buildroot] [PATCH v4 36/36] execline: remove --shebangdir configure option Arnout Vandecappelle
2017-07-05 14:31 ` [Buildroot] [PATCH v4 00/36] Remove /usr component from HOST_DIR (continued) Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170705111453.2284-33-arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox