upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haproxy / trunk / PKGBUILD
blob7df8fda61d7e5a4f4741cdf48f2c6fc5391c9675
1 # Maintainer: Johannes Löthberg <johannes@kyriasis.com>
2 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
4 pkgname=haproxy
5 pkgver=2.7.8
6 pkgrel=1
8 pkgdesc='Reliable, high performance TCP/HTTP load balancer'
9 url='https://www.haproxy.org/'
10 arch=('x86_64')
11 license=('GPL')
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
21         haproxy.cfg
22         haproxy.sysusers
23         0001-Use-CFLAGS-and-LDFLAGS-when-building-admin.patch)
25 sha256sums=('15f2276971bbba8c47d86cc82ebfc6ec33e3aef2e4565058b2e4950c07b8e75c'
26             'f6babef513b99a3fa0e50f2b144c73c980f1b78b119874ffa2580af1e651e7a9'
27             'b02b4088205039f0979aef0ef3e22957f493dd54eabefaee7011f2d795303b3e'
28             'a1e3a1c2923465081383eb431bae55ff9841d89909469311cdba4b394ec4a998')
30 prepare() {
31   cd haproxy-$pkgver
33   patch -p1 <"$srcdir"/0001-Use-CFLAGS-and-LDFLAGS-when-building-admin.patch
36 build() {
37   cd haproxy-$pkgver
39   export CFLAGS="$CFLAGS -fwrapv"
41   make \
42     CFLAGS="$CFLAGS" \
43     LDFLAGS="$LDFLAGS" \
44     CPU=generic \
45     TARGET=linux-glibc \
46     USE_GETADDRINFO=1 \
47     USE_LUA=1 \
48     USE_OPENSSL=1 \
49     USE_PCRE2=1 USE_PCRE2_JIT=1 \
50     USE_PROMEX=1 \
51     USE_SYSTEMD=1 \
52     USE_ZLIB=1
54     make \
55       SBINDIR=/usr/bin \
56       OPTIMIZE= \
57       CFLAGS="$CFLAGS" \
58       LDFLAGS="$LDFLAGS" \
59       admin/{halog/halog,iprange/ip{,6}range}
60     make \
61       SBINDIR=/usr/bin \
62       -C admin/systemd/
65 package() {
66   cd haproxy-$pkgver
67   make \
68     PREFIX="$pkgdir"/usr \
69     SBINDIR="$pkgdir"/usr/bin \
70     DOCDIR="$pkgdir"/usr/share/$pkgname \
71     install
73   for admin in admin/{halog/halog,iprange/ip{,6}range}; do
74     install -D -m0755 $admin "$pkgdir"/usr/bin/$(basename $admin)
75   done
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