suricata: download emerging.rules.tar.gz w/o csum
The file emerging.rules.tar.gz is not versioned and changes every now and then thus download it in post_fetch() and extract it into the builddir for the rules to be added to the package.
This commit is contained in:
parent
1eb193fea8
commit
69ed65372c
1 changed files with 10 additions and 6 deletions
|
@ -10,14 +10,18 @@ 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="617e83b6e20b03aa7d5e05a980d3cb6d2810ec18a6f15a36bf66c81c9c0a2abb
|
||||
c5d5b5eef1326a5be52bb487f3706d12e1f70aaee060ce4b8d807aa9f5e77207"
|
||||
distfiles="https://www.openinfosecfoundation.org/download/$pkgname-$version.tar.gz"
|
||||
checksum="617e83b6e20b03aa7d5e05a980d3cb6d2810ec18a6f15a36bf66c81c9c0a2abb"
|
||||
|
||||
system_accounts="$pkgname"
|
||||
conf_files="/etc/$pkgname/*.* /etc/$pkgname/rules/*"
|
||||
|
||||
post_extract() {
|
||||
$XBPS_FETCH_CMD https://rules.emergingthreats.net/open/suricata/emerging.rules.tar.gz
|
||||
mkdir -p erules
|
||||
tar xf emerging.rules.tar.gz -C erules
|
||||
}
|
||||
|
||||
post_build() {
|
||||
sed -i 's|#run-as:|run-as:|g' $pkgname.yaml
|
||||
sed -i "s|# user: suri| user: $pkgname|g" $pkgname.yaml
|
||||
|
@ -33,6 +37,6 @@ post_install() {
|
|||
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
|
||||
vcopy erules/rules/*.rules etc/$pkgname/rules
|
||||
vlicense erules/rules/LICENSE emerging-rules.LICENSE
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue