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