aboutsummaryrefslogtreecommitdiffstats
path: root/net/keepalived/Makefile
blob: 84edb2e2cc25bbc46bf1558ec040bb0573b80478 (plain) (blame)
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
# New ports collection makefile for:    keepalived
# Date created:             Aug 25 2005
# Whom:                 clement@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   keepalived
PORTVERSION=    1.1.11
PORTREVISION=   1
CATEGORIES= net
MASTER_SITES=   http://www.cultdeadsheep.org/~clement/FreeBSD/ipvs/
DISTNAME=   ${PORTNAME}-FreeBSD-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    A monitoring daemon for ipvs clusters

LIB_DEPENDS=    popt.0:${PORTSDIR}/devel/popt
BUILD_DEPENDS=  ${LOCALBASE}/lib/libipvs.a:${PORTSDIR}/net/ipvs

USE_GMAKE=  YES
GNU_CONFIGURE=  YES
USE_OPENSSL=    YES
USE_RC_SUBR=    keepalived.sh

LDFLAGS+=   -lipvs -L${LOCALBASE}/lib

CONFIGURE_ARGS+=    --with-kernel-dir=${LOCALBASE}
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"

MAN1=   genhash.1
MAN5=   keepalived.conf.5
MAN8=   keepalived.8

post-patch:
    @${REINPLACE_CMD} 's,\(#define CONF\).*,\
        \1 "${PREFIX}/etc/keepalived/keepalived.conf",' \
        ${WRKSRC}/lib/parser.h

post-install:
    @${MKDIR} ${PREFIX}/etc/${PORTNAME}
    @if [ ! -e ${PREFIX}/etc/${PORTNAME}/keepalived.conf ] ; then \
        ${INSTALL_DATA} ${EXAMPLESDIR}/keepalived.conf \
        ${PREFIX}/etc/${PORTNAME}/keepalived.conf; fi

.include <bsd.port.mk>