1config BR2_PACKAGE_SELINUX_PYTHON
2	bool "selinux-python"
3	depends on BR2_USE_MMU
4	depends on BR2_USE_WCHAR
5	depends on BR2_TOOLCHAIN_HAS_THREADS
6	depends on !BR2_STATIC_LIBS
7	select BR2_PACKAGE_PYTHON3
8	help
9	  A set of SELinux tools written in python that help with
10	  managing a system with SELinux enabled. If no packages are
11	  selected nothing will actually be built.
12
13	  https://github.com/SELinuxProject/selinux/wiki
14
15if BR2_PACKAGE_SELINUX_PYTHON
16
17config BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW
18	bool "audit2allow"
19	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # semodule-utils -> libsepol
20	select BR2_PACKAGE_CHECKPOLICY
21	select BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
22	select BR2_PACKAGE_SEMODULE_UTILS
23	help
24	  This module installs two programs:
25
26	  audit2allow - Generate SELinux policy allow/dontaudit rules
27	  from logs of denied operations.
28
29	  audit2why - translates SELinux audit messages into a
30	  description of why the access was denied (audit2allow -w)
31
32comment "audit2allow needs a toolchain w/ gcc 5"
33	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
34
35config BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
36	bool "sepolgen"
37	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # semodule-utils -> libsepol
38	select BR2_PACKAGE_SEMODULE_UTILS
39	help
40	  This package contains a Python module that allows you to
41	  generate an initial SELinux policy module template.
42
43comment "sepolgen needs a toolchain w/ gcc 5"
44	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
45
46endif
47
48comment "selinux-python packages needs a toolchain w/ wchar, threads, dynamic library"
49	depends on BR2_USE_MMU
50	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
51		BR2_STATIC_LIBS
52