diff --git a/srcpkgs/haproxy/files/haproxy.cfg b/srcpkgs/haproxy/files/haproxy.cfg new file mode 100644 index 00000000000..7fba345319b --- /dev/null +++ b/srcpkgs/haproxy/files/haproxy.cfg @@ -0,0 +1,13 @@ +global + chroot /var/lib/haproxy + user haproxy + group haproxy + +defaults + mode http + +frontend proxy *:80 + default_backend servers + +backend servers + server server1 127.0.0.1:8000 diff --git a/srcpkgs/haproxy/files/haproxy/run b/srcpkgs/haproxy/files/haproxy/run new file mode 100755 index 00000000000..34307dbdaac --- /dev/null +++ b/srcpkgs/haproxy/files/haproxy/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec haproxy -f /etc/haproxy/haproxy.cfg diff --git a/srcpkgs/haproxy/patches/missing-libressl-alpn-impl.patch b/srcpkgs/haproxy/patches/missing-libressl-alpn-impl.patch new file mode 100644 index 00000000000..c76c92085d6 --- /dev/null +++ b/srcpkgs/haproxy/patches/missing-libressl-alpn-impl.patch @@ -0,0 +1,47 @@ +--- src/ssl_sock.c.orig 2015-01-18 22:54:37.205257280 +0000 ++++ src/ssl_sock.c 2015-01-18 22:55:12.506030051 +0000 +@@ -684,7 +684,7 @@ + } + #endif + +-#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation ++#if 0 + /* This callback is used so that the server advertises the list of + * negociable protocols for ALPN. + */ +@@ -1633,7 +1633,7 @@ + if (bind_conf->npn_str) + SSL_CTX_set_next_protos_advertised_cb(ctx, ssl_sock_advertise_npn_protos, bind_conf); + #endif +-#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation ++#if 0 + if (bind_conf->alpn_str) + SSL_CTX_set_alpn_select_cb(ctx, ssl_sock_advertise_alpn_protos, bind_conf); + #endif +@@ -3556,7 +3556,7 @@ + } + #endif + +-#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation ++#if 0 + static int + smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, + const struct arg *args, struct sample *smp, const char *kw) +@@ -4117,7 +4117,7 @@ + /* parse the "alpn" bind keyword */ + static int bind_parse_alpn(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err) + { +-#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation ++#if 0 + char *p1, *p2; + + if (!*args[cur_arg + 1]) { +@@ -4574,7 +4574,7 @@ + #ifdef OPENSSL_NPN_NEGOTIATED + { "ssl_fc_npn", smp_fetch_ssl_fc_npn, 0, NULL, SMP_T_STR, SMP_USE_L5CLI }, + #endif +-#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation ++#if 0 + { "ssl_fc_alpn", smp_fetch_ssl_fc_alpn, 0, NULL, SMP_T_STR, SMP_USE_L5CLI }, + #endif + { "ssl_fc_protocol", smp_fetch_ssl_fc_protocol, 0, NULL, SMP_T_STR, SMP_USE_L5CLI }, diff --git a/srcpkgs/haproxy/template b/srcpkgs/haproxy/template new file mode 100644 index 00000000000..931f9469880 --- /dev/null +++ b/srcpkgs/haproxy/template @@ -0,0 +1,31 @@ +# Template file for 'haproxy' +pkgname=haproxy +version=1.5.10 +revision=1 +build_style=gnu-makefile +make_build_args="TARGET=linux2628 USE_PCRE=1 USE_PCRE_JIT=1 USE_ZLIB=1 + USE_OPENSSL=1 USE_LIBCRYPT=1 USE_GETADDRINFO=1" +make_install_args="SBINDIR=${DESTDIR}/usr/bin DOCDIR=${DESTDIR}/usr/share/doc/$pkgname" +conf_files="/etc/${pkgname}/${pkgname}.cfg" +system_accounts="${pkgname}" +haproxy_homedir="/var/lib/${pkgname}" +make_dirs="$haproxy_homedir 0750 ${pkgname} ${pkgname}" +makedepends="libressl-devel pcre-devel zlib-devel" +short_desc="Reliable, high performance TCP/HTTP load balancer" +maintainer="Eivind Uggedal " +license="GPL-2 LGPL-2.1" +homepage="http://www.haproxy.org" +distfiles="${homepage}/download/${version%.*}/src/${pkgname}-${version}.tar.gz" +checksum=090264c834477c290f6ad6da558731d50aede0800996742d15e870b9947fe517 + +do_build() { + sed -e '/install haproxy-systemd-wrapper/d' -i Makefile + + make ${makejobs} CC="$CC" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ + ${make_build_args} +} + +post_install() { + vinstall ${FILESDIR}/${pkgname}.cfg 644 etc/${pkgname} + vsv ${pkgname} +}