blob: e690ac55a48ebeb0fcfd39237369916100a5b803 [file] [log] [blame]
lh758261d2023-07-13 05:52:04 -07001SUMMARY = "Python modules and various SELinux utilities."
2DESCRIPTION = "\
3This package contains Python modules sepolgen, sepolicy; And the \
4SELinux utilities audit2allow, chcat, semanage ..."
5
6SECTION = "base"
7LICENSE = "GPLv2+"
8
9SRC_URI += "file://fix-sepolicy-install-path.patch"
10
11inherit python3native
12
13DEPENDS += "python3 libsepol"
14RDEPENDS_${BPN}-audit2allow += "\
15 python3-core \
16 libselinux-python \
17 ${BPN}-sepolgen \
18"
19RDEPENDS_${BPN}-chcat += "\
20 python3-core \
21 python3-codecs \
22 python3-shell \
23 python3-stringold \
24 python3-unixadmin \
25 libselinux-python \
26 ${BPN} \
27"
28RDEPENDS_${BPN} += "\
29 python3-core \
30 python3-codecs \
31 python3-io \
32 python3-ipy \
33 python3-stringold \
34 python3-syslog \
35 python3-unixadmin \
36 libselinux-python \
37 libsemanage-python \
38 setools \
39"
40RDEPENDS_${BPN}-semanage += "\
41 python3-core \
42 python3-ipy \
43 python3-compression \
44 python3-xml \
45 python3-misc \
46 libselinux-python \
47 ${BPN} \
48"
49RDEPENDS_${BPN}-sepolicy += "\
50 python3-core \
51 python3-codecs \
52 python3-syslog \
53 ${BPN} \
54"
55RDEPENDS_${BPN}-sepolgen-ifgen += "\
56 python3-core \
57 libselinux-python \
58"
59
60PACKAGES =+ "\
61 ${PN}-audit2allow \
62 ${PN}-sepolgen-ifgen \
63 ${PN}-chcat \
64 ${PN}-semanage \
65 ${PN}-sepolgen \
66 ${PN}-sepolicy \
67"
68FILES_${PN}-audit2allow = "\
69 ${bindir}/audit2allow \
70 ${bindir}/audit2why \
71"
72FILES_${PN}-chcat = "\
73 ${bindir}/chcat \
74"
75FILES_${PN}-semanage = "\
76 ${sbindir}/semanage \
77 ${datadir}/bash-completion/completions/semanage \
78"
79# The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy
80FILES_${PN}-sepolicy += "\
81 ${bindir}/sepolgen \
82 ${bindir}/sepolicy \
83 ${datadir}/bash-completion/completions/sepolicy \
84"
85FILES_${PN}-sepolgen-ifgen += "\
86 ${bindir}/sepolgen-ifgen \
87 ${bindir}/sepolgen-ifgen-attr-helper \
88"
89FILES_${PN}-sepolgen += "\
90 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolgen* \
91 ${localstatedir}/lib/sepolgen/perm_map \
92"
93
94FILES_${PN} += "\
95 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \
96 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info \
97 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/* \
98"
99
100EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a"
101
102do_install() {
103 oe_runmake DESTDIR="${D}" \
104 PYLIBVER='python${PYTHON_BASEVERSION}' \
105 PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
106 install
107}