summaryrefslogtreecommitdiffstats
path: root/security/strongswan/Makefile
blob: a6d4ca4685fa8be0df416f65d619d26431411ac2 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Created by: Riaan Kruger <riaank@gmail.com>
# $FreeBSD$

PORTNAME=	strongswan
PORTVERSION=	5.0.4
PORTREVISION=	1
CATEGORIES=	security
MASTER_SITES=	http://download.strongswan.org/ \
		http://download2.strongswan.org/

MAINTAINER=	strongswan@nanoteq.com
COMMENT=	Open Source IKEv2 IPsec-based VPN solution

LIB_DEPENDS=	execinfo:${PORTSDIR}/devel/libexecinfo

USE_BZIP2=	yes
USE_OPENSSL=	yes
USE_AUTOTOOLS=	libtool
USE_RC_SUBR=	strongswan
GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes

CONFIGURE_ARGS=	--enable-kernel-pfkey \
		--enable-kernel-pfroute  \
		--disable-kernel-netlink  \
		--disable-tools  \
		--disable-scripts  \
		--disable-gmp \
		--enable-openssl \
		--enable-eap-identity \
		--enable-eap-md5 \
		--enable-eap-tls \
		--enable-eap-mschapv2 \
		--enable-eap-peap \
		--enable-eap-ttls \
		--enable-md4 \
		--enable-blowfish \
		--enable-addrblock \
		--enable-whitelist \
		--with-group=wheel  \
		--with-lib-prefix=${PREFIX}

# Man pages with default install
MAN5=	ipsec.conf.5 ipsec.secrets.5 strongswan.conf.5
MAN8=	ipsec.8 _updown.8 _updown_espmark.8

OPTIONS_DEFINE=	CURL EAPAKA3GPP2 EAPSIMFILE IKEv1 LDAP MYSQL SQLITE
CURL_DESC=	Enable CURL to fetch CRL/OCSP
EAPAKA3GPP2_DESC=	Enable EAP AKA with 3gpp2 backend
EAPSIMFILE_DESC=	Enable EAP SIM with file backend
IKEv1_DESC=	Enable IKEv1 support (Experimental)

.include <bsd.port.options.mk>

# Extra options
.if ${PORT_OPTIONS:MCURL}
CONFIGURE_ARGS+=	--enable-curl
LIB_DEPENDS+=	curl:${PORTSDIR}/ftp/curl
PLIST_SUB+=	CURL=""
.else
PLIST_SUB+=	CURL="@comment "
.endif

.if ${PORT_OPTIONS:MEAPSIMFILE}
CONFIGURE_ARGS+=	--enable-eap-sim --enable-eap-sim-file
PLIST_SUB+=	EAPSIMFILE=""
.else
PLIST_SUB+=	EAPSIMFILE="@comment "
.endif

.if ${PORT_OPTIONS:MEAPAKA3GPP2}
CONFIGURE_ARGS+=	--enable-eap-aka --enable-eap-aka-3gpp2
LIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
PLIST_SUB+=	EAPAKA3GPP2=""
.else
PLIST_SUB+=	EAPAKA3GPP2="@comment "
.endif

.if ${PORT_OPTIONS:MEAPSIMFILE} || ${PORT_OPTIONS:MEAPAKA3GPP2}
PLIST_SUB+=SIMAKA=""
.else
PLIST_SUB+=SIMAKA="@comment "
.endif

.if ${PORT_OPTIONS:MIKEv1}
PLIST_SUB+=	IKEv1=""
.else
CONFIGURE_ARGS+=	--disable-ikev1
PLIST_SUB+=	IKEv1="@comment "
.endif

.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP=	yes
CONFIGURE_ARGS+=	--enable-ldap
PLIST_SUB+=	LDAP=""
.else
PLIST_SUB+=	LDAP="@comment "
.endif

.if ${PORT_OPTIONS:MMYSQL}
CONFIGURE_ARGS+=	--enable-mysql
USE_MYSQL=	yes
PLIST_SUB+=	MYSQL=""
.else
PLIST_SUB+=	MYSQL="@comment "
.endif

.if ${PORT_OPTIONS:MSQLITE}
CONFIGURE_ARGS+=	--enable-sqlite
LIB_DEPENDS+=	sqlite3:${PORTSDIR}/databases/sqlite3
PLIST_SUB+=	SQLITE=""
.else
PLIST_SUB+=	SQLITE="@comment "
.endif

.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MSQLITE}
CONFIGURE_ARGS+=	--enable-attr-sql --enable-sql
PLIST_SUB+=	SQL=""
.else
PLIST_SUB+=	SQL="@comment "
.endif

.include <bsd.port.pre.mk>

# Requires FreeBSD 8 and above to work
.if ${OSVERSION} < 800000
IGNORE=		requires at least FreeBSD 8.X
.endif

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