blob: 9b238c87219302dcec4703caeac71d7fb4b168cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
SUMMARY = "SELinux binary policy manipulation library"
DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \
It is used by checkpolicy (the policy compiler) and similar tools, as well \
as by programs like load_policy that need to perform specific transformations \
on binary policies such as customizing policy boolean settings."
SECTION = "base"
LICENSE = "LGPLv2.1+"
inherit lib_package python-dir
DEPENDS += "libsepol libselinux bzip2 python bison-native flex-native swig-native"
DEPENDS_append_class-target += "audit"
# For /usr/libexec/selinux/semanage_migrate_store
RDEPENDS_${PN} += "python"
PACKAGES += "${PN}-python"
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y"
do_compile_append() {
oe_runmake pywrap \
INCLUDEDIR='${STAGING_INCDIR}' \
LIBDIR='${STAGING_LIBDIR}' \
PYLIBVER='python${PYTHON_BASEVERSION}' \
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
PYTHONLIBDIR='${PYLIB}'
}
do_install() {
oe_runmake install \
DESTDIR="${D}" \
PREFIX="${D}/${prefix}" \
INCLUDEDIR="${D}/${includedir}" \
LIBDIR="${D}/${libdir}" \
SHLIBDIR="${D}/${libdir}"
oe_runmake install-pywrap swigify \
DESTDIR=${D} \
PYCEXT='.so' \
PYSITEDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
PYLIBVER='python${PYTHON_BASEVERSION}' \
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
# Update "policy-version" for semanage.conf
sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 30/' \
${D}/etc/selinux/semanage.conf
}
BBCLASSEXTEND = "native"
|