From 4288966953094bcaff91bffafccd80403d1c8f9c Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 12 Feb 2016 10:08:17 +0000 Subject: main/haproxy: add subpackage for haproxy-systemd-wrapper --- main/haproxy/APKBUILD | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'main/haproxy') diff --git a/main/haproxy/APKBUILD b/main/haproxy/APKBUILD index bccd34c970..4a1708c293 100644 --- a/main/haproxy/APKBUILD +++ b/main/haproxy/APKBUILD @@ -3,7 +3,7 @@ pkgname=haproxy _pkgmajorver=1.6 pkgver=${_pkgmajorver}.3 -pkgrel=0 +pkgrel=1 pkgdesc="A TCP/HTTP reverse proxy for high availability environments" url="http://haproxy.1wt.eu" arch="all" @@ -12,31 +12,43 @@ _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" +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 "$srcdir/$pkgname-$pkgver" - 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} \ + 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 "$srcdir/$pkgname-$pkgver" + 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 - install -m644 -D "$srcdir"/haproxy.cfg "$pkgdir"/etc/haproxy/haproxy.cfg + 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="3362d1e268c78155c2474cb73e7f03f9 haproxy-1.6.3.tar.gz c2b6a08009c1eaad4ec1f0ae778d1a04 haproxy.initd 463f00b30bfb002750d5c5549382365f haproxy.cfg" -- cgit v1.2.3