39 lines
1.4 KiB
Bash
39 lines
1.4 KiB
Bash
# Template file for 'suricata'
|
|
pkgname=suricata
|
|
version=4.0.3
|
|
revision=2
|
|
build_style=gnu-configure
|
|
configure_args="--disable-gccmarch-native"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libnet-devel libpcap-devel pcre-devel libyaml-devel libcap-ng-devel file-devel"
|
|
short_desc="Next Generation Intrusion Detection and Prevention Engine"
|
|
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
|
license="GPL-2"
|
|
homepage="https://suricata-ids.org/"
|
|
distfiles="https://www.openinfosecfoundation.org/download/$pkgname-$version.tar.gz
|
|
https://rules.emergingthreats.net/open/suricata/emerging.rules.tar.gz"
|
|
checksum="81a0bcb10b5c0b00efeafb4aac3ef70bf0e36b060ac6300d867f15f3dbe0e437
|
|
4670a50ad4620b56b0af947a425276b16087bde4838ecd27ba325bb862e927de"
|
|
|
|
system_accounts="$pkgname"
|
|
conf_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
|
|
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
|
|
}
|