Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | DESCRIPTION = "snort - a free lightweight network intrusion detection system for UNIX and Windows." |
| 2 | HOMEPAGE = "http://www.snort.org/" |
| 3 | SECTION = "net" |
| 4 | LICENSE = "GPL-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" |
| 6 | |
| 7 | DEPENDS = "libpcap libpcre daq libdnet util-linux" |
| 8 | |
| 9 | SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \ |
| 10 | file://snort.init \ |
| 11 | file://disable-inaddr-none.patch \ |
| 12 | file://disable-dap-address-space-id.patch \ |
| 13 | file://disable-daq-flow-id.patch \ |
| 14 | file://disable-daq-verdict-retry.patch \ |
| 15 | file://0001-libpcap-search-sysroot-for-headers.patch \ |
| 16 | file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \ |
| 17 | " |
| 18 | |
| 19 | SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202" |
| 20 | SRC_URI[tarball.sha256sum] = "ad03f11b5301b16642199a86aa90388eaa53f5003f83b0c5595745a490047be1" |
| 21 | |
| 22 | inherit autotools gettext update-rc.d pkgconfig |
| 23 | |
| 24 | INITSCRIPT_NAME = "snort" |
| 25 | INITSCRIPT_PARAMS = "defaults" |
| 26 | |
| 27 | EXTRA_OECONF = " \ |
| 28 | --enable-gre \ |
| 29 | --enable-linux-smp-stats \ |
| 30 | --enable-reload \ |
| 31 | --enable-reload-error-restart \ |
| 32 | --enable-targetbased \ |
| 33 | --disable-static-daq \ |
| 34 | --with-dnet-includes=${STAGING_INCDIR} \ |
| 35 | --with-dnet-libraries=${STAGING_LIBDIR} \ |
| 36 | --with-libpcre-includes=${STAGING_INCDIR} \ |
| 37 | --with-libpcre-libraries=${STAGING_LIBDIR} \ |
| 38 | --with-daq-includes=${STAGING_INCDIR} \ |
| 39 | --with-daq-libraries=${STAGING_LIBDIR} \ |
| 40 | " |
| 41 | |
| 42 | # if you want to disable it, you need to patch configure.in first |
| 43 | # AC_CHECK_HEADERS([openssl/sha.h],, SHA_H="no") |
| 44 | # is called even with --without-openssl-includes |
| 45 | PACKAGECONFIG ?= "openssl" |
| 46 | PACKAGECONFIG[openssl] = "--with-openssl-includes=${STAGING_INCDIR} --with-openssl-libraries=${STAGING_LIBDIR}, --without-openssl-includes --without-openssl-libraries, openssl," |
| 47 | |
| 48 | do_install_append() { |
| 49 | install -d ${D}${sysconfdir}/snort/rules |
| 50 | install -d ${D}${sysconfdir}/snort/preproc_rules |
| 51 | install -d ${D}${sysconfdir}/init.d |
| 52 | for i in map config conf dtd; do |
| 53 | cp ${S}/etc/*.$i ${D}${sysconfdir}/snort/ |
| 54 | done |
| 55 | cp ${S}/preproc_rules/*.rules ${D}${sysconfdir}/snort/preproc_rules/ |
| 56 | install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort |
| 57 | mkdir -p ${D}${localstatedir}/log/snort |
| 58 | install -d ${D}/var/log/snort |
| 59 | } |
| 60 | |
| 61 | FILES_${PN} += " \ |
| 62 | ${libdir}/snort_dynamicengine/*.so.* \ |
| 63 | ${libdir}/snort_dynamicpreprocessor/*.so.* \ |
| 64 | ${libdir}/snort_dynamicrules/*.so.* \ |
| 65 | " |
| 66 | FILES_${PN}-dbg += " \ |
| 67 | ${libdir}/snort_dynamicengine/.debug \ |
| 68 | ${libdir}/snort_dynamicpreprocessor/.debug \ |
| 69 | ${libdir}/snort_dynamicrules/.debug \ |
| 70 | " |
| 71 | FILES_${PN}-staticdev += " \ |
| 72 | ${libdir}/snort_dynamicengine/*.a \ |
| 73 | ${libdir}/snort_dynamicpreprocessor/*.a \ |
| 74 | ${libdir}/snort_dynamicrules/*.a \ |
| 75 | ${libdir}/snort/dynamic_preproc/*.a \ |
| 76 | ${libdir}/snort/dynamic_output/*.a \ |
| 77 | " |
| 78 | FILES_${PN}-dev += " \ |
| 79 | ${libdir}/snort_dynamicengine/*.la \ |
| 80 | ${libdir}/snort_dynamicpreprocessor/*.la \ |
| 81 | ${libdir}/snort_dynamicrules/*.la \ |
| 82 | ${libdir}/snort_dynamicengine/*.so \ |
| 83 | ${libdir}/snort_dynamicpreprocessor/*.so \ |
| 84 | ${libdir}/snort_dynamicrules/*.so \ |
| 85 | ${prefix}/src/snort_dynamicsrc \ |
| 86 | " |
| 87 | |
| 88 | # http://errors.yoctoproject.org/Errors/Details/35137/ |
| 89 | PNBLACKLIST[snort] ?= "BROKEN: QA Issue: snort_preproc.pc, snort_output.pc, snort.pc" |