blob: ae9ed2b13b2858aeab6cf82887f1fb1b237be49e [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 \
Patrick Williams92b42cb2022-09-03 06:53:57 -05004 file://0001-Don-t-expose-configure-args.patch \
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05305 file://run-ptest \
6"
7
8PROVIDES += "samhain"
9
Patrick Williamsb9af8752023-01-30 13:28:01 -060010MODE_NAME = "standalone"
11SAMHAIN_MODE = "no"
12
Patrick Williams213cb262021-08-07 19:21:33 -050013SYSTEMD_SERVICE:${PN} = "samhain.service"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053014
15inherit ptest
16
17do_compile() {
18 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'yes', 'no', d)}" = "yes" ]; then
19 oe_runmake cutest
20 rm -f ${S}*.o config_xor.h internal.h
21 fi
22 oe_runmake "$@"
23}
24
Patrick Williams213cb262021-08-07 19:21:33 -050025do_install:append() {
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053026 ln -sf ${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/samhain
27}
28
29do_install_ptest() {
30 mkdir -p ${D}${PTEST_PATH}
31 install ${S}/cutest ${D}${PTEST_PATH}
32}
33
Patrick Williams213cb262021-08-07 19:21:33 -050034RPROVIDES:${PN} += "samhain"
35RCONFLICTS:${PN} = "samhain-client samhain-server"