2 # Copyright (C) 2012-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://download.strongswan.org
/ http
://download2.strongswan.org
/
16 PKG_MD5SUM
:=fab014be1477ef4ebf9a765e10f8802c
18 PKG_MAINTAINER
:=Steven Barth
<cyrus@openwrt.org
>
87 PKG_CONFIG_DEPENDS
:= \
88 CONFIG_STRONGSWAN_ROUTING_TABLE \
89 CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO \
90 $(patsubst %,CONFIG_PACKAGE_strongswan-mod-
%,$(PKG_MOD_AVAILABLE
)) \
96 include $(INCLUDE_DIR
)/package.mk
98 define Package
/strongswan
/Default
103 URL
:=http
://www.strongswan.org
/
106 define Package
/strongswan
/description
/Default
107 StrongSwan is an OpenSource IPsec implementation for the Linux operating system.
110 define Package
/strongswan
111 $(call Package
/strongswan
/Default
)
112 DEPENDS
:= +libpthread
+ip \
113 +kmod-crypto-authenc \
114 +kmod-ipsec
+kmod-ipsec4
+kmod-ipsec6 \
115 +kmod-ipt-ipsec
+iptables-mod-ipsec
118 define Package
/strongswan
/config
119 source
"$(SOURCE)/Config.in"
122 define Package
/strongswan
/description
123 $(call Package
/strongswan
/description
/Default
)
124 This package contains shared libraries and scripts.
127 define Package
/strongswan-full
128 $(call Package
/strongswan
/Default
)
130 DEPENDS
:= +strongswan \
132 +strongswan-mod-addrblock \
133 +strongswan-mod-aes \
134 +strongswan-mod-af-alg \
135 +strongswan-mod-agent \
136 +strongswan-mod-attr \
137 +strongswan-mod-attr-sql \
138 +strongswan-mod-blowfish \
139 +strongswan-mod-ccm \
140 +strongswan-mod-cmac \
141 +strongswan-mod-constraints \
142 +strongswan-mod-coupling \
143 +strongswan-mod-ctr \
144 +strongswan-mod-curl \
145 +strongswan-mod-des \
146 +strongswan-mod-dhcp \
147 +strongswan-mod-dnskey \
148 +strongswan-mod-duplicheck \
149 +strongswan-mod-eap-identity \
150 +strongswan-mod-eap-md5 \
151 +strongswan-mod-eap-mschapv2 \
152 +strongswan-mod-eap-radius \
153 +strongswan-mod-eap-tls \
154 +strongswan-mod-farp \
155 +strongswan-mod-fips-prf \
156 +strongswan-mod-gcm \
157 +strongswan-mod-gcrypt \
158 +strongswan-mod-gmp \
160 +strongswan-mod-hmac \
161 +strongswan-mod-kernel-netlink \
162 +strongswan-mod-ldap \
163 +strongswan-mod-led \
164 +strongswan-mod-load-tester \
165 +strongswan-mod-nonce \
166 +strongswan-mod-md4 \
167 +strongswan-mod-md5 \
168 +strongswan-mod-mysql \
169 +strongswan-mod-openssl \
170 +strongswan-mod-pem \
171 +strongswan-mod-pgp \
172 +strongswan-mod-pkcs1 \
173 +strongswan-mod-pkcs8 \
174 +strongswan-mod-pkcs11 \
175 +strongswan-mod-pubkey \
176 +strongswan-mod-random \
177 +strongswan-mod-resolve \
178 +strongswan-mod-revocation \
179 +strongswan-mod-sha1 \
180 +strongswan-mod-sha2 \
181 +strongswan-mod-smp \
182 +strongswan-mod-socket-default \
183 +strongswan-mod-sql \
184 +strongswan-mod-sqlite \
185 +strongswan-mod-stroke \
186 +strongswan-mod-test-vectors \
187 +strongswan-mod-uci \
188 +strongswan-mod-unity \
189 +strongswan-mod-updown \
190 +strongswan-mod-whitelist \
191 +strongswan-mod-x509 \
192 +strongswan-mod-xauth-eap \
193 +strongswan-mod-xauth-generic \
194 +strongswan-mod-xcbc \
199 define Package
/strongswan-full
/description
200 $(call Package
/strongswan
/description
/Default
)
201 This meta-package contains dependencies for
all of the strongswan plugins
202 except kernel-libipsec
,
203 socket-dynamic and which are ommitted in favor of the kernel-netlink and
204 socket-default plugins.
208 define Package
/strongswan-default
209 $(call Package
/strongswan
/Default
)
211 DEPENDS
:= +strongswan \
213 +strongswan-mod-aes \
214 +strongswan-mod-attr \
215 +strongswan-mod-constraints \
216 +strongswan-mod-des \
217 +strongswan-mod-dnskey \
218 +strongswan-mod-fips-prf \
219 +strongswan-mod-gmp \
220 +strongswan-mod-hmac \
221 +strongswan-mod-kernel-netlink \
222 +strongswan-mod-md5 \
223 +strongswan-mod-nonce \
224 +strongswan-mod-pem \
225 +strongswan-mod-pgp \
226 +strongswan-mod-pkcs1 \
227 +strongswan-mod-pubkey \
228 +strongswan-mod-random \
229 +strongswan-mod-resolve \
230 +strongswan-mod-revocation \
231 +strongswan-mod-sha1 \
232 +strongswan-mod-sha2 \
233 +strongswan-mod-socket-default \
234 +strongswan-mod-stroke \
235 +strongswan-mod-updown \
236 +strongswan-mod-x509 \
237 +strongswan-mod-xauth-generic \
238 +strongswan-mod-xcbc \
242 define Package
/strongswan-default
/description
243 $(call Package
/strongswan
/description
/Default
)
244 This meta-package contains only dependencies to match upstream defaults.
247 define Package
/strongswan-minimal
248 $(call Package
/strongswan
/Default
)
250 DEPENDS
:= +strongswan \
252 +strongswan-mod-aes \
253 +strongswan-mod-gmp \
254 +strongswan-mod-hmac \
255 +strongswan-mod-kernel-netlink \
256 +strongswan-mod-nonce \
257 +strongswan-mod-pubkey \
258 +strongswan-mod-random \
259 +strongswan-mod-sha1 \
260 +strongswan-mod-socket-default \
261 +strongswan-mod-stroke \
262 +strongswan-mod-updown \
263 +strongswan-mod-x509 \
267 define Package
/strongswan-minimal
/description
268 $(call Package
/strongswan
/description
/Default
)
269 This meta-package contains only dependencies for a minimal IKEv2 setup.
272 define Package
/strongswan-charon
273 $(call Package
/strongswan
/Default
)
274 TITLE
+= IKEv1
/IKEv2 keying daemon
275 DEPENDS
:= +strongswan
278 define Package
/strongswan-charon
/description
279 $(call Package
/strongswan
/description
/Default
)
280 This package contains charon
, an IKEv2 keying daemon.
283 define Package
/strongswan-utils
284 $(call Package
/strongswan
/Default
)
286 DEPENDS
:= +strongswan
289 define Package
/strongswan-utils
/description
290 $(call Package
/strongswan
/description
/Default
)
291 This package contains the pki
& scepclient utilities.
294 define Package
/strongswan-libtls
295 $(call Package
/strongswan
/Default
)
297 DEPENDS
:= +strongswan
300 define Package
/strongswan-libtls
/description
301 $(call Package
/strongswan
/description
/Default
)
302 This package contains libtls for strongSwan plugins eap-tls
, eap-ttls
,
307 define Package
/strongswan-mod-
$(1)
308 $$(call Package
/strongswan
/Default
)
309 TITLE
:= StrongSwan
$(2) plugin
310 DEPENDS
:= +strongswan
$(3)
313 define Package
/strongswan-mod-
$(1)/install
314 $(INSTALL_DIR
) $$(1)/etc
/strongswan.d
/charon
315 if
[ -f
$(PKG_INSTALL_DIR
)/etc
/strongswan.d
/charon
/$(1).conf
]; then \
316 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/strongswan.d
/charon
/$(1).conf
$$(1)/etc
/strongswan.d
/charon
/; fi
317 $(INSTALL_DIR
) $$(1)/usr
/lib
/ipsec
/plugins
318 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-
$(1).so \
319 $$(1)/usr
/lib
/ipsec
/plugins
/
320 $(call Plugin
/$(1)/install,$$(1))
323 $$(eval
$$(call BuildPackage
,strongswan-mod-
$(1)))
330 --with-systemdsystemunitdir
=no \
331 $(if
$(CONFIG_PACKAGE_strongswan-utils
),--enable-pki
--enable-scepclient
,--disable-pki
--disable-scepclient
) \
332 --with-random-device
=/dev
/random \
333 --with-urandom-device
=/dev
/urandom \
334 --with-routing-table
="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE))" \
335 --with-routing-table-prio
="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO))" \
336 $(foreach m
,$(PKG_MOD_AVAILABLE
), \
337 $(if
$(CONFIG_PACKAGE_strongswan-mod-
$(m
)),--enable-
$(m
),--disable-
$(m
)) \
340 EXTRA_LDFLAGS
+= -Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
342 define Package
/strongswan
/conffiles
349 define Package
/strongswan
/install
350 $(INSTALL_DIR
) $(1)/etc
351 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/ipsec.conf
$(1)/etc
/
352 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/strongswan.conf
$(1)/etc
/
353 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
354 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/{libstrongswan.so.
*,libhydra.so.
*} $(1)/usr
/lib
/ipsec
/
355 $(INSTALL_CONF
) .
/files
/ipsec.secrets
$(1)/etc
/
356 $(INSTALL_CONF
) .
/files
/ipsec.user
$(1)/etc
/
357 $(INSTALL_DIR
) $(1)/etc
/init.d
358 $(INSTALL_BIN
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
361 define Package
/strongswan-default
/install
365 define Package
/strongswan-full
/install
369 define Package
/strongswan-minimal
/install
373 define Package
/strongswan-charon
/install
374 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
375 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/charon
$(1)/usr
/lib
/ipsec
/
376 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libcharon.so.
* $(1)/usr
/lib
/ipsec
/
379 define Package
/strongswan-utils
/install
380 $(INSTALL_DIR
) $(1)/usr
/sbin
381 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipsec
$(1)/usr
/sbin
/
382 $(INSTALL_DIR
) $(1)/usr
/bin
383 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pki
$(1)/usr
/bin
/
384 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
385 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/scepclient
$(1)/usr
/lib
/ipsec
/
388 define Package
/strongswan-libtls
/install
389 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
390 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libtls.so.
* $(1)/usr
/lib
/ipsec
/
393 define Plugin
/duplicheck
/install
394 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
395 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/duplicheck
$(1)/usr
/lib
/ipsec
/
396 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-duplicheck.so
$(1)/usr
/lib
/ipsec
/plugins
/
399 define Plugin
/eap-radius
/install
400 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
401 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libradius.so.
* $(1)/usr
/lib
/ipsec
/
402 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-eap-radius.so
$(1)/usr
/lib
/ipsec
/plugins
/
405 define Plugin
/attr-sql
/install
406 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
407 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pool
$(1)/usr
/lib
/ipsec
/
410 define Plugin
/stroke
/install
411 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/aacerts
412 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/acerts
413 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/cacerts
414 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/certs
415 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/crls
416 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/ocspcerts
417 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/private
418 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/reqs
420 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
421 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/{starter
,stroke
} $(1)/usr
/lib
/ipsec
/
422 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-stroke.so
$(1)/usr
/lib
/ipsec
/plugins
/
425 define Plugin
/updown
/install
426 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
427 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown
$(1)/usr
/lib
/ipsec
/
428 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-updown.so
$(1)/usr
/lib
/ipsec
/plugins
/
429 $(INSTALL_DIR
) $(1)/etc
432 define Plugin
/whitelist
/install
433 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
434 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/whitelist
$(1)/usr
/lib
/ipsec
/
435 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-whitelist.so
$(1)/usr
/lib
/ipsec
/plugins
/
438 define Plugin
/kernel-libipsec
/install
439 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
440 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libipsec.so.
* $(1)/usr
/lib
/ipsec
/
443 $(eval
$(call BuildPackage
,strongswan
))
444 $(eval
$(call BuildPackage
,strongswan-default
))
445 $(eval
$(call BuildPackage
,strongswan-full
))
446 $(eval
$(call BuildPackage
,strongswan-minimal
))
447 $(eval
$(call BuildPackage
,strongswan-charon
))
448 $(eval
$(call BuildPackage
,strongswan-utils
))
449 $(eval
$(call BuildPackage
,strongswan-libtls
))
450 $(eval
$(call BuildPlugin
,addrblock
,RFC
3779 address block constraint support
,))
451 $(eval
$(call BuildPlugin
,aes
,AES crypto
,))
452 $(eval
$(call BuildPlugin
,af-alg
,AF_ALG crypto interface to Linux Crypto API
,+kmod-crypto-user
))
453 $(eval
$(call BuildPlugin
,agent
,SSH agent signing
,))
454 $(eval
$(call BuildPlugin
,attr
,file based config
,))
455 $(eval
$(call BuildPlugin
,attr-sql
,SQL based config
,+strongswan-charon
))
456 $(eval
$(call BuildPlugin
,blowfish
,Blowfish crypto
,))
457 $(eval
$(call BuildPlugin
,ccm
,CCM AEAD wrapper crypto
,))
458 $(eval
$(call BuildPlugin
,cmac
,CMAC crypto
,))
459 $(eval
$(call BuildPlugin
,constraints
,advanced X509 constraint checking
,))
460 $(eval
$(call BuildPlugin
,coupling
,IKEv2 plugin to couple peer certificates permanently to authentication
,))
461 $(eval
$(call BuildPlugin
,ctr
,Counter Mode wrapper crypto
,))
462 $(eval
$(call BuildPlugin
,curl
,cURL fetcher plugin
,+PACKAGE_strongswan-mod-curl
:libcurl
))
463 $(eval
$(call BuildPlugin
,des
,DES crypto
,))
464 $(eval
$(call BuildPlugin
,dhcp
,DHCP based attribute provider
,))
465 $(eval
$(call BuildPlugin
,dnskey
,DNS RR key decoding
,))
466 $(eval
$(call BuildPlugin
,duplicheck
,advanced duplicate checking
,))
467 $(eval
$(call BuildPlugin
,eap-identity
,EAP identity helper
,))
468 $(eval
$(call BuildPlugin
,eap-md5
,EAP MD5
(CHAP
) EAP auth
,))
469 $(eval
$(call BuildPlugin
,eap-mschapv2
,EAP MS-CHAPv2 EAP auth
,+strongswan-mod-md4
+strongswan-mod-des
))
470 $(eval
$(call BuildPlugin
,eap-radius
,EAP RADIUS auth
,))
471 $(eval
$(call BuildPlugin
,eap-tls
,EAP TLS auth
,+strongswan-libtls
))
472 $(eval
$(call BuildPlugin
,farp
,fake arp respsonses
,))
473 $(eval
$(call BuildPlugin
,fips-prf
,FIPS PRF crypto
,+strongswan-mod-sha1
))
474 $(eval
$(call BuildPlugin
,gcm
,GCM AEAD wrapper crypto
,))
475 $(eval
$(call BuildPlugin
,gcrypt
,libgcrypt
,+PACKAGE_strongswan-mod-gcrypt
:libgcrypt
))
476 $(eval
$(call BuildPlugin
,gmp
,libgmp
,+PACKAGE_strongswan-mod-gmp
:libgmp
))
477 $(eval
$(call BuildPlugin
,ha
,high availability cluster
,))
478 $(eval
$(call BuildPlugin
,hmac
,HMAC crypto
,))
479 $(eval
$(call BuildPlugin
,kernel-libipsec
,libipsec kernel interface
,))
480 $(eval
$(call BuildPlugin
,kernel-netlink
,netlink kernel interface
,))
481 $(eval
$(call BuildPlugin
,ldap
,LDAP
,+PACKAGE_strongswan-mod-ldap
:libopenldap
))
482 $(eval
$(call BuildPlugin
,led
,LED blink on IKE activity
,))
483 $(eval
$(call BuildPlugin
,load-tester
,load testing
,))
484 $(eval
$(call BuildPlugin
,nonce
,nonce genereation
,))
485 $(eval
$(call BuildPlugin
,md4
,MD4 crypto
,))
486 $(eval
$(call BuildPlugin
,md5
,MD5 crypto
,))
487 $(eval
$(call BuildPlugin
,mysql
,MySQL database interface
,+strongswan-mod-sql
+PACKAGE_strongswan-mod-mysql
:libmysqlclient-r
))
488 $(eval
$(call BuildPlugin
,openssl
,OpenSSL crypto
,+PACKAGE_strongswan-mod-openssl
:libopenssl
))
489 $(eval
$(call BuildPlugin
,pem
,PEM decoding
,))
490 $(eval
$(call BuildPlugin
,pgp
,PGP key decoding
,))
491 $(eval
$(call BuildPlugin
,pkcs1
,PKCS1 key decoding
,))
492 $(eval
$(call BuildPlugin
,pkcs8
,PKCS8 key decoding
,))
493 $(eval
$(call BuildPlugin
,pkcs11
,PKCS11 key decoding
,))
494 $(eval
$(call BuildPlugin
,pubkey
,raw public key
,))
495 $(eval
$(call BuildPlugin
,random
,RNG
,))
496 $(eval
$(call BuildPlugin
,resolve
,DNS resolver
,))
497 $(eval
$(call BuildPlugin
,revocation
,X509 CRL
/OCSP revocation
,))
498 $(eval
$(call BuildPlugin
,sha1
,SHA1 crypto
,))
499 $(eval
$(call BuildPlugin
,sha2
,SHA2 crypto
,))
500 $(eval
$(call BuildPlugin
,smp
,SMP configuration and control interface
,+PACKAGE_strongswan-mod-smp
:libxml2
))
501 $(eval
$(call BuildPlugin
,socket-default
,default socket implementation for charon
,))
502 $(eval
$(call BuildPlugin
,socket-dynamic
,dynamic socket implementation for charon
,))
503 $(eval
$(call BuildPlugin
,sql
,SQL database interface
,))
504 $(eval
$(call BuildPlugin
,sqlite
,SQLite database interface
,+strongswan-mod-sql
+PACKAGE_strongswan-mod-sqlite
:libsqlite3
))
505 $(eval
$(call BuildPlugin
,stroke
,Stroke
,+strongswan-utils
))
506 $(eval
$(call BuildPlugin
,test-vectors
,crypto
test vectors
,))
507 $(eval
$(call BuildPlugin
,uci
,UCI config interface
,+PACKAGE_strongswan-mod-uci
:libuci
))
508 $(eval
$(call BuildPlugin
,unity
,Cisco Unity extension
,))
509 $(eval
$(call BuildPlugin
,updown
,updown firewall
,))
510 $(eval
$(call BuildPlugin
,whitelist
,peer identity whitelisting
,))
511 $(eval
$(call BuildPlugin
,x509
,x509 certificate
,))
512 $(eval
$(call BuildPlugin
,xauth-eap
,EAP XAuth backend
,))
513 $(eval
$(call BuildPlugin
,xauth-generic
,generic XAuth backend
,))
514 $(eval
$(call BuildPlugin
,xcbc
,xcbc crypto
,))