suricata: include emerging ruleset and service

This commit is contained in:
Andrea Brancaleoni 2017-03-26 18:10:21 +02:00
parent 87fb260ccc
commit daa79a1889
2 changed files with 27 additions and 5 deletions

View File

@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
[ -r conf ] && . ./conf
exec suricata -i ${INTERFACE:=eth0} ${OPTS}

View File

@ -1,7 +1,7 @@
# Template file for 'suricata'
pkgname=suricata
version=3.2.1
revision=2
revision=3
build_style=gnu-configure
configure_args="--disable-gccmarch-native"
hostmakedepends="pkg-config"
@ -10,13 +10,31 @@ short_desc="Next Generation Intrusion Detection and Prevention Engine"
maintainer="demiaster <marta.celeste.feriani@gmail.com>"
license="GPL-2"
homepage="https://suricata-ids.org/"
distfiles="https://www.openinfosecfoundation.org/download/$pkgname-$version.tar.gz"
checksum=0e0b0cf49016804bb2fb1fc4327341617e76a67902f4e03e0ef6d16c1d7d3994
distfiles="https://www.openinfosecfoundation.org/download/$pkgname-$version.tar.gz
https://rules.emergingthreats.net/open/suricata/emerging.rules.tar.gz"
checksum="0e0b0cf49016804bb2fb1fc4327341617e76a67902f4e03e0ef6d16c1d7d3994
82f7bbfd45f101a2247f62021bd304db1a6c246ed29b1771ed5cd53ac4b4af31"
system_accounts="$pkgname"
make_dirs="/var/log/$pkgname 0755 $pkgname $pkgname
/var/lib/$pkgname 0755 $pkgname $pkgname"
confs_files="/etc/$pkgname/* /etc/$pkgname/rules/*"
post_build() {
sed -i 's|#run-as:|run-as:|g' $pkgname.yaml
sed -i "s|# user: suri| user: $pkgname|g" $pkgname.yaml
sed -i "s|# group: suri| group: $pkgname|g" $pkgname.yaml
sed -i "s|#daemon-directory: \"/\"|daemon-directory: \"/var/lib/suricata\"|g" $pkgname.yaml
}
post_install() {
vsv $pkgname
vinstall $pkgname.yaml 644 etc/$pkgname
vinstall classification.config 644 etc/$pkgname/classification.config
vinstall reference.config 644 etc/$pkgname/reference.config
vinstall classification.config 644 etc/$pkgname
vinstall reference.config 644 etc/$pkgname
vinstall threshold.config 644 etc/$pkgname
vmkdir etc/$pkgname/rules
vcopy rules/*.rules etc/$pkgname/rules
vcopy ../rules/*.rules etc/$pkgname/rules
vlicense ../rules/LICENSE emerging-rules.LICENSE
}