summaryrefslogtreecommitdiffstats
path: root/security/racoon2/Makefile
blob: 89a876ad12a69b09f2cd772aca0f6c7c055a26c9 (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
# New ports collection makefile for:	racoon
# Date created:		4 July 2000
# Whom:			sumikawa
#
# $FreeBSD$
#

PORTNAME=	racoon
PORTVERSION=	20040408a
CATEGORIES=	security net
MASTER_SITES=	ftp://ftp.kame.net/pub/kame/misc/

MAINTAINER=	sumikawa@FreeBSD.org
COMMENT=	KAME racoon IKE daemon

.if !exists(/usr/lib/libipsec.so.1) && !exists(/lib/libipsec.so.1)
BROKEN=		"You must upgrade the OS"
.endif

USE_RC_SUBR=	YES
USE_OPENSSL=	YES

WRKSRC=		${WRKDIR}/${DISTNAME}/racoon
GNU_CONFIGURE=	yes
CONFIGURE_ENV+=	CPPFLAGS=-I${LOCALBASE}/include CFLAGS=-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib -L${WRKSRC}/../libipsec
CONFIGURE_ARGS+=--enable-debug
CONFIGURE_ARGS+=--enable-ipv6
CONFIGURE_ARGS+=--sysconfdir=${LOCALBASE}/etc
CONFIGURE_ARGS+=--with-pkgversion=freebsd-${PORTVERSION}

MAN5=		racoon.conf.5
MAN8=		racoon.8

RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \
		RC_SUBR=${RC_SUBR}

pre-patch:
	${MV} ${WRKSRC}/racoon.8 ${WRKSRC}/racoon.8.in

pre-configure:
	(cd ${WRKSRC}/../libipsec; make)

post-install:
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
		${FILESDIR}/racoon.sh > ${PREFIX}/etc/rc.d/racoon.sh
	@${CHMOD} +x ${PREFIX}/etc/rc.d/racoon.sh
	@if [ -z `/sbin/sysctl -a | ${GREP} -q ipsec && echo ipsec` ]; then \
	    ${ECHO_MSG} "WARNING: IPsec feature is disabled on this host"; \
	    ${ECHO_MSG} "         You must build the kernel if you want to run racoon on the host"; \
	fi ;

.include <bsd.port.mk>
OpenPOWER on IntegriCloud