void-packages/srcpkgs/zeek/template

87 lines
2.2 KiB
Bash

# Template file for 'zeek'
pkgname=zeek
version=3.2.0
revision=1
archs="x86_64* i686* aarch64* armv7* ppc64*"
build_style=cmake
hostmakedepends="flex pkg-config python3 libpcap-devel libressl-devel
bind-devel zlib-devel"
makedepends="bind-devel geoip-devel libpcap-devel libressl-devel zlib-devel"
short_desc="Advanced framework for network traffic analysis"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="BSD-3-Clause"
homepage="https://www.zeek.org"
distfiles="https://old.zeek.org/downloads/zeek-${version}.tar.gz"
checksum=af3ee5635140a54d305667983d38ea28f36457c9f2f8727e90ea3ef00b22c44f
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-fts-devel musl-legacy-compat"
fi
post_patch() {
# no cpuid check in highwayhash for ppc since
# google pretends older hardware does not exist
case "$XBPS_TARGET_MACHINE" in
ppc64le*) ;;
ppc*)
vsed -i 's/"power"/"google-sucks"/' src/CMakeLists.txt
vsed -i 's/HH_ARCH_PPC/HH_ARCH_GOOGLE_SUCKS/g' \
auxil/highwayhash/highwayhash/instruction_sets.h
;;
esac
}
pre_configure() {
if [ "$CROSS_BUILD" ]; then
mkdir -p native
cd native
CC=$CC_FOR_BUILD CFLAGS="$CFLAGS_FOR_BUILD" \
CXX=$CXX_FOR_BUILD CXXFLAGS="$CXXFLAGS_FOR_BUILD" \
LD=$LD_FOR_BUILD LDFLAGS="$LDFLAGS_FOR_BUILD" \
cmake ..
make ${makejobs} binpac bifcl
configure_args+="
-DBIFCL_EXE_PATH:PATH=${wrksrc}/native/auxil/bifcl/bifcl
-DBINPAC_EXE_PATH:PATH=${wrksrc}/native/auxil/binpac/src/binpac"
cd ..
fi
}
post_install() {
vsv zeek
vsv bro
vlicense COPYING
}
zeek-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/bin/*-config"
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share/zeek/cmake
}
}
bro_package() {
archs=noarch
build_style=meta
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" (transitional dummy package)"
}
binpac_package() {
short_desc+=" - protocol parser compiler (transitional)"
build_style=meta
archs=noarch
depends="${sourcepkg}>=${version}_${revision}"
}
binpac-devel_package() {
short_desc+=" - protocol parser compiler library (transitional)"
build_style=meta
archs=noarch
depends="${sourcepkg}-devel>=${version}_${revision}"
}