Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | require samhain.inc |
| 2 | |
| 3 | SRC_URI += "file://samhain-not-run-ptest-on-host.patch \ |
| 4 | file://run-ptest \ |
| 5 | " |
| 6 | |
| 7 | PROVIDES += "samhain" |
| 8 | |
| 9 | SYSTEMD_SERVICE_${PN} = "samhain.service" |
| 10 | |
| 11 | inherit ptest |
| 12 | |
| 13 | do_compile() { |
| 14 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'yes', 'no', d)}" = "yes" ]; then |
| 15 | oe_runmake cutest |
| 16 | rm -f ${S}*.o config_xor.h internal.h |
| 17 | fi |
| 18 | oe_runmake "$@" |
| 19 | } |
| 20 | |
| 21 | do_install_append() { |
| 22 | ln -sf ${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/samhain |
| 23 | } |
| 24 | |
| 25 | do_install_ptest() { |
| 26 | mkdir -p ${D}${PTEST_PATH} |
| 27 | install ${S}/cutest ${D}${PTEST_PATH} |
| 28 | } |
| 29 | |
| 30 | RPROVIDES_${PN} += "samhain" |
| 31 | RCONFLICTS_${PN} = "samhain-client samhain-server" |