diff options
Diffstat (limited to 'recipes-security/selinux/libselinux-python_3.5.bb')
-rw-r--r-- | recipes-security/selinux/libselinux-python_3.5.bb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes-security/selinux/libselinux-python_3.5.bb b/recipes-security/selinux/libselinux-python_3.5.bb new file mode 100644 index 0000000..3555a72 --- /dev/null +++ b/recipes-security/selinux/libselinux-python_3.5.bb | |||
@@ -0,0 +1,55 @@ | |||
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 python3targetconfig pkgconfig | ||
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 | " | ||
18 | |||
19 | S = "${WORKDIR}/git/libselinux" | ||
20 | |||
21 | DEPENDS = "libsepol libpcre2 swig-native python3-setuptools-scm-native" | ||
22 | DEPENDS:append:libc-musl = " fts" | ||
23 | |||
24 | RDEPENDS:${PN} = "libselinux python3-core python3-shell" | ||
25 | |||
26 | def get_policyconfigarch(d): | ||
27 | import re | ||
28 | target = d.getVar('TARGET_ARCH') | ||
29 | p = re.compile('i.86') | ||
30 | target = p.sub('i386',target) | ||
31 | return "ARCH=%s" % (target) | ||
32 | |||
33 | EXTRA_OEMAKE = "${@get_policyconfigarch(d)}" | ||
34 | EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" | ||
35 | |||
36 | FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
37 | INSANE_SKIP:${PN} = "dev-so" | ||
38 | |||
39 | do_compile() { | ||
40 | oe_runmake pywrap -j1 \ | ||
41 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
42 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ | ||
43 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' | ||
44 | } | ||
45 | |||
46 | do_install() { | ||
47 | oe_runmake install-pywrap \ | ||
48 | DESTDIR=${D} \ | ||
49 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
50 | PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' | ||
51 | |||
52 | # Fix buildpaths issue | ||
53 | sed -i -e 's,${WORKDIR},,g' \ | ||
54 | ${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/direct_url.json | ||
55 | } | ||