blob: e16348670eece6ca88a972026a5d65d8f64f560a [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301SUMMARY = "The Suricata Engine is an Open Source Next Generation Intrusion Detection and Prevention Engine"
2
3require suricata.inc
4
5LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
6
7SRC_URI += " \
8 file://volatiles.03_suricata \
9 file://suricata.yaml \
10 "
11
12inherit autotools-brokensep pkgconfig python-dir
13
14CFLAGS += "-D_DEFAULT_SOURCE"
15
16CACHED_CONFIGUREVARS = "ac_cv_header_htp_htp_h=yes ac_cv_lib_htp_htp_conn_create=yes "
17
18EXTRA_OECONF += " --disable-debug \
19 --enable-non-bundled-htp \
20 --disable-gccmarch-native \
21 "
22
23PACKAGECONFIG ??= "htp jansson file pcre yaml pcap cap-ng net nfnetlink nss nspr"
24PACKAGECONFIG[htp] = "--with-libhtp-includes=${STAGING_INCDIR} --with-libhtp-libraries=${STAGING_LIBDIR}, ,libhtp,"
25PACKAGECONFIG[pcre] = "--with-libpcre-includes=${STAGING_INCDIR} --with-libpcre-libraries=${STAGING_LIBDIR}, ,libpcre ,"
26PACKAGECONFIG[yaml] = "--with-libyaml-includes=${STAGING_INCDIR} --with-libyaml-libraries=${STAGING_LIBDIR}, ,libyaml ,"
27PACKAGECONFIG[pcap] = "--with-libpcap-includes=${STAGING_INCDIR} --with-libpcap-libraries=${STAGING_LIBDIR}, ,libpcap ,"
28PACKAGECONFIG[cap-ng] = "--with-libcap_ng-includes=${STAGING_INCDIR} --with-libcap_ng-libraries=${STAGING_LIBDIR}, ,libcap-ng , "
29PACKAGECONFIG[net] = "--with-libnet-includes=${STAGING_INCDIR} --with-libnet-libraries=${STAGING_LIBDIR}, , libnet,"
30PACKAGECONFIG[nfnetlink] = "--with-libnfnetlink-includes=${STAGING_INCDIR} --with-libnfnetlink-libraries=${STAGING_LIBDIR}, ,libnfnetlink ,"
31
32PACKAGECONFIG[jansson] = "--with-libjansson-includes=${STAGING_INCDIR} --with-libjansson-libraries=${STAGING_LIBDIR},,jansson, jansson"
33PACKAGECONFIG[file] = ",,file, file"
34PACKAGECONFIG[nss] = "--with-libnss-includes=${STAGING_INCDIR} --with-libnss-libraries=${STAGING_LIBDIR}, nss, nss,"
35PACKAGECONFIG[nspr] = "--with-libnspr-includes=${STAGING_INCDIR} --with-libnspr-libraries=${STAGING_LIBDIR}, nspr, nspr,"
36PACKAGECONFIG[python] = "--enable-python, --disable-python, python, python"
37
38export logdir = "${localstatedir}/log"
39
40do_install_append () {
41 install -d ${D}${sysconfdir}/suricata
42 install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles
43 install -m 644 classification.config ${D}${sysconfdir}/suricata
44 install -m 644 reference.config ${D}${sysconfdir}/suricata
45 install -m 644 ${WORKDIR}/suricata.yaml ${D}${sysconfdir}/suricata
46 install -m 0644 ${WORKDIR}/volatiles.03_suricata ${D}${sysconfdir}/default/volatiles/volatiles.03_suricata
47}
48
49pkg_postinst_ontarget_${PN} () {
50if [ -e /etc/init.d/populate-volatile.sh ] ; then
51 ${sysconfdir}/init.d/populate-volatile.sh update
52fi
53 ${bindir}/suricata -c ${sysconfdir}/suricata.yaml -i eth0
54}
55
56PACKAGES += "${PN}-python"
57FILES_${PN} = "${bindir}/suricata ${sysconfdir}/default ${sysconfdir}/suricata ${logdir}/suricata"
58FILES_${PN}-python = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}"
59
60RDEPENDS_${PN}-python = "python"