# Contributor (Arch) : M0Rf30 # Contributor (Arch) : Lukas Fleischer # Contributor (Arch) : Hugo Doria # Contributor (Arch) : Kessia 'even' Pinheiro # Contributor (Arch) : dorphell # Contributor (Arch) : Gregor Ibic # Maintainer (Parabola) : Aurélien DESBRIÈRES pkgname=snort pkgver=2.9.7.0 pkgrel=1 pkgdesc='A lightweight network intrusion detection system.' arch=('i686' 'x86_64' 'mips64el') url='http://www.snort.org' license=('GPL') depends=('libdaq' 'libdnet' 'libpcap' 'openssl' 'pcre' 'zlib') backup=('etc/snort/snort.conf' 'etc/snort/threshold.conf' 'etc/snort/reference.config' 'etc/snort/classification.config') options=('!makeflags' '!libtool') install='snort.install' source=("http://www.${pkgname}.org/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz" "http://rules.emergingthreats.net/open/${pkgname}-2.9.0/emerging.rules.tar.gz" 'snort.service') md5sums=('c2a45bc56441ee9456478f219dd8d1e2' '183bf888ede30967ac0ebc3f046097cf' '43ed16fd3906854528a62a58f88f7227') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr --sysconfdir=/etc/snort --with-libpcap-includes=/usr/include/pcap \ --with-daq-includes=/usr/include --with-daq-libraries=/usr/lib/ \ --enable-zlib --disable-static-daq make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install mkdir -p "${pkgdir}/etc/snort/rules" install -d -m755 "${pkgdir}/var/log/snort" install -D -m644 etc/{*.conf*,*.map} "${pkgdir}/etc/snort/" # init service file install -D -m644 ../snort.service $pkgdir/usr/lib/systemd/system/snort.service sed -i 's#/usr/local/lib/#/usr/lib/#' "${pkgdir}/etc/snort/snort.conf" # emerginthreats rules echo 'include $RULE_PATH/emerging.conf' >> "${pkgdir}/etc/snort/snort.conf" cp ${srcdir}/rules/* "${pkgdir}/etc/snort/rules" }