libcap-ng: add host build

This patch adds the necessary host build infrastructure for libcap-ng.

While OpenWrt doesn't strictly need this right now, merging this change
prevents downstream projects (like prplOS) from having to fork the package
just to build their host tools, thus keeping the code bases closer.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
This commit is contained in:
Cedric CHEDALEUX
2025-02-24 15:45:11 +01:00
committed by Christian Marangi
parent fb1a0ebbfc
commit 9d334da77e

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libcap-ng
PKG_VERSION:=0.8.4
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://people.redhat.com/sgrubb/libcap-ng
@@ -26,6 +26,7 @@ PKG_FIXUP:=autoreconf
PKG_BUILD_FLAGS:=lto
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/libcap-ng/Default
TITLE:=POSIX capabilities library
@@ -65,6 +66,15 @@ CONFIGURE_ARGS += \
--without-python \
--without-python3
HOST_CONFIGURE_VARS += \
ac_cv_prog_swig_found=no
HOST_CONFIGURE_ARGS += \
--without-python \
--without-python3
HOST_PKG_BUILD_FLAGS:=lto
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
@@ -89,3 +99,4 @@ endef
$(eval $(call BuildPackage,libcap-ng))
$(eval $(call BuildPackage,libcap-ng-bin))
$(eval $(call HostBuild))