2013-09-21 00:10:23 +02:00
# Created by: Clement Laforet
2003-06-03 07:20:23 +02:00
# $FreeBSD$
PORTNAME = haproxy
2016-11-21 08:59:11 +01:00
PORTVERSION = 1.6.10
2003-06-03 07:20:23 +02:00
CATEGORIES = net www
2015-10-21 12:59:46 +02:00
MASTER_SITES = http://www.haproxy.org/download/1.6/src/
DISTFILES = ${ PORTNAME } -${ DISTVERSION } ${ EXTRACT_SUFX }
2003-06-03 07:20:23 +02:00
2012-06-05 09:32:59 +02:00
MAINTAINER = demon@FreeBSD.org
2015-10-21 16:20:27 +02:00
COMMENT = Reliable, high performance TCP/HTTP load balancer
2003-06-03 07:20:23 +02:00
2011-02-19 15:41:13 +01:00
LICENSE = GPLv2 LGPL21
2011-08-25 19:24:32 +02:00
LICENSE_COMB = multi
2016-02-02 12:14:57 +01:00
CONFLICTS_INSTALL = haproxy-devel-[ 0-9] *
2010-11-01 00:26:04 +01:00
2015-03-05 14:56:36 +01:00
USES = cpe gmake
2010-03-16 02:39:45 +01:00
USE_RC_SUBR = haproxy
2003-09-26 08:22:37 +02:00
2015-10-21 12:59:46 +02:00
DEVICEATLAS_VERSION = 2.1
DEVICEATLAS_DISTFILE = deviceatlas-enterprise-c-${ DEVICEATLAS_VERSION }
2015-11-04 20:50:34 +01:00
DEVICEATLAS_REGISTRATION_URL = https://deviceatlas.com/deviceatlas-haproxy-module
2015-10-21 12:59:46 +02:00
2015-11-13 13:09:59 +01:00
MAKE_ARGS = TARGET = freebsd DEFINE = -DFREEBSD_PORTS USE_GETADDRINFO = 1 \
USE_ZLIB = 1 USE_CPU_AFFINITY = 1 CC = " ${ CC } " CFLAGS = " ${ CFLAGS } "
2015-10-21 12:59:46 +02:00
OPTIONS_DEFINE = DOCS EXAMPLES LUA OPENSSL DEVICEATLAS
2014-06-26 14:52:48 +02:00
OPTIONS_RADIO = PCRE
OPTIONS_RADIO_PCRE = DPCRE SPCRE
2014-06-24 13:23:45 +02:00
DPCRE_DESC = Link dynamically
SPCRE_DESC = Link statically
2015-10-21 12:59:46 +02:00
DEVICEATLAS_DESC = DeviceAtlas Device Detection support
2014-06-26 14:52:48 +02:00
OPTIONS_DEFAULT = SPCRE OPENSSL
2003-06-03 07:20:23 +02:00
2010-03-16 02:39:45 +01:00
. i n c l u d e < b s d . p o r t . o p t i o n s . m k >
2012-06-19 07:31:13 +02:00
.if ${PORT_OPTIONS : MDPCRE }
2016-04-01 16:16:16 +02:00
LIB_DEPENDS += libpcre.so:devel/pcre
2014-06-26 14:52:48 +02:00
MAKE_ARGS += USE_PCRE = 1 USE_PCRE_JIT = 1
2003-06-03 07:20:23 +02:00
. e n d i f
2015-10-21 12:59:46 +02:00
2012-06-19 07:31:13 +02:00
.if ${PORT_OPTIONS : MSPCRE }
2016-04-01 16:16:16 +02:00
BUILD_DEPENDS += ${ LOCALBASE } /lib/libpcre.a:devel/pcre
2015-12-28 12:35:16 +01:00
MAKE_ARGS += USE_PCRE = 1 USE_STATIC_PCRE = 1 USE_PCRE_JIT = 1
2006-09-24 12:54:04 +02:00
. e n d i f
2015-10-21 12:59:46 +02:00
.if ${PORT_OPTIONS : MDEVICEATLAS }
. i f ! e x i s t s ( $ { D I S T D I R } / $ { D E V I C E A T L A S _ D I S T F I L E } . z i p )
2015-11-04 20:50:34 +01:00
IGNORE ?= you must manually fetch the DeviceAtlas Device Detection C API from ${ DEVICEATLAS_REGISTRATION_URL } and place it in ${ DISTDIR } and then run make again
2015-10-21 12:59:46 +02:00
. e l s e
RESTRICTED = The redistribution of the DeviceAtlas Device Detection C API is not permitted
DISTFILES += ${ DEVICEATLAS_DISTFILE } .zip
MAKE_ARGS += USE_DEVICEATLAS = 1 DEVICEATLAS_SRC = ${ WRKDIR } /deviceatlas-enterprise-c-${ DEVICEATLAS_VERSION }
. e n d i f
.if ! ${PORT_OPTIONS : MDPCRE } && ! ${PORT_OPTIONS :MSPCRE }
2015-11-04 20:50:34 +01:00
IGNORE ?= enable PCRE support to use DeviceAtlas
2015-10-21 12:59:46 +02:00
. e n d i f
. e n d i f
2014-06-24 13:23:45 +02:00
.if ${PORT_OPTIONS : MOPENSSL }
2016-08-15 13:55:37 +02:00
USES += ssl
2014-06-24 13:23:45 +02:00
MAKE_ARGS += USE_OPENSSL = 1
. e n d i f
2015-10-21 12:59:46 +02:00
.if ${PORT_OPTIONS : MLUA }
USES += lua:53
MAKE_ARGS += USE_LUA = 1 LUA_INC = ${ LUA_INCDIR } LUA_LIB = ${ LUA_LIBDIR } LUA_LIB_NAME = lua-${ LUA_VER }
. e n d i f
2015-09-08 16:44:33 +02:00
post-build :
cd ${ WRKSRC } /contrib/halog && ${ MAKE_CMD } ${ MAKE_ENV }
2003-06-03 07:20:23 +02:00
do-install :
2013-10-22 14:55:01 +02:00
${ INSTALL_PROGRAM } ${ WRKSRC } /haproxy ${ STAGEDIR } ${ PREFIX } /sbin/
2015-09-08 16:56:33 +02:00
${ INSTALL_PROGRAM } ${ WRKSRC } /contrib/halog/halog ${ STAGEDIR } ${ PREFIX } /sbin/
2013-10-22 14:55:01 +02:00
${ INSTALL_MAN } ${ WRKSRC } /doc/haproxy.1 ${ STAGEDIR } ${ MAN1PREFIX } /man/man1
${ MKDIR } ${ STAGEDIR } ${ DOCSDIR }
( cd ${ WRKSRC } /doc/ && ${ COPYTREE_SHARE } \* ${ STAGEDIR } ${ DOCSDIR } )
${ MKDIR } ${ STAGEDIR } ${ EXAMPLESDIR }
( cd ${ WRKSRC } /examples/ && ${ COPYTREE_SHARE } \* ${ STAGEDIR } ${ EXAMPLESDIR } )
2004-06-08 12:31:00 +02:00
2016-11-29 19:46:21 +01:00
. i n c l u d e < b s d . p o r t . p r e . m k >
.if ${PORT_OPTIONS : MOPENSSL } && ${SSL_DEFAULT :Mopenssl -devel }
BROKEN = Does not build with openssl-devel
. e n d i f
. i n c l u d e < b s d . p o r t . p o s t . m k >