aboutsummaryrefslogtreecommitdiffstats
path: root/main/haproxy/APKBUILD
blob: e83bb1259c4b040ac2c508f3155fe52ec047346b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Contributor: Jeff Bilyk <jbilyk@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=haproxy
pkgver=1.8.12
_pkgmajorver=${pkgver%.*}
pkgrel=1
pkgdesc="A TCP/HTTP reverse proxy for high availability environments"
url="http://haproxy.1wt.eu"
arch="all"
license="GPL"
_luaver="5.3"
options="!check"  # FIXME: no idea how to run tests
depends=""
makedepends="pcre-dev openssl-dev linux-headers lua${_luaver}-dev zlib-dev"
install="haproxy.pre-install haproxy.pre-upgrade"
subpackages="$pkgname-doc"
source="http://haproxy.1wt.eu/download/${_pkgmajorver}/src/$pkgname-$pkgver.tar.gz
	haproxy.initd
	haproxy.cfg"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	case "$CARCH" in mips|mipsel*) _carchflags="ADDLIB=-latomic";; esac
	make \
	     $_carchflags \
	     TARGET=linux2628 \
	     USE_PCRE=1 \
	     USE_OPENSSL=1 \
	     USE_ZLIB=1 \
	     USE_LUA=1 \
	     USE_NS=1 \
	     LUA_LIB=/usr/lib/lua${_luaver} \
	     LUA_INC=/usr/include/lua${_luaver} \
	     CFLAGS="$CFLAGS"
}

package() {
	cd "$builddir"
	make install \
	     DESTDIR="$pkgdir" PREFIX=/usr DOCDIR=/usr/share/doc/haproxy
	install -d \
	        "$pkgdir"/var/lib/haproxy
	install -D -m 755 \
	        "$srcdir"/$pkgname.initd \
	        "$pkgdir"/etc/init.d/$pkgname
	install -D -m 644 \
	        "$srcdir"/haproxy.cfg \
	        "$pkgdir"/etc/haproxy/haproxy.cfg
}

sha512sums="2b782a54988cc88d1af0e5f011af062910e8fac28eab13db7e05a58d0d23961f827da47e3871e8d081f5a2d222588480d81dec2e9f14ec9f54a1c3cb5bf3d56a  haproxy-1.8.12.tar.gz
3ab277bf77fe864ec6c927118dcd70bdec0eb3c54535812d1c3c0995fa66a3ea91a73c342edeb8944caeb097d2dd1a7761099182df44af5e3ef42de6e2176d26  haproxy.initd
26bc8f8ac504fcbaec113ecbb9bb59b9da47dc8834779ebbb2870a8cadf2ee7561b3a811f01e619358a98c6c7768e8fdd90ab447098c05b82e788c8212c4c41f  haproxy.cfg"