blob: 445cb99b7e9034e513c22e73a5e53bf7c94a18c9 [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301require samhain.inc
2
3SRC_URI += "file://samhain-not-run-ptest-on-host.patch \
4 file://run-ptest \
5"
6
7PROVIDES += "samhain"
8
Patrick Williams213cb262021-08-07 19:21:33 -05009SYSTEMD_SERVICE:${PN} = "samhain.service"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053010
11inherit ptest
12
13do_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
Patrick Williams213cb262021-08-07 19:21:33 -050021do_install:append() {
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053022 ln -sf ${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/samhain
23}
24
25do_install_ptest() {
26 mkdir -p ${D}${PTEST_PATH}
27 install ${S}/cutest ${D}${PTEST_PATH}
28}
29
Patrick Williams213cb262021-08-07 19:21:33 -050030RPROVIDES:${PN} += "samhain"
31RCONFLICTS:${PN} = "samhain-client samhain-server"