--- /dev/null
+config BR2_PACKAGE_SEPOLGEN
+ bool "sepolgen"
+ select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
+ depends on BR2_USE_WCHAR # python3
+ depends on BR2_USE_MMU # python3
+ depends on BR2_TOOLCHAIN_HAS_THREADS # python3
+ depends on !BR2_STATIC_LIBS # python3
+ help
+ This package contains a Python module that forms the core of
+ the modern audit2allow (which is a part of the package
+ policycoreutils). It contains infrastructure for parsing
+ SELinux related messages as produced by the audit system.
+ It has facilities for generating policy based on required
+ access.
+
+comment "sepolgen needs a toolchain w/ wchar, threads, dynamic library"
+ depends on BR2_USE_MMU
+ depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+ BR2_STATIC_LIBS
SEPOLGEN_LICENSE = GPL-2.0
SEPOLGEN_LICENSE_FILES = COPYING
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
+SEPOLGEN_DEPENDENCIES = python3
+SEPOLGEN_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) \
+ PYTHONLIBDIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
+else
+SEPOLGEN_DEPENDENCIES = python
+SEPOLGEN_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) \
+ PYTHONLIBDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
+endif
+
+define SEPOLGEN_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_SEPOLGEN_MAKE_CMDS) DESTDIR=$(TARGET_DIR)
+endef
+
+define SEPOLGEN_INSTALL_TARGET_CMDS
+ $(MAKE_ENV) $(MAKE) -C $(@D) $(SEPOLGEN_MAKE_CMDS) DESTDIR=$(TARGET_DIR) install
+endef
+
ifeq ($(BR2_PACKAGE_PYTHON3),y)
HOST_SEPOLGEN_DEPENDENCIES = host-python3
HOST_SEPOLGEN_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) \
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_SEPOLGEN_MAKE_CMDS) DESTDIR=$(HOST_DIR) install
endef
+$(eval $(generic-package))
$(eval $(host-generic-package))