lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame^] | 1 | SUMMARY = "SELinux binary policy manipulation library" |
| 2 | DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ |
| 3 | It is used by checkpolicy (the policy compiler) and similar tools, as well \ |
| 4 | as by programs like load_policy that need to perform specific transformations \ |
| 5 | on binary policies such as customizing policy boolean settings." |
| 6 | SECTION = "base" |
| 7 | LICENSE = "LGPLv2.1+" |
| 8 | |
| 9 | inherit lib_package python3native |
| 10 | |
| 11 | DEPENDS += "libsepol libselinux bzip2 python3 bison-native flex-native swig-native" |
| 12 | DEPENDS_append_class-target = " audit" |
| 13 | |
| 14 | PACKAGES =+ "${PN}-python" |
| 15 | |
| 16 | # For /usr/libexec/selinux/semanage_migrate_store |
| 17 | RDEPENDS_${PN}-python += "python3-core" |
| 18 | |
| 19 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ |
| 20 | ${libexecdir}/selinux/semanage_migrate_store" |
| 21 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" |
| 22 | |
| 23 | FILES_${PN} += "${libexecdir}" |
| 24 | |
| 25 | EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y" |
| 26 | |
| 27 | do_compile_append() { |
| 28 | oe_runmake pywrap \ |
| 29 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ |
| 30 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ |
| 31 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' |
| 32 | } |
| 33 | |
| 34 | do_install_append() { |
| 35 | oe_runmake install-pywrap \ |
| 36 | PYCEXT='.so' \ |
| 37 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ |
| 38 | PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' |
| 39 | |
| 40 | # Update "policy-version" for semanage.conf |
| 41 | sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 31/' \ |
| 42 | ${D}/etc/selinux/semanage.conf |
| 43 | } |
| 44 | |
| 45 | BBCLASSEXTEND = "native" |