void-packages/srcpkgs/haproxy/template
Jürgen Buchmüller e57bfa8f94
haproxy: use ADDLIB for armv[56]*|mips* -latomic
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-06-29 07:43:56 +02:00

37 lines
1.3 KiB
Bash

# Template file for 'haproxy'
pkgname=haproxy
version=1.8.11
revision=1
build_style=gnu-makefile
make_build_args="TARGET=linux2628 USE_PCRE=1 USE_PCRE_JIT=1 USE_ZLIB=1
USE_OPENSSL=1 USE_LIBCRYPT=1 USE_GETADDRINFO=1 USE_LUA=1"
make_install_args="SBINDIR=${DESTDIR}/usr/bin DOCDIR=${DESTDIR}/usr/share/doc/$pkgname"
makedepends="libressl-devel lua-devel pcre-devel"
short_desc="Reliable, high performance TCP/HTTP load balancer"
maintainer="Eivind Uggedal <eivind@uggedal.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=b4b403ceb5efe3c65c6d86e1a44fc0953189f12cdf0bd884e5df04bbabb27947
make_dirs="$haproxy_homedir 0750 ${pkgname} ${pkgname}"
conf_files="/etc/${pkgname}/${pkgname}.cfg"
system_accounts="${pkgname}"
haproxy_homedir="/var/lib/${pkgname}"
case "$XBPS_TARGET_MACHINE" in
*-musl) CFLAGS="-D__LINUX_NETFILTER_H";;
esac
case "$XBPS_TARGET_MACHINE" in
armv[56]*|mips*) ADDLIB="-latomic"; makedepends+=" libatomic-devel";;
esac
do_build() {
make ${makejobs} CC="$CC" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" EXTRA= \
ADDLIB="${ADDLIB}" ${make_build_args}
}
post_install() {
vinstall ${FILESDIR}/${pkgname}.cfg 644 etc/${pkgname}
vsv ${pkgname}
}