Browse Source

add ZLib and Lua support and fix a compile warning

master
parent
commit
2fb64ab933
  1. 11
      haproxy/haproxy.patch
  2. 26
      haproxy/haproxy.spec

11
haproxy/haproxy.patch

@ -0,0 +1,11 @@
Index: include/common/mini-clist.h
--- include/common/mini-clist.h.orig 2015-10-13 18:52:22.000000000 +0200
+++ include/common/mini-clist.h 2015-10-14 20:07:40.605705265 +0200
@@ -67,6 +67,7 @@
#undef LIST_HEAD
#undef LIST_INIT
#undef LIST_NEXT
+#undef LIST_PREV
/* ILH = Initialized List Head : used to prevent gcc from moving an empty
* list to BSS. Some older version tend to trim all the array and cause

26
haproxy/haproxy.spec

@ -40,13 +40,16 @@ Release: 20151014
# package options
%option with_fsl yes
%option with_ssl no
%option with_ssl yes
%option with_zlib yes
%option with_lua yes
# list of sources
Source0: http://www.haproxy.org/download/%{V_major}/src/haproxy-%{V_major}.%{V_minor}.tar.gz
Source1: haproxy.cfg
Source2: fsl.haproxy
Source3: rc.haproxy
Patch0: haproxy.patch
# build information
BuildPreReq: OpenPKG, openpkg >= 20100101, make
@ -59,8 +62,14 @@ PreReq: fsl
BuildPreReq: openssl
PreReq: openssl
%endif
BuildPreReq: pcre
PreReq: pcre
%if "%{with_zlib}" == "yes"
BuildPreReq: zlib
PreReq: zlib
%endif
%if "%{with_lua}" == "yes"
BuildPreReq: lua
PreReq: lua
%endif
%description
HAProxy is a free, very fast and reliable solution offering high
@ -79,6 +88,7 @@ PreReq: pcre
%prep
%setup -q -n haproxy-%{V_major}.%{V_minor}
%patch -p0
%build
# build program
@ -97,6 +107,16 @@ PreReq: pcre
ADDLIB="%{l_fsl_ldflags} %{l_fsl_libs}" \
%if "%{with_ssl}" == "yes"
USE_OPENSSL=1 \
%endif
%if "%{with_zlib}" == "yes"
USE_ZLIB=1 \
ZLIB_INC=%{l_prefix}/include \
ZLIB_LIB=%{l_prefix}/lib \
%endif
%if "%{with_lua}" == "yes"
USE_LUA=1 \
LUA_INC=%{l_prefix}/include/lua \
LUA_LIB=%{l_prefix}/lib \
%endif
USE_STATIC_PCRE=1

Loading…
Cancel
Save