1 # Maintainer: Johannes Löthberg <johannes@kyriasis.com>
2 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
8 pkgdesc='Reliable, high performance TCP/HTTP load balancer'
9 url='https://www.haproxy.org/'
13 depends=('openssl' 'pcre2' 'zlib' 'libxcrypt' 'libcrypt.so' 'lua' 'systemd-libs')
14 makedepends=('systemd')
16 backup=('etc/haproxy/haproxy.cfg')
18 install=haproxy.install
20 source=(https://www.haproxy.org/download/${pkgver%.*}/src/haproxy-$pkgver.tar.gz
23 0001-Use-CFLAGS-and-LDFLAGS-when-building-admin.patch)
25 sha256sums=('15f2276971bbba8c47d86cc82ebfc6ec33e3aef2e4565058b2e4950c07b8e75c'
26 'f6babef513b99a3fa0e50f2b144c73c980f1b78b119874ffa2580af1e651e7a9'
27 'b02b4088205039f0979aef0ef3e22957f493dd54eabefaee7011f2d795303b3e'
28 'a1e3a1c2923465081383eb431bae55ff9841d89909469311cdba4b394ec4a998')
33 patch -p1 <"$srcdir"/0001-Use-CFLAGS-and-LDFLAGS-when-building-admin.patch
39 export CFLAGS="$CFLAGS -fwrapv"
49 USE_PCRE2=1 USE_PCRE2_JIT=1 \
59 admin/{halog/halog,iprange/ip{,6}range}
68 PREFIX="$pkgdir"/usr \
69 SBINDIR="$pkgdir"/usr/bin \
70 DOCDIR="$pkgdir"/usr/share/$pkgname \
73 for admin in admin/{halog/halog,iprange/ip{,6}range}; do
74 install -D -m0755 $admin "$pkgdir"/usr/bin/$(basename $admin)
77 install -D -m0644 ../haproxy.sysusers "$pkgdir"/usr/lib/sysusers.d/haproxy.conf
78 install -D -m0644 ../haproxy.cfg "$pkgdir"/etc/haproxy/haproxy.cfg
79 install -D -m0644 admin/systemd/haproxy.service \
80 "$pkgdir"/usr/lib/systemd/system/haproxy.service
81 install -D -m0644 admin/syntax-highlight/haproxy.vim \
82 "$pkgdir"/usr/share/nvim/runtime/syntax/haproxy.vim
83 cp -r examples "$pkgdir"/usr/share/haproxy/examples