[openwrt/openwrt] libaudit: add host-build required by policycoreutils/host
LEDE Commits
lede-commits at lists.infradead.org
Tue Sep 1 09:24:19 EDT 2020
dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d136848b8b8081370d41461c9685affcd3222e8c
commit d136848b8b8081370d41461c9685affcd3222e8c
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Sep 1 14:23:07 2020 +0100
libaudit: add host-build required by policycoreutils/host
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
package/libs/libaudit/Makefile | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/package/libs/libaudit/Makefile b/package/libs/libaudit/Makefile
index f478ae5dd0..d0cca1350a 100644
--- a/package/libs/libaudit/Makefile
+++ b/package/libs/libaudit/Makefile
@@ -14,6 +14,7 @@ PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://people.redhat.com/sgrubb/audit
PKG_HASH:=0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni at bootlin.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
@@ -50,28 +51,42 @@ CONFIGURE_ARGS += \
--without-python3 \
--disable-zos-remote
-HOST_CONFIGURE_ARGS += \
- --without-python \
- --without-python3 \
- --disable-zos-remote \
- --without-libcap-ng
-
ifeq ($(ARCH),aarch64)
CONFIGURE_ARGS += --with-aarch64
else ifeq ($(ARCH),arm)
CONFIGURE_ARGS += --with-arm
endif
+HOST_CONFIGURE_ARGS += \
+ --without-libcap-ng \
+ --disable-systemd \
+ --without-python \
+ --without-python3 \
+ --disable-zos-remote
+
+MAKE_PATH:=lib
+
+# Host/Compile/default doesn't include $(MAKE_PATH), override to use,
+# so we avoid building and installing unnecessary parts on the host.
+define Host/Compile
+ +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) $(HOST_MAKE_FLAGS) all
+endef
+
+define Host/Install
+ +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib $(HOST_MAKE_FLAGS) install
+ +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/init.d $(HOST_MAKE_FLAGS) install
+endef
+
# We can't use the default, as the default passes $(MAKE_ARGS), which
# overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
# passed in CONFIGURE_VARS
define Build/Compile
- $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)/lib
+ $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
endef
define Build/Install
- $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)/lib $(MAKE_INSTALL_FLAGS) install
- $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)/init.d $(MAKE_INSTALL_FLAGS) install
+ $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib $(MAKE_INSTALL_FLAGS) install
+ $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/init.d $(MAKE_INSTALL_FLAGS) install
endef
define Build/InstallDev
@@ -90,4 +105,5 @@ define Package/libaudit/install
$(CP) $(PKG_INSTALL_DIR)/etc/libaudit.conf $(1)/etc/
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,libaudit))
More information about the lede-commits
mailing list