# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h
# large file support.
# See https://bugzilla.redhat.com/show_bug.cgi?id=574992 for more information
+# We need to pass DESTDIR at build time because it's used by
+# policycoreutils build system to find headers and libraries.
+# We also need to pass PREFIX because it defaults to $(DESTDIR)/usr
HOST_POLICYCOREUTILS_MAKE_OPTS = \
$(HOST_CONFIGURE_OPTS) \
CFLAGS="$(HOST_CFLAGS) -U_FILE_OFFSET_BITS" \
CPPFLAGS="$(HOST_CPPFLAGS) -U_FILE_OFFSET_BITS" \
PYTHON="$(HOST_DIR)/bin/python" \
PYTHON_INSTALL_ARGS="$(HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS)" \
- ARCH="$(HOSTARCH)"
+ ARCH="$(HOSTARCH)" \
+ DESTDIR=$(HOST_DIR) \
+ PREFIX=$(HOST_DIR)
ifeq ($(BR2_PACKAGE_PYTHON3),y)
HOST_POLICYCOREUTILS_DEPENDENCIES += host-python3
semodule_package setfiles restorecond \
audit2allow scripts semanage sepolicy
-# We need to pass DESTDIR at build time because it's used by
-# policycoreutils build system to find headers and libraries.
define HOST_POLICYCOREUTILS_BUILD_CMDS
$(foreach d,$(HOST_POLICYCOREUTILS_MAKE_DIRS),
- $(MAKE) -C $(@D)/$(d) $(HOST_POLICYCOREUTILS_MAKE_OPTS) \
- DESTDIR=$(HOST_DIR) all
+ $(MAKE) -C $(@D)/$(d) $(HOST_POLICYCOREUTILS_MAKE_OPTS) all
)
endef
define HOST_POLICYCOREUTILS_INSTALL_CMDS
$(foreach d,$(HOST_POLICYCOREUTILS_MAKE_DIRS),
- $(MAKE) -C $(@D)/$(d) $(HOST_POLICYCOREUTILS_MAKE_OPTS) \
- DESTDIR=$(HOST_DIR) install
+ $(MAKE) -C $(@D)/$(d) $(HOST_POLICYCOREUTILS_MAKE_OPTS) install
)
# Fix python paths
$(SED) 's%/usr/bin/%$(HOST_DIR)/bin/%g' $(HOST_DIR)/bin/audit2allow