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