mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-30 13:51:31 +01:00
61 lines
2.3 KiB
Plaintext
61 lines
2.3 KiB
Plaintext
# Contributor: Jeff Bilyk <jbilyk@gmail.com>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=haproxy
|
|
pkgver=1.6.4
|
|
_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"
|
|
depends=""
|
|
makedepends="pcre-dev openssl-dev linux-headers lua${_luaver}-dev zlib-dev"
|
|
install="haproxy.pre-install haproxy.pre-upgrade"
|
|
subpackages="$pkgname-doc $pkgname-systemd-wrapper:wrapper"
|
|
source="http://haproxy.1wt.eu/download/${_pkgmajorver}/src/$pkgname-$pkgver.tar.gz
|
|
haproxy.initd
|
|
haproxy.cfg"
|
|
|
|
_builddir="$srcdir/$pkgname-$pkgver"
|
|
build() {
|
|
cd "$_builddir"
|
|
make TARGET=linux2628 \
|
|
USE_PCRE=1 \
|
|
USE_OPENSSL=1 \
|
|
USE_ZLIB=1 \
|
|
USE_LUA=1 \
|
|
LUA_LIB=/usr/lib/lua${_luaver} \
|
|
LUA_INC=/usr/include/lua${_luaver} \
|
|
CFLAGS="$CFLAGS" || return 1
|
|
}
|
|
|
|
package() {
|
|
cd "$_builddir"
|
|
make DESTDIR="$pkgdir" PREFIX=/usr DOCDIR=/usr/share/doc/haproxy \
|
|
install || return 1
|
|
install -d "$pkgdir"/var/lib/haproxy
|
|
install -m755 -D "$srcdir"/$pkgname.initd \
|
|
"$pkgdir"/etc/init.d/$pkgname || return 1
|
|
install -m644 -D "$srcdir"/haproxy.cfg \
|
|
"$pkgdir"/etc/haproxy/haproxy.cfg || return 1
|
|
install -m755 haproxy-systemd-wrapper "$pkgdir"/usr/sbin/ || return 1
|
|
}
|
|
|
|
wrapper() {
|
|
pkgdesc="wrapper for restarting haproxy without losing open connections"
|
|
mkdir -p "$subpkgdir"/usr/sbin
|
|
mv "$pkgdir"/usr/sbin/haproxy-systemd-wrapper \
|
|
"$subpkgdir"/usr/sbin/
|
|
}
|
|
|
|
md5sums="ee107312ef58432859ee12bf048025ab haproxy-1.6.4.tar.gz
|
|
c2b6a08009c1eaad4ec1f0ae778d1a04 haproxy.initd
|
|
463f00b30bfb002750d5c5549382365f haproxy.cfg"
|
|
sha256sums="e5fa3c604f1fe9ecb6974ccda6705c105ebee14b3a913069fb08f00e860cd230 haproxy-1.6.4.tar.gz
|
|
33a164deedb83eba3a976ad5e299850d7d333d4f08247b51da01ac7f3e10343f haproxy.initd
|
|
7e3c03acb9a41e21e21059da609e694e6dd952d9a37297bd39cad37680af213f haproxy.cfg"
|
|
sha512sums="9f0fc316100e312a0c35c0706895b0e57634ad6ef353c33e958bbebce445855a057a0d7dabd67f3c15126843f40ab13d436ab9544b9793de4623b59d1bc91c52 haproxy-1.6.4.tar.gz
|
|
3ab277bf77fe864ec6c927118dcd70bdec0eb3c54535812d1c3c0995fa66a3ea91a73c342edeb8944caeb097d2dd1a7761099182df44af5e3ef42de6e2176d26 haproxy.initd
|
|
89d1366352af9cc7cb338779341d460606e2e3cfe9e4f7d5169af46680accb07035fab9a4bbb87dfbe383bb146e8e4d1e95a29e3d36ff64e97603a317a0b1b78 haproxy.cfg"
|