8de4aadda7
Changes: https://github.com/SELinuxProject/selinux/releases/download/3.9/RELEASE-3.9.txt Notable changes related to policycoreutils: none. However, in terms of packaging, there's a change: the top-level Makefile of policycoreutils now uses pkg-config to find libselinux and libsemanage. So building directly the subdirs no longer works because the variables defined by the top-level Makefile are no longer set. So we simplify the whole packaging by building from the top-level Makefile. In order for this pkg-config to work for the host variant, we need to pass $(HOST_MAKE_ENV) in the environment of make, so we also did the same for consistency with $(TARGET_MAKE_ENV). In terms of dependencies: policycoreutils directly links with libselinux, libsemanage and libsepol, so all three are needed for both the target and host variants. And host-pkgconf is now needed for the host variant, as it's used to detect the dependent libraries. The patches also need to be refreshed, except 0003 that is dropped since it was a backport from upstream. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> merge policycoreutils Signed-off-by: Julien Olivain <ju.o@free.fr>
66 lines
2.1 KiB
Makefile
66 lines
2.1 KiB
Makefile
################################################################################
|
|
#
|
|
# policycoreutils
|
|
#
|
|
################################################################################
|
|
|
|
POLICYCOREUTILS_VERSION = 3.9
|
|
POLICYCOREUTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/$(POLICYCOREUTILS_VERSION)
|
|
POLICYCOREUTILS_LICENSE = GPL-2.0
|
|
POLICYCOREUTILS_LICENSE_FILES = LICENSE
|
|
POLICYCOREUTILS_CPE_ID_VENDOR = selinuxproject
|
|
|
|
POLICYCOREUTILS_DEPENDENCIES = libselinux libsemanage libsepol libcap-ng host-pkgconf $(TARGET_NLS_DEPENDENCIES)
|
|
POLICYCOREUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) LDLIBS=$(TARGET_NLS_LIBS)
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
|
|
POLICYCOREUTILS_DEPENDENCIES += libxcrypt
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
|
POLICYCOREUTILS_DEPENDENCIES += linux-pam
|
|
POLICYCOREUTILS_MAKE_OPTS += NAMESPACE_PRIV=y
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
|
POLICYCOREUTILS_DEPENDENCIES += audit
|
|
POLICYCOREUTILS_MAKE_OPTS += AUDIT_LOG_PRIV=y USE_AUDIT=y
|
|
endif
|
|
|
|
# Enable LSPP_PRIV if both audit and linux pam are enabled
|
|
ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_PACKAGE_AUDIT),yy)
|
|
POLICYCOREUTILS_MAKE_OPTS += LSPP_PRIV=y
|
|
endif
|
|
|
|
# We need to pass DESTDIR at build time because it's used by
|
|
# policycoreutils build system to find headers and libraries.
|
|
define POLICYCOREUTILS_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(POLICYCOREUTILS_MAKE_OPTS) \
|
|
DESTDIR=$(STAGING_DIR) all
|
|
endef
|
|
|
|
define POLICYCOREUTILS_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(POLICYCOREUTILS_MAKE_OPTS) \
|
|
DESTDIR=$(TARGET_DIR) install
|
|
endef
|
|
|
|
HOST_POLICYCOREUTILS_DEPENDENCIES = host-libselinux host-libsemanage host-libsepol host-pkgconf
|
|
|
|
# We need to pass PREFIX because it defaults to $(DESTDIR)/usr
|
|
HOST_POLICYCOREUTILS_MAKE_OPTS = \
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
PREFIX=$(HOST_DIR) \
|
|
ETCDIR=$(HOST_DIR)/etc \
|
|
SBINDIR=$(HOST_DIR)/sbin
|
|
|
|
define HOST_POLICYCOREUTILS_BUILD_CMDS
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_POLICYCOREUTILS_MAKE_OPTS) all
|
|
endef
|
|
|
|
define HOST_POLICYCOREUTILS_INSTALL_CMDS
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_POLICYCOREUTILS_MAKE_OPTS) install
|
|
endef
|
|
|
|
$(eval $(generic-package))
|
|
$(eval $(host-generic-package))
|