02a53fb6e3
Switch HAProxy to a master/worker (-W) model, allowing for correct handling of HUP signals. To do listening FD handoff, a stats socket with 'expose-fd listeners' needs to be part of the configuration file.
43 lines
1.4 KiB
Bash
43 lines
1.4 KiB
Bash
# Template file for 'haproxy'
|
|
pkgname=haproxy
|
|
version=2.4.2
|
|
revision=2
|
|
build_style=gnu-makefile
|
|
make_install_args="SBINDIR=${DESTDIR}/usr/bin DOCDIR=${DESTDIR}/usr/share/doc/${pkgname}"
|
|
hostmakedepends="lua53-devel"
|
|
makedepends="libatomic-devel openssl-devel lua53-devel pcre-devel"
|
|
checkdepends="varnish"
|
|
short_desc="Reliable, high performance TCP/HTTP load balancer"
|
|
maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"
|
|
license="GPL-2.0-or-later, LGPL-2.1-or-later"
|
|
homepage="https://www.haproxy.org"
|
|
distfiles="${homepage}/download/${version%.*}/src/${pkgname}-${version}.tar.gz"
|
|
checksum=@ef7a20a36812f119d0113a28e0b26b909f8177a224c840082295fae265ba1f81
|
|
|
|
haproxy_homedir="/var/lib/${pkgname}"
|
|
make_dirs="$haproxy_homedir 0750 ${pkgname} ${pkgname}"
|
|
conf_files="/etc/${pkgname}/${pkgname}.cfg"
|
|
system_accounts="$pkgname"
|
|
|
|
CFLAGS="-Wno-address-of-packed-member"
|
|
do_build() {
|
|
local target="linux-${XBPS_TARGET_LIBC}"
|
|
local atomic
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
atomic="-latomic"
|
|
fi
|
|
make ${makejobs} CC="$CC" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" EXTRA= \
|
|
TARGET=$target USE_PCRE=1 USE_PCRE_JIT=1 USE_ZLIB=1 \
|
|
USE_OPENSSL=1 USE_LIBCRYPT=1 USE_GETADDRINFO=1 USE_LUA=1 \
|
|
USE_PROMEX=1 ADDLIB="$atomic"
|
|
}
|
|
|
|
do_check() {
|
|
export VTEST_PROGRAM=/usr/bin/varnishtest
|
|
make reg-tests || : 4 test failed on musl
|
|
}
|
|
|
|
post_install() {
|
|
vinstall ${FILESDIR}/${pkgname}.cfg 644 etc/${pkgname}
|
|
vsv ${pkgname}
|
|
}
|