Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | DESCRIPTION = "Selection of tools for developers working with Smack" |
| 2 | HOMEPAGE = "https://github.com/smack-team/smack" |
| 3 | SECTION = "Security/Access Control" |
| 4 | LICENSE = "LGPL-2.1" |
| 5 | |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
| 7 | |
| 8 | SRCREV = "4a102c7584b39ce693995ffb65e0918a9df98dd8" |
| 9 | SRC_URI = " \ |
| 10 | git://github.com/smack-team/smack.git \ |
| 11 | file://smack_generator_make_fixup.patch \ |
| 12 | file://run-ptest" |
| 13 | |
| 14 | PV = "1.3.1" |
| 15 | |
Brad Bishop | a48c014 | 2020-01-06 09:48:41 -0500 | [diff] [blame^] | 16 | inherit autotools update-rc.d pkgconfig ptest |
| 17 | inherit ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} |
| 18 | inherit features_check |
| 19 | |
| 20 | REQUIRED_DISTRO_FEATURES = "smack" |
| 21 | |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
| 25 | PACKAGECONFIG ??= "" |
| 26 | PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" |
| 27 | |
| 28 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd" |
| 29 | |
| 30 | do_compile_append () { |
| 31 | oe_runmake -C ${S}/tests generator |
| 32 | } |
| 33 | |
| 34 | do_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 | |
| 42 | do_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 | |
| 49 | INITSCRIPT_PACKAGES = "${PN}" |
| 50 | INITSCRIPT_NAME = "smack" |
| 51 | INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ." |
| 52 | |
| 53 | FILES_${PN} += "${sysconfdir}/init.d/smack" |
| 54 | FILES_${PN}-ptest += "generator" |
| 55 | |
Brad Bishop | 36166cd | 2019-08-26 01:31:32 -0400 | [diff] [blame] | 56 | RDEPENDS_${PN} += "coreutils python3-core" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 57 | RDEPENDS_${PN}-ptest += "make bash bc" |
| 58 | |
| 59 | BBCLASSEXTEND = "native" |