|
Lines 1-157
Link Here
|
| 1 |
# Created by: Riaan Kruger <riaank@gmail.com> |
1 |
# Created by: Riaan Kruger <riaank@gmail.com> |
| 2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
| 3 |
|
3 |
|
| 4 |
PORTNAME= strongswan |
4 |
PORTNAME= strongswan |
| 5 |
PORTVERSION= 5.8.2 |
5 |
PORTVERSION= 5.8.2 |
|
|
6 |
PORTREVISION= 1 |
| 6 |
CATEGORIES= security net-vpn |
7 |
CATEGORIES= security net-vpn |
| 7 |
MASTER_SITES= http://download.strongswan.org/ \ |
8 |
MASTER_SITES= http://download.strongswan.org/ \ |
| 8 |
http://download2.strongswan.org/ |
9 |
http://download2.strongswan.org/ |
| 9 |
|
10 |
|
| 10 |
MAINTAINER= strongswan@nanoteq.com |
11 |
MAINTAINER= strongswan@nanoteq.com |
| 11 |
COMMENT= Open Source IKEv2 IPsec-based VPN solution |
12 |
COMMENT= Open Source IKEv2 IPsec-based VPN solution |
| 12 |
|
13 |
|
| 13 |
LICENSE= GPLv2 |
14 |
LICENSE= GPLv2 |
| 14 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
15 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
| 15 |
|
16 |
|
| 16 |
USES= cpe libtool:keepla pkgconfig tar:bzip2 ssl |
17 |
USES= cpe libtool:keepla pkgconfig tar:bzip2 ssl |
| 17 |
USE_RC_SUBR= strongswan |
18 |
USE_RC_SUBR= strongswan |
| 18 |
USE_LDCONFIG= ${PREFIX}/lib/ipsec |
19 |
USE_LDCONFIG= ${PREFIX}/lib/ipsec |
| 19 |
|
20 |
|
| 20 |
GNU_CONFIGURE= yes |
21 |
GNU_CONFIGURE= yes |
| 21 |
INSTALL_TARGET= install-strip |
22 |
INSTALL_TARGET= install-strip |
| 22 |
|
23 |
|
| 23 |
CONFIGURE_ARGS= --enable-kernel-pfkey \ |
24 |
CONFIGURE_ARGS= --enable-kernel-pfkey \ |
| 24 |
--enable-kernel-pfroute \ |
25 |
--enable-kernel-pfroute \ |
| 25 |
--disable-kernel-netlink \ |
26 |
--disable-kernel-netlink \ |
| 26 |
--disable-scripts \ |
27 |
--disable-scripts \ |
| 27 |
--disable-gmp \ |
28 |
--disable-gmp \ |
| 28 |
--enable-openssl \ |
29 |
--enable-openssl \ |
| 29 |
--enable-eap-identity \ |
30 |
--enable-eap-identity \ |
| 30 |
--enable-eap-md5 \ |
31 |
--enable-eap-md5 \ |
| 31 |
--enable-eap-tls \ |
32 |
--enable-eap-tls \ |
| 32 |
--enable-eap-mschapv2 \ |
33 |
--enable-eap-mschapv2 \ |
| 33 |
--enable-eap-peap \ |
34 |
--enable-eap-peap \ |
| 34 |
--enable-eap-ttls \ |
35 |
--enable-eap-ttls \ |
| 35 |
--enable-md4 \ |
36 |
--enable-md4 \ |
| 36 |
--enable-blowfish \ |
37 |
--enable-blowfish \ |
| 37 |
--enable-addrblock \ |
38 |
--enable-addrblock \ |
| 38 |
--enable-whitelist \ |
39 |
--enable-whitelist \ |
| 39 |
--enable-cmd \ |
40 |
--enable-cmd \ |
| 40 |
--with-group=wheel \ |
41 |
--with-group=wheel \ |
| 41 |
--with-lib-prefix=${PREFIX} |
42 |
--with-lib-prefix=${PREFIX} |
| 42 |
|
43 |
|
| 43 |
OPTIONS_DEFINE= CURL EAPAKA3GPP2 EAPDYNAMIC EAPRADIUS EAPSIMFILE GCM IKEV1 \ |
44 |
OPTIONS_DEFINE= CURL EAPAKA3GPP2 EAPDYNAMIC EAPRADIUS EAPSIMFILE GCM IKEV1 \ |
| 44 |
IPSECKEY KERNELLIBIPSEC LOADTESTER LDAP MEDIATION MYSQL PKI \ |
45 |
IPSECKEY KERNELLIBIPSEC LOADTESTER LDAP MEDIATION MYSQL PKI \ |
| 45 |
PKCS11 SCEP SMP SQLITE SWANCTL TESTVECTOR TPM UNBOUND UNITY \ |
46 |
PKCS11 SCEP SMP SQLITE SWANCTL TESTVECTOR TPM UNBOUND UNITY \ |
| 46 |
VICI XAUTH |
47 |
VICI XAUTH |
| 47 |
OPTIONS_DEFINE_i386= VIA |
48 |
OPTIONS_DEFINE_i386= VIA |
| 48 |
OPTIONS_DEFAULT= BUILTIN CURL IKEV1 PKI SWANCTL VICI |
49 |
OPTIONS_DEFAULT= BUILTIN CURL IKEV1 PKI SWANCTL VICI |
| 49 |
OPTIONS_SINGLE= PRINTF_HOOKS |
50 |
OPTIONS_SINGLE= PRINTF_HOOKS |
| 50 |
OPTIONS_SINGLE_PRINTF_HOOKS= BUILTIN LIBC VSTR |
51 |
OPTIONS_SINGLE_PRINTF_HOOKS= BUILTIN LIBC VSTR |
| 51 |
OPTIONS_SUB= yes |
52 |
OPTIONS_SUB= yes |
| 52 |
|
53 |
|
| 53 |
# Description of options |
54 |
# Description of options |
| 54 |
BUILTIN_DESC= Use builtin printf hooks |
55 |
BUILTIN_DESC= Use builtin printf hooks |
| 55 |
CURL_DESC= Enable CURL to fetch CRL/OCSP |
56 |
CURL_DESC= Enable CURL to fetch CRL/OCSP |
| 56 |
EAPAKA3GPP2_DESC= Enable EAP AKA with 3gpp2 backend |
57 |
EAPAKA3GPP2_DESC= Enable EAP AKA with 3gpp2 backend |
| 57 |
EAPDYNAMIC_DESC= Enable EAP dynamic proxy module |
58 |
EAPDYNAMIC_DESC= Enable EAP dynamic proxy module |
| 58 |
EAPRADIUS_DESC= Enable EAP Radius proxy authentication |
59 |
EAPRADIUS_DESC= Enable EAP Radius proxy authentication |
| 59 |
EAPSIMFILE_DESC= Enable EAP SIM with file backend |
60 |
EAPSIMFILE_DESC= Enable EAP SIM with file backend |
| 60 |
GCM_DESC= Enable GCM AEAD wrapper crypto plugin |
61 |
GCM_DESC= Enable GCM AEAD wrapper crypto plugin |
| 61 |
IKEV1_DESC= Enable IKEv1 support |
62 |
IKEV1_DESC= Enable IKEv1 support |
| 62 |
IPSECKEY_DESC= Enable authentication with IPSECKEY resource records with DNSSEC |
63 |
IPSECKEY_DESC= Enable authentication with IPSECKEY resource records with DNSSEC |
| 63 |
KERNELLIBIPSEC_DESC= Enable IPSec userland backend |
64 |
KERNELLIBIPSEC_DESC= Enable IPSec userland backend |
| 64 |
LIBC_DESC= Use libc printf hooks |
65 |
LIBC_DESC= Use libc printf hooks |
| 65 |
LOADTESTER_DESC= Enable load testing plugin |
66 |
LOADTESTER_DESC= Enable load testing plugin |
| 66 |
MEDIATION_DESC= Enable IKEv2 Mediation Extension |
67 |
MEDIATION_DESC= Enable IKEv2 Mediation Extension |
| 67 |
PKCS11_DESC= Enable PKCS11 token support |
68 |
PKCS11_DESC= Enable PKCS11 token support |
| 68 |
PKI_DESC= Enable PKI tools |
69 |
PKI_DESC= Enable PKI tools |
| 69 |
SCEP_DESC= Enable Simple Certificate Enrollment Protocol |
70 |
SCEP_DESC= Enable Simple Certificate Enrollment Protocol |
| 70 |
SMP_DESC= Enable XML-based management protocol (DEPRECATED) |
71 |
SMP_DESC= Enable XML-based management protocol (DEPRECATED) |
| 71 |
SWANCTL_DESC= Install swanctl (requires VICI) |
72 |
SWANCTL_DESC= Install swanctl (requires VICI) |
| 72 |
TESTVECTOR_DESC= Enable crypto test vectors |
73 |
TESTVECTOR_DESC= Enable crypto test vectors |
| 73 |
TPM_DESC= Enable TPM plugin |
74 |
TPM_DESC= Enable TPM plugin |
| 74 |
UNBOUND_DESC= Enable DNSSEC-enabled resolver |
75 |
UNBOUND_DESC= Enable DNSSEC-enabled resolver |
| 75 |
UNITY_DESC= Enable Cisco Unity extension plugin |
76 |
UNITY_DESC= Enable Cisco Unity extension plugin |
| 76 |
VIA_DESC= Enable VIA Padlock support |
77 |
VIA_DESC= Enable VIA Padlock support |
| 77 |
VICI_DESC= Enable VICI management protocol |
78 |
VICI_DESC= Enable VICI management protocol |
| 78 |
VSTR_DESC= Use devel/vstr printf hooks |
79 |
VSTR_DESC= Use devel/vstr printf hooks |
| 79 |
XAUTH_DESC= Enable XAuth password verification |
80 |
XAUTH_DESC= Enable XAuth password verification |
| 80 |
|
81 |
|
| 81 |
# Extra options |
82 |
# Extra options |
| 82 |
BUILTIN_CONFIGURE_ON= --with-printf-hooks=builtin |
83 |
BUILTIN_CONFIGURE_ON= --with-printf-hooks=builtin |
| 83 |
CURL_CONFIGURE_ON= --enable-curl |
84 |
CURL_CONFIGURE_ON= --enable-curl |
| 84 |
CURL_LIB_DEPENDS= libcurl.so:ftp/curl |
85 |
CURL_LIB_DEPENDS= libcurl.so:ftp/curl |
| 85 |
EAPAKA3GPP2_CONFIGURE_ON= --enable-eap-aka --enable-eap-aka-3gpp2 |
86 |
EAPAKA3GPP2_CONFIGURE_ON= --enable-eap-aka --enable-eap-aka-3gpp2 |
| 86 |
EAPAKA3GPP2_LIB_DEPENDS=libgmp.so:math/gmp |
87 |
EAPAKA3GPP2_LIB_DEPENDS=libgmp.so:math/gmp |
| 87 |
EAPDYNAMIC_CONFIGURE_ON=--enable-eap-dynamic |
88 |
EAPDYNAMIC_CONFIGURE_ON=--enable-eap-dynamic |
| 88 |
EAPRADIUS_CONFIGURE_ON= --enable-eap-radius |
89 |
EAPRADIUS_CONFIGURE_ON= --enable-eap-radius |
| 89 |
EAPSIMFILE_CONFIGURE_ON=--enable-eap-sim --enable-eap-sim-file |
90 |
EAPSIMFILE_CONFIGURE_ON=--enable-eap-sim --enable-eap-sim-file |
| 90 |
GCM_CONFIGURE_ON= --enable-gcm |
91 |
GCM_CONFIGURE_ON= --enable-gcm |
| 91 |
IKEV1_CONFIGURE_OFF= --disable-ikev1 |
92 |
IKEV1_CONFIGURE_OFF= --disable-ikev1 |
| 92 |
IPSECKEY_CONFIGURE_ON= --enable-ipseckey |
93 |
IPSECKEY_CONFIGURE_ON= --enable-ipseckey |
| 93 |
KERNELLIBIPSEC_CONFIGURE_ON= --enable-kernel-libipsec |
94 |
KERNELLIBIPSEC_CONFIGURE_ON= --enable-kernel-libipsec |
| 94 |
LDAP_CONFIGURE_ON= --enable-ldap |
95 |
LDAP_CONFIGURE_ON= --enable-ldap |
| 95 |
LDAP_USE= OPENLDAP=yes |
96 |
LDAP_USE= OPENLDAP=yes |
| 96 |
LIBC_CONFIGURE_ON= --with-printf-hooks=glibc |
97 |
LIBC_CONFIGURE_ON= --with-printf-hooks=glibc |
| 97 |
LOADTESTER_CONFIGURE_ON=--enable-load-tester |
98 |
LOADTESTER_CONFIGURE_ON=--enable-load-tester |
| 98 |
MEDIATION_CONFIGURE_ON= --enable-mediation |
99 |
MEDIATION_CONFIGURE_ON= --enable-mediation |
| 99 |
MYSQL_CONFIGURE_ON= --enable-mysql |
100 |
MYSQL_CONFIGURE_ON= --enable-mysql |
| 100 |
MYSQL_USES= mysql |
101 |
MYSQL_USES= mysql |
| 101 |
PKCS11_CONFIGURE_ON= --enable-pkcs11 |
102 |
PKCS11_CONFIGURE_ON= --enable-pkcs11 |
| 102 |
PKI_CONFIGURE_OFF= --disable-pki |
103 |
PKI_CONFIGURE_OFF= --disable-pki |
| 103 |
SCEP_CONFIGURE_OFF= --disable-scepclient |
104 |
SCEP_CONFIGURE_OFF= --disable-scepclient |
| 104 |
SMP_CONFIGURE_ON= --enable-smp |
105 |
SMP_CONFIGURE_ON= --enable-smp |
| 105 |
SMP_LIB_DEPENDS= libxml2.so:textproc/libxml2 |
106 |
SMP_LIB_DEPENDS= libxml2.so:textproc/libxml2 |
| 106 |
SQLITE_CONFIGURE_ON= --enable-sqlite |
107 |
SQLITE_CONFIGURE_ON= --enable-sqlite |
| 107 |
SQLITE_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 |
108 |
SQLITE_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 |
| 108 |
SWANCTL_CONFIGURE_ON= --enable-swanctl |
109 |
SWANCTL_CONFIGURE_ON= --enable-swanctl |
| 109 |
SWANCTL_IMPLIES= VICI |
110 |
SWANCTL_IMPLIES= VICI |
| 110 |
TESTVECTOR_CONFIGURE_ON=--enable-test-vectors |
111 |
TESTVECTOR_CONFIGURE_ON=--enable-test-vectors |
| 111 |
TPM_CONFIGURE_ON= --enable-tpm |
112 |
TPM_CONFIGURE_ON= --enable-tpm |
| 112 |
UNBOUND_CONFIGURE_ON= --enable-unbound |
113 |
UNBOUND_CONFIGURE_ON= --enable-unbound |
| 113 |
UNBOUND_LIB_DEPENDS= libunbound.so:dns/unbound \ |
114 |
UNBOUND_LIB_DEPENDS= libunbound.so:dns/unbound \ |
| 114 |
libldns.so:dns/ldns |
115 |
libldns.so:dns/ldns |
| 115 |
UNITY_CONFIGURE_ON= --enable-unity |
116 |
UNITY_CONFIGURE_ON= --enable-unity |
| 116 |
VIA_CONFIGURE_ON= --enable-padlock |
117 |
VIA_CONFIGURE_ON= --enable-padlock |
| 117 |
VICI_CONFIGURE_ON= --enable-vici |
118 |
VICI_CONFIGURE_ON= --enable-vici |
| 118 |
VSTR_CONFIGURE_ON= --with-printf-hooks=vstr |
119 |
VSTR_CONFIGURE_ON= --with-printf-hooks=vstr |
| 119 |
VSTR_LIB_DEPENDS= libvstr.so:devel/vstr |
120 |
VSTR_LIB_DEPENDS= libvstr.so:devel/vstr |
| 120 |
XAUTH_CONFIGURE_ON= --enable-xauth-eap \ |
121 |
XAUTH_CONFIGURE_ON= --enable-xauth-eap \ |
| 121 |
--enable-xauth-generic \ |
122 |
--enable-xauth-generic \ |
| 122 |
--enable-xauth-pam |
123 |
--enable-xauth-pam |
| 123 |
|
124 |
|
| 124 |
.include <bsd.port.options.mk> |
125 |
.include <bsd.port.options.mk> |
| 125 |
|
126 |
|
| 126 |
.if ${PORT_OPTIONS:MEAPSIMFILE} || ${PORT_OPTIONS:MEAPAKA3GPP2} |
127 |
.if ${PORT_OPTIONS:MEAPSIMFILE} || ${PORT_OPTIONS:MEAPAKA3GPP2} |
| 127 |
PLIST_SUB+= SIMAKA="" |
128 |
PLIST_SUB+= SIMAKA="" |
| 128 |
.else |
129 |
.else |
| 129 |
PLIST_SUB+= SIMAKA="@comment " |
130 |
PLIST_SUB+= SIMAKA="@comment " |
| 130 |
.endif |
131 |
.endif |
| 131 |
|
132 |
|
| 132 |
.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MSQLITE} |
133 |
.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MSQLITE} |
| 133 |
CONFIGURE_ARGS+= --enable-attr-sql --enable-sql |
134 |
CONFIGURE_ARGS+= --enable-attr-sql --enable-sql |
| 134 |
PLIST_SUB+= SQL="" |
135 |
PLIST_SUB+= SQL="" |
| 135 |
.else |
136 |
.else |
| 136 |
PLIST_SUB+= SQL="@comment " |
137 |
PLIST_SUB+= SQL="@comment " |
| 137 |
.endif |
138 |
.endif |
| 138 |
|
139 |
|
| 139 |
.if ${PORT_OPTIONS:MIKEV1} || ${PORT_OPTIONS:MXAUTH} |
140 |
.if ${PORT_OPTIONS:MIKEV1} || ${PORT_OPTIONS:MXAUTH} |
| 140 |
PLIST_SUB+= XAUTHGEN="" |
141 |
PLIST_SUB+= XAUTHGEN="" |
| 141 |
.else |
142 |
.else |
| 142 |
PLIST_SUB+= XAUTHGEN="@comment " |
143 |
PLIST_SUB+= XAUTHGEN="@comment " |
| 143 |
.endif |
144 |
.endif |
| 144 |
|
145 |
|
| 145 |
# Hack to disable VIA in plist of unsupported architectures |
146 |
# Hack to disable VIA in plist of unsupported architectures |
| 146 |
.if ! ${OPTIONS_DEFINE:MVIA} |
147 |
.if ! ${OPTIONS_DEFINE:MVIA} |
| 147 |
PLIST_SUB+= VIA="@comment " |
148 |
PLIST_SUB+= VIA="@comment " |
| 148 |
.else |
149 |
.else |
| 149 |
.endif |
150 |
.endif |
| 150 |
|
151 |
|
| 151 |
post-install: |
152 |
post-install: |
| 152 |
.if ${PORT_OPTIONS:MVICI} |
153 |
.if ${PORT_OPTIONS:MVICI} |
| 153 |
${INSTALL_DATA} ${WRKSRC}/src/libcharon/plugins/vici/libvici.h \ |
154 |
${INSTALL_DATA} ${WRKSRC}/src/libcharon/plugins/vici/libvici.h \ |
| 154 |
${STAGEDIR}${PREFIX}/include |
155 |
${STAGEDIR}${PREFIX}/include |
| 155 |
.endif |
156 |
.endif |
| 156 |
|
157 |
|
| 157 |
.include <bsd.port.mk> |
158 |
.include <bsd.port.mk> |