60 lines
1.4 KiB
Bash
60 lines
1.4 KiB
Bash
# Template file for 'wrk'
|
|
pkgname=wrk
|
|
version=4.2.0
|
|
revision=3
|
|
build_style=gnu-makefile
|
|
make_build_args="VER=${version} WITH_OPENSSL=/usr WITH_LUAJIT=/usr"
|
|
hostmakedepends="LuaJIT"
|
|
makedepends="LuaJIT-devel openssl-devel"
|
|
short_desc="Modern HTTP benchmarking tool"
|
|
maintainer="Noel Cower <ncower@nil.dev>"
|
|
license="Apache-2.0"
|
|
homepage="https://github.com/wg/wrk"
|
|
distfiles="https://github.com/wg/wrk/archive/${version}.tar.gz"
|
|
checksum=e255f696bff6e329f5d19091da6b06164b8d59d62cb9e673625bdcd27fe7bdad
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
ppc64*) ;;
|
|
ppc*|mips*)
|
|
broken="__sync_fetch_and_add_8 and __sync_val_compare_and_swap_8 supported on $XBPS_TARGET_MACHINE"
|
|
;;
|
|
esac
|
|
|
|
pre_build() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
aarch64*)
|
|
make obj
|
|
luajit -b -a arm64 src/wrk.lua obj/bytecode.o
|
|
;;
|
|
armv[5-7]*)
|
|
make obj
|
|
luajit -b -a arm src/wrk.lua obj/bytecode.o
|
|
;;
|
|
i686*)
|
|
make obj
|
|
luajit -b -a x86 src/wrk.lua obj/bytecode.o
|
|
;;
|
|
ppc64le*)
|
|
make obj
|
|
luajit -b -a ppc64le src/wrk.lua obj/bytecode.o
|
|
;;
|
|
ppc64*)
|
|
make obj
|
|
luajit -b -a ppc64 src/wrk.lua obj/bytecode.o
|
|
;;
|
|
esac
|
|
# Borrow flags from Makefile
|
|
CFLAGS="-std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -I${XBPS_CROSS_BASE}/usr/include/luajit-2.1 ${CFLAGS}"
|
|
LDFLAGS="-Wl,-E ${LDFLAGS}"
|
|
}
|
|
|
|
do_install() {
|
|
vbin wrk
|
|
vdoc README.md
|
|
vdoc CHANGES
|
|
vdoc SCRIPTING
|
|
for f in scripts/*; do
|
|
vsconf "${f}"
|
|
done
|
|
}
|