blob: b1ea4e9ff472e11ffd5ca4f9a873f0dc9594f3b9 [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301DESCRIPTION = "Selection of tools for developers working with Smack"
2HOMEPAGE = "https://github.com/smack-team/smack"
3SECTION = "Security/Access Control"
4LICENSE = "LGPL-2.1"
5
6LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
7
8SRCREV = "4a102c7584b39ce693995ffb65e0918a9df98dd8"
9SRC_URI = " \
10 git://github.com/smack-team/smack.git \
11 file://smack_generator_make_fixup.patch \
12 file://run-ptest"
13
14PV = "1.3.1"
15
Brad Bishopa48c0142020-01-06 09:48:41 -050016inherit autotools update-rc.d pkgconfig ptest
17inherit ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
18inherit features_check
19
20REQUIRED_DISTRO_FEATURES = "smack"
21
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053022
23S = "${WORKDIR}/git"
24
25PACKAGECONFIG ??= ""
26PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
27
28PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd"
29
30do_compile_append () {
31 oe_runmake -C ${S}/tests generator
32}
33
34do_install_append () {
35 install -d ${D}${sysconfdir}/init.d
36 install -d ${D}${sysconfdir}/smack
37 install -d ${D}${sysconfdir}/smack/accesses.d
38 install -d ${D}${sysconfdir}/smack/cipso.d
39 install ${S}/init/smack.rc ${D}/${sysconfdir}/init.d/smack
40}
41
42do_install_ptest () {
43 install -d ${D}${PTEST_PATH}/tests
44 install ${S}/tests/generator ${D}/${PTEST_PATH}/tests
45 install ${S}/tests/generate-rules.sh ${D}${PTEST_PATH}/tests
46 install ${S}/tests/make_policies.bash ${D}${PTEST_PATH}/tests
47}
48
49INITSCRIPT_PACKAGES = "${PN}"
50INITSCRIPT_NAME = "smack"
51INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ."
52
53FILES_${PN} += "${sysconfdir}/init.d/smack"
54FILES_${PN}-ptest += "generator"
55
Brad Bishop36166cd2019-08-26 01:31:32 -040056RDEPENDS_${PN} += "coreutils python3-core"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053057RDEPENDS_${PN}-ptest += "make bash bc"
58
59BBCLASSEXTEND = "native"