aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorPrzemyslaw Pawelczyk <przemoc@zoho.com>2016-06-21 13:53:02 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-06-29 09:48:24 +0000
commita7258ac154f2d9cff5a58bf8186c2ac7d5b9ecfc (patch)
tree9c40d9f416bb8c7952f879a6cedf54e139c7e5d0 /main
parent9ec1afd13ac60aad9acc109c18788db8ff00035e (diff)
downloadaports-a7258ac154f2d9cff5a58bf8186c2ac7d5b9ecfc.tar.bz2
aports-a7258ac154f2d9cff5a58bf8186c2ac7d5b9ecfc.tar.xz
main/haproxy: Modernize APKBUILD.
* APKBUILD: - Use builddir (no _). - Reformat build(), package() and wrapper() to make them more readable.
Diffstat (limited to 'main')
-rw-r--r--main/haproxy/APKBUILD53
1 files changed, 33 insertions, 20 deletions
diff --git a/main/haproxy/APKBUILD b/main/haproxy/APKBUILD
index 2f501a7006..8de175a76c 100644
--- a/main/haproxy/APKBUILD
+++ b/main/haproxy/APKBUILD
@@ -17,36 +17,49 @@ source="http://haproxy.1wt.eu/download/${_pkgmajorver}/src/$pkgname-$pkgver.tar.
haproxy.initd
haproxy.cfg"
-_builddir="$srcdir/$pkgname-$pkgver"
+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
+ 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
+ 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/
+ "$subpkgdir"/usr/sbin/
}
md5sums="b418d83cf4f2da328f6eb8c255b8716b haproxy-1.6.6.tar.gz