void-packages/srcpkgs/zeek/template
2020-10-08 19:25:28 -06:00

83 lines
2.1 KiB
Bash

# Template file for 'zeek'
pkgname=zeek
version=3.2.2
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=6c5748c49207241977a0d9fcbac8ce3b6abbf866ff29469fd0c2dcd3d4f99d01
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() {
build_style=meta
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" (transitional dummy package)"
}
binpac_package() {
short_desc+=" - protocol parser compiler (transitional)"
build_style=meta
depends="${sourcepkg}>=${version}_${revision}"
}
binpac-devel_package() {
short_desc+=" - protocol parser compiler library (transitional)"
build_style=meta
depends="${sourcepkg}-devel>=${version}_${revision}"
}