e2a21ccfd6
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
85 lines
2.2 KiB
Bash
85 lines
2.2 KiB
Bash
# Template file for 'zeek'
|
|
pkgname=zeek
|
|
version=4.0.1
|
|
revision=1
|
|
archs="x86_64* i686* aarch64* armv7* ppc64*"
|
|
build_style=cmake
|
|
configure_args="-DCMAKE_INSTALL_LIBDIR=lib"
|
|
hostmakedepends="flex pkg-config python3 libpcap-devel openssl-devel
|
|
bind-devel zlib-devel"
|
|
makedepends="bind-devel geoip-devel libpcap-devel openssl-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=659a890f433cb730519966bdc41f1a03fb67e27e94b5d52ad9ee890022a12c3a
|
|
|
|
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
|
|
vmove usr/lib/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}"
|
|
}
|