summaryrefslogtreecommitdiff
path: root/net/haproxy/Makefile
blob: 5606c9089aed53d802345c53f1a9cfa497627a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# $NetBSD: Makefile,v 1.45 2019/01/24 10:33:52 morr Exp $

DISTNAME=	haproxy-1.8.17
CATEGORIES=	net www
MASTER_SITES=	http://www.haproxy.org/download/${PKGVERSION_NOREV:R}/src/

MAINTAINER=	morr@NetBSD.org
HOMEPAGE=	http://haproxy.org/
COMMENT=	Reliable, high performance TCP/HTTP load balancer
LICENSE=	gnu-gpl-v2

USE_LANGUAGES=		c
USE_TOOLS+=		gmake
BUILD_MAKE_FLAGS+=	ADDLIB=${COMPILER_RPATH_FLAG}${PREFIX}/lib
BUILD_MAKE_FLAGS+=	TARGET=${TARGET}
BUILD_MAKE_FLAGS+=	USE_REGPARM=1
BUILD_MAKE_FLAGS+=	USE_ZLIB=1

INSTALL_MAKE_FLAGS+=	DOCDIR=${PREFIX}/share/doc/${PKGBASE}
INSTALL_MAKE_FLAGS+=	PREFIX=${PREFIX}
INSTALL_MAKE_FLAGS+=	MANDIR=${PREFIX}/${PKGMANDIR}
INSTALL_MAKE_FLAGS+=	TARGET=${TARGET}

.include "options.mk"

RCD_SCRIPTS=		haproxy
EGDIR=			${PREFIX}/share/examples/${PKGBASE}
DOCDIR=			${PREFIX}/share/doc/${PKGBASE}
INSTALLATION_DIRS+=	${EGDIR}

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD"
TARGET=	netbsd
.elif ${OPSYS} == "FreeBSD"
TARGET=	freebsd
.elif ${OPSYS} == "OpenBSD"
TARGET=	openbsd
.elif ${OPSYS} == "SunOS"
TARGET=	solaris
.elif ${OPSYS} == "Linux"
.  if !empty(OS_VERSION:M2.6.*)
TARGET=	linux26
.  elif !empty(OS_VERSION:M2.4.*)
.    if exists(/usr/include/linux/eventpoll.h)
TARGET=	linux24e
.    else
TARGET=	linux24
.    endif
.  else
TARGET=	linux2628
.  endif
.else
TARGET=	generic
.endif

LIBS.SunOS+=		-lxnet

post-install:
	${INSTALL_DATA} ${WRKSRC}/doc/architecture.txt ${DESTDIR}${DOCDIR}/
	${INSTALL_DATA} ${WRKSRC}/doc/configuration.txt ${DESTDIR}${DOCDIR}/
	${INSTALL_DATA} ${WRKSRC}/examples/*.cfg ${DESTDIR}${EGDIR}/

.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"