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 | |
| 16 | inherit autotools update-rc.d pkgconfig ptest ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | PACKAGECONFIG ??= "" |
| 21 | PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" |
| 22 | |
| 23 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd" |
| 24 | |
| 25 | do_compile_append () { |
| 26 | oe_runmake -C ${S}/tests generator |
| 27 | } |
| 28 | |
| 29 | do_install_append () { |
| 30 | install -d ${D}${sysconfdir}/init.d |
| 31 | install -d ${D}${sysconfdir}/smack |
| 32 | install -d ${D}${sysconfdir}/smack/accesses.d |
| 33 | install -d ${D}${sysconfdir}/smack/cipso.d |
| 34 | install ${S}/init/smack.rc ${D}/${sysconfdir}/init.d/smack |
| 35 | } |
| 36 | |
| 37 | do_install_ptest () { |
| 38 | install -d ${D}${PTEST_PATH}/tests |
| 39 | install ${S}/tests/generator ${D}/${PTEST_PATH}/tests |
| 40 | install ${S}/tests/generate-rules.sh ${D}${PTEST_PATH}/tests |
| 41 | install ${S}/tests/make_policies.bash ${D}${PTEST_PATH}/tests |
| 42 | } |
| 43 | |
| 44 | INITSCRIPT_PACKAGES = "${PN}" |
| 45 | INITSCRIPT_NAME = "smack" |
| 46 | INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ." |
| 47 | |
| 48 | FILES_${PN} += "${sysconfdir}/init.d/smack" |
| 49 | FILES_${PN}-ptest += "generator" |
| 50 | |
| 51 | RDEPENDS_${PN} += "coreutils" |
| 52 | RDEPENDS_${PN}-ptest += "make bash bc" |
| 53 | |
| 54 | BBCLASSEXTEND = "native" |