# Contributor: Jeff Bilyk # Maintainer: Natanael Copa pkgname=haproxy pkgver=1.7.5 _pkgmajorver=${pkgver%.*} pkgrel=0 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 libressl-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 install \ DESTDIR="$pkgdir" PREFIX=/usr DOCDIR=/usr/share/doc/haproxy \ || return 1 install -d \ "$pkgdir"/var/lib/haproxy \ || return 1 install -D -m 755 \ "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname \ || return 1 install -D -m 644 \ "$srcdir"/haproxy.cfg \ "$pkgdir"/etc/haproxy/haproxy.cfg \ || return 1 install -m 755 \ 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/ } sha512sums="9fc62b492b4eb80039511339d6e677107f4ba842f275d4be216a70a0d3d0463c819e10e365a7e9fe2e95e0b446b00350b4ee161e98bd724ca2e0e4e60bea5734 haproxy-1.7.5.tar.gz 3ab277bf77fe864ec6c927118dcd70bdec0eb3c54535812d1c3c0995fa66a3ea91a73c342edeb8944caeb097d2dd1a7761099182df44af5e3ef42de6e2176d26 haproxy.initd 26bc8f8ac504fcbaec113ecbb9bb59b9da47dc8834779ebbb2870a8cadf2ee7561b3a811f01e619358a98c6c7768e8fdd90ab447098c05b82e788c8212c4c41f haproxy.cfg"