diff options
Diffstat (limited to 'recipes-security/selinux/libselinux_3.6.bb')
-rw-r--r-- | recipes-security/selinux/libselinux_3.6.bb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-security/selinux/libselinux_3.6.bb b/recipes-security/selinux/libselinux_3.6.bb new file mode 100644 index 0000000..dab4965 --- /dev/null +++ b/recipes-security/selinux/libselinux_3.6.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "SELinux library and simple utilities" | ||
2 | DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \ | ||
3 | process and file security contexts and to obtain security policy \ | ||
4 | decisions. Required for any applications that use the SELinux API." | ||
5 | SECTION = "base" | ||
6 | LICENSE = "PD" | ||
7 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | ||
8 | |||
9 | require selinux_common.inc | ||
10 | |||
11 | inherit lib_package pkgconfig python3targetconfig | ||
12 | |||
13 | FILESEXTRAPATHS:prepend := "${THISDIR}/libselinux:" | ||
14 | SRC_URI += "\ | ||
15 | file://0001-Makefile-fix-python-modules-install-path-for-multili.patch \ | ||
16 | file://0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch \ | ||
17 | file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch \ | ||
18 | " | ||
19 | |||
20 | S = "${WORKDIR}/git/libselinux" | ||
21 | |||
22 | DEPENDS = "libsepol libpcre2 swig-native python3-setuptools-scm-native" | ||
23 | DEPENDS:append:libc-musl = " fts" | ||
24 | |||
25 | def get_policyconfigarch(d): | ||
26 | import re | ||
27 | target = d.getVar('TARGET_ARCH') | ||
28 | p = re.compile('i.86') | ||
29 | target = p.sub('i386',target) | ||
30 | return "ARCH=%s" % (target) | ||
31 | |||
32 | EXTRA_OEMAKE = "${@get_policyconfigarch(d)}" | ||
33 | EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" | ||
34 | |||
35 | do_compile:append() { | ||
36 | oe_runmake pywrap -j1 \ | ||
37 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
38 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ | ||
39 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' | ||
40 | } | ||
41 | |||
42 | do_install:append() { | ||
43 | oe_runmake install-pywrap \ | ||
44 | DESTDIR=${D} \ | ||
45 | PREFIX=${prefix} | ||
46 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
47 | PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' | ||
48 | |||
49 | # Fix buildpaths issue | ||
50 | sed -i -e 's,${WORKDIR},,g' \ | ||
51 | ${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/direct_url.json | ||
52 | } | ||
53 | |||
54 | PACKAGES += "${PN}-python" | ||
55 | RDEPENDS:${PN}-python = "python3-core python3-shell" | ||
56 | |||
57 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
58 | INSANE_SKIP:${PN}-python = "dev-so" | ||
59 | |||
60 | BBCLASSEXTEND = "native" | ||