diff options
Diffstat (limited to 'recipes-security/selinux/libselinux-python_3.2.bb')
-rw-r--r-- | recipes-security/selinux/libselinux-python_3.2.bb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes-security/selinux/libselinux-python_3.2.bb b/recipes-security/selinux/libselinux-python_3.2.bb new file mode 100644 index 0000000..b741449 --- /dev/null +++ b/recipes-security/selinux/libselinux-python_3.2.bb | |||
@@ -0,0 +1,50 @@ | |||
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 python3native python3targetconfig | ||
12 | |||
13 | FILESEXTRAPATHS_prepend := "${THISDIR}/libselinux:" | ||
14 | SRC_URI += "\ | ||
15 | file://0001-Makefile-fix-python-modules-install-path-for-multili.patch \ | ||
16 | file://0001-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch \ | ||
17 | " | ||
18 | |||
19 | S = "${WORKDIR}/git/libselinux" | ||
20 | |||
21 | DEPENDS += "python3 swig-native libpcre libsepol" | ||
22 | RDEPENDS_${PN} += "libselinux python3-core python3-shell" | ||
23 | |||
24 | def get_policyconfigarch(d): | ||
25 | import re | ||
26 | target = d.getVar('TARGET_ARCH') | ||
27 | p = re.compile('i.86') | ||
28 | target = p.sub('i386',target) | ||
29 | return "ARCH=%s" % (target) | ||
30 | |||
31 | EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" | ||
32 | EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' LIBSEPOLA='${STAGING_LIBDIR}/libsepol.a'" | ||
33 | EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts" | ||
34 | |||
35 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
36 | INSANE_SKIP_${PN} = "dev-so" | ||
37 | |||
38 | do_compile() { | ||
39 | oe_runmake pywrap -j1 \ | ||
40 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ | ||
41 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ | ||
42 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' | ||
43 | } | ||
44 | |||
45 | do_install() { | ||
46 | oe_runmake install-pywrap \ | ||
47 | DESTDIR=${D} \ | ||
48 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ | ||
49 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' | ||
50 | } | ||