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
:=66f258901a3d6c271da1a0c7fb3e5013
18 PKG_MAINTAINER
:=Steven Barth
<cyrus@openwrt.org
>
85 PKG_CONFIG_DEPENDS
:= \
86 CONFIG_STRONGSWAN_ROUTING_TABLE \
87 CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO \
88 $(patsubst %,CONFIG_PACKAGE_strongswan-mod-
%,$(PKG_MOD_AVAILABLE
)) \
94 include $(INCLUDE_DIR
)/package.mk
96 define Package
/strongswan
/Default
101 URL
:=http
://www.strongswan.org
/
104 define Package
/strongswan
/description
/Default
105 StrongSwan is an OpenSource IPsec implementation for the Linux operating system.
108 define Package
/strongswan
109 $(call Package
/strongswan
/Default
)
110 DEPENDS
:= +libpthread
+ip \
111 +kmod-crypto-authenc \
112 +kmod-ipsec
+kmod-ipsec4
+kmod-ipsec6 \
113 +kmod-ipt-ipsec
+iptables-mod-ipsec
116 define Package
/strongswan
/config
117 source
"$(SOURCE)/Config.in"
120 define Package
/strongswan
/description
121 $(call Package
/strongswan
/description
/Default
)
122 This package contains shared libraries and scripts.
125 define Package
/strongswan-full
126 $(call Package
/strongswan
/Default
)
128 DEPENDS
:= +strongswan \
130 +strongswan-mod-addrblock \
131 +strongswan-mod-aes \
132 +strongswan-mod-af-alg \
133 +strongswan-mod-agent \
134 +strongswan-mod-attr \
135 +strongswan-mod-attr-sql \
136 +strongswan-mod-blowfish \
137 +strongswan-mod-ccm \
138 +strongswan-mod-cmac \
139 +strongswan-mod-constraints \
140 +strongswan-mod-coupling \
141 +strongswan-mod-ctr \
142 +strongswan-mod-curl \
143 +strongswan-mod-des \
144 +strongswan-mod-dhcp \
145 +strongswan-mod-dnskey \
146 +strongswan-mod-duplicheck \
147 +strongswan-mod-eap-identity \
148 +strongswan-mod-eap-md5 \
149 +strongswan-mod-eap-mschapv2 \
150 +strongswan-mod-eap-radius \
151 +strongswan-mod-farp \
152 +strongswan-mod-fips-prf \
153 +strongswan-mod-gcm \
154 +strongswan-mod-gcrypt \
155 +strongswan-mod-gmp \
157 +strongswan-mod-hmac \
158 +strongswan-mod-kernel-netlink \
159 +strongswan-mod-ldap \
160 +strongswan-mod-led \
161 +strongswan-mod-load-tester \
162 +strongswan-mod-nonce \
163 +strongswan-mod-md4 \
164 +strongswan-mod-md5 \
165 +strongswan-mod-mysql \
166 +strongswan-mod-openssl \
167 +strongswan-mod-pem \
168 +strongswan-mod-pgp \
169 +strongswan-mod-pkcs1 \
170 +strongswan-mod-pkcs8 \
171 +strongswan-mod-pkcs11 \
172 +strongswan-mod-pubkey \
173 +strongswan-mod-random \
174 +strongswan-mod-resolve \
175 +strongswan-mod-revocation \
176 +strongswan-mod-sha1 \
177 +strongswan-mod-sha2 \
178 +strongswan-mod-smp \
179 +strongswan-mod-socket-default \
180 +strongswan-mod-sqlite \
181 +strongswan-mod-stroke \
182 +strongswan-mod-test-vectors \
183 +strongswan-mod-uci \
184 +strongswan-mod-unity \
185 +strongswan-mod-updown \
186 +strongswan-mod-whitelist \
187 +strongswan-mod-x509 \
188 +strongswan-mod-xauth-eap \
189 +strongswan-mod-xauth-generic \
190 +strongswan-mod-xcbc \
195 define Package
/strongswan-full
/description
196 $(call Package
/strongswan
/description
/Default
)
197 This meta-package contains dependencies for
all of the strongswan plugins
198 except kernel-libipsec
,
199 socket-dynamic and which are ommitted in favor of the kernel-netlink and
200 socket-default plugins.
204 define Package
/strongswan-default
205 $(call Package
/strongswan
/Default
)
207 DEPENDS
:= +strongswan \
209 +strongswan-mod-aes \
210 +strongswan-mod-attr \
211 +strongswan-mod-constraints \
212 +strongswan-mod-des \
213 +strongswan-mod-dnskey \
214 +strongswan-mod-fips-prf \
215 +strongswan-mod-gmp \
216 +strongswan-mod-hmac \
217 +strongswan-mod-kernel-netlink \
218 +strongswan-mod-md5 \
219 +strongswan-mod-nonce \
220 +strongswan-mod-pem \
221 +strongswan-mod-pgp \
222 +strongswan-mod-pkcs1 \
223 +strongswan-mod-pubkey \
224 +strongswan-mod-random \
225 +strongswan-mod-resolve \
226 +strongswan-mod-revocation \
227 +strongswan-mod-sha1 \
228 +strongswan-mod-sha2 \
229 +strongswan-mod-socket-default \
230 +strongswan-mod-stroke \
231 +strongswan-mod-updown \
232 +strongswan-mod-x509 \
233 +strongswan-mod-xauth-generic \
234 +strongswan-mod-xcbc \
238 define Package
/strongswan-default
/description
239 $(call Package
/strongswan
/description
/Default
)
240 This meta-package contains only dependencies to match upstream defaults.
243 define Package
/strongswan-minimal
244 $(call Package
/strongswan
/Default
)
246 DEPENDS
:= +strongswan \
248 +strongswan-mod-aes \
249 +strongswan-mod-gmp \
250 +strongswan-mod-hmac \
251 +strongswan-mod-kernel-netlink \
252 +strongswan-mod-nonce \
253 +strongswan-mod-pubkey \
254 +strongswan-mod-random \
255 +strongswan-mod-sha1 \
256 +strongswan-mod-socket-default \
257 +strongswan-mod-stroke \
258 +strongswan-mod-updown \
259 +strongswan-mod-x509 \
263 define Package
/strongswan-minimal
/description
264 $(call Package
/strongswan
/description
/Default
)
265 This meta-package contains only dependencies for a minimal IKEv2 setup.
268 define Package
/strongswan-charon
269 $(call Package
/strongswan
/Default
)
270 TITLE
+= IKEv1
/IKEv2 keying daemon
271 DEPENDS
:= +strongswan
274 define Package
/strongswan-charon
/description
275 $(call Package
/strongswan
/description
/Default
)
276 This package contains charon
, an IKEv2 keying daemon.
279 define Package
/strongswan-utils
280 $(call Package
/strongswan
/Default
)
282 DEPENDS
:= +strongswan
285 define Package
/strongswan-utils
/description
286 $(call Package
/strongswan
/description
/Default
)
287 This package contains the pki
& scepclient utilities.
291 define Package
/strongswan-mod-
$(1)
292 $$(call Package
/strongswan
/Default
)
293 TITLE
:= StrongSwan
$(2) plugin
294 DEPENDS
:= +strongswan
$(3)
297 define Package
/strongswan-mod-
$(1)/install
298 $(INSTALL_DIR
) $$(1)/etc
/strongswan.d
/charon
299 if
[ -f
$(PKG_INSTALL_DIR
)/etc
/strongswan.d
/charon
/$(1).conf
]; then \
300 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/strongswan.d
/charon
/$(1).conf
$$(1)/etc
/strongswan.d
/charon
/; fi
301 $(INSTALL_DIR
) $$(1)/usr
/lib
/ipsec
/plugins
302 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-
$(1).so \
303 $$(1)/usr
/lib
/ipsec
/plugins
/
304 $(call Plugin
/$(1)/install,$$(1))
307 $$(eval
$$(call BuildPackage
,strongswan-mod-
$(1)))
314 --with-systemdsystemunitdir
=no \
315 $(if
$(CONFIG_PACKAGE_strongswan-utils
),--enable-pki
--enable-scepclient
,--disable-pki
--disable-scepclient
) \
316 --with-random-device
=/dev
/random \
317 --with-urandom-device
=/dev
/urandom \
318 --with-routing-table
="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE))" \
319 --with-routing-table-prio
="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO))" \
320 $(foreach m
,$(PKG_MOD_AVAILABLE
), \
321 $(if
$(CONFIG_PACKAGE_strongswan-mod-
$(m
)),--enable-
$(m
),--disable-
$(m
)) \
324 EXTRA_LDFLAGS
+= -Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
326 define Package
/strongswan
/conffiles
333 define Package
/strongswan
/install
334 $(INSTALL_DIR
) $(1)/etc
335 $(CP
) $(PKG_INSTALL_DIR
)/etc
/strongswan.conf
$(1)/etc
/
336 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
337 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/{libstrongswan.so.
*,libhydra.so.
*} $(1)/usr
/lib
/ipsec
/
338 $(INSTALL_CONF
) .
/files
/ipsec.secrets
$(1)/etc
/
339 $(INSTALL_DIR
) $(1)/etc
/init.d
340 $(INSTALL_BIN
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
343 define Package
/strongswan-default
/install
347 define Package
/strongswan-full
/install
351 define Package
/strongswan-minimal
/install
355 define Package
/strongswan-charon
/install
356 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
357 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/charon
$(1)/usr
/lib
/ipsec
/
358 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libcharon.so.
* $(1)/usr
/lib
/ipsec
/
361 define Package
/strongswan-utils
/install
362 $(INSTALL_DIR
) $(1)/usr
/sbin
363 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipsec
$(1)/usr
/sbin
/
364 $(INSTALL_DIR
) $(1)/usr
/bin
365 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pki
$(1)/usr
/bin
/
366 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
367 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/scepclient
$(1)/usr
/lib
/ipsec
/
370 define Plugin
/duplicheck
/install
371 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
372 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/duplicheck
$(1)/usr
/lib
/ipsec
/
373 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-duplicheck.so
$(1)/usr
/lib
/ipsec
/plugins
/
376 define Plugin
/eap-radius
/install
377 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
378 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libradius.so.
* $(1)/usr
/lib
/ipsec
/
379 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-eap-radius.so
$(1)/usr
/lib
/ipsec
/plugins
/
382 define Plugin
/attr-sql
/install
383 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
384 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pool
$(1)/usr
/lib
/ipsec
/
387 define Plugin
/stroke
/install
388 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/aacerts
389 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/acerts
390 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/cacerts
391 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/certs
392 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/crls
393 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/ocspcerts
394 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/private
395 $(INSTALL_DIR
) $(1)/etc
/ipsec.d
/reqs
397 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/ipsec.conf
$(1)/etc
/
399 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
400 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/{starter
,stroke
} $(1)/usr
/lib
/ipsec
/
401 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-stroke.so
$(1)/usr
/lib
/ipsec
/plugins
/
404 define Plugin
/updown
/install
405 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
406 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown
$(1)/usr
/lib
/ipsec
/
407 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-updown.so
$(1)/usr
/lib
/ipsec
/plugins
/
408 $(INSTALL_DIR
) $(1)/etc
409 $(INSTALL_CONF
) .
/files
/ipsec.user
$(1)/etc
/
412 define Plugin
/whitelist
/install
413 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
/plugins
414 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/whitelist
$(1)/usr
/lib
/ipsec
/
415 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-whitelist.so
$(1)/usr
/lib
/ipsec
/plugins
/
418 define Plugin
/kernel-libipsec
/install
419 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
420 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/libipsec.so.
* $(1)/usr
/lib
/ipsec
/
423 $(eval
$(call BuildPackage
,strongswan
))
424 $(eval
$(call BuildPackage
,strongswan-default
))
425 $(eval
$(call BuildPackage
,strongswan-full
))
426 $(eval
$(call BuildPackage
,strongswan-minimal
))
427 $(eval
$(call BuildPackage
,strongswan-charon
))
428 $(eval
$(call BuildPackage
,strongswan-utils
))
429 $(eval
$(call BuildPlugin
,addrblock
,RFC
3779 address block constraint support
,))
430 $(eval
$(call BuildPlugin
,aes
,AES crypto
,))
431 $(eval
$(call BuildPlugin
,af-alg
,AF_ALG crypto interface to Linux Crypto API
,+kmod-crypto-user
))
432 $(eval
$(call BuildPlugin
,agent
,SSH agent signing
,))
433 $(eval
$(call BuildPlugin
,attr
,file based config
,))
434 $(eval
$(call BuildPlugin
,attr-sql
,SQL based config
,+strongswan-charon
))
435 $(eval
$(call BuildPlugin
,blowfish
,Blowfish crypto
,))
436 $(eval
$(call BuildPlugin
,ccm
,CCM AEAD wrapper crypto
,))
437 $(eval
$(call BuildPlugin
,cmac
,CMAC crypto
,))
438 $(eval
$(call BuildPlugin
,constraints
,advanced X509 constraint checking
,))
439 $(eval
$(call BuildPlugin
,coupling
,IKEv2 plugin to couple peer certificates permanently to authentication
,))
440 $(eval
$(call BuildPlugin
,ctr
,Counter Mode wrapper crypto
,))
441 $(eval
$(call BuildPlugin
,curl
,cURL fetcher plugin
,+PACKAGE_strongswan-mod-curl
:libcurl
))
442 $(eval
$(call BuildPlugin
,des
,DES crypto
,))
443 $(eval
$(call BuildPlugin
,dhcp
,DHCP based attribute provider
,))
444 $(eval
$(call BuildPlugin
,dnskey
,DNS RR key decoding
,))
445 $(eval
$(call BuildPlugin
,duplicheck
,advanced duplicate checking
,))
446 $(eval
$(call BuildPlugin
,eap-identity
,EAP identity helper
,))
447 $(eval
$(call BuildPlugin
,eap-md5
,EAP MD5
(CHAP
) EAP auth
,))
448 $(eval
$(call BuildPlugin
,eap-mschapv2
,EAP MS-CHAPv2 EAP auth
,+strongswan-mod-md4
+strongswan-mod-des
))
449 $(eval
$(call BuildPlugin
,eap-radius
,EAP RADIUS auth
,))
450 $(eval
$(call BuildPlugin
,farp
,fake arp respsonses
,))
451 $(eval
$(call BuildPlugin
,fips-prf
,FIPS PRF crypto
,+strongswan-mod-sha1
))
452 $(eval
$(call BuildPlugin
,gcm
,GCM AEAD wrapper crypto
,))
453 $(eval
$(call BuildPlugin
,gcrypt
,libgcrypt
,+PACKAGE_strongswan-mod-gcrypt
:libgcrypt
))
454 $(eval
$(call BuildPlugin
,gmp
,libgmp
,+PACKAGE_strongswan-mod-gmp
:libgmp
))
455 $(eval
$(call BuildPlugin
,ha
,high availability cluster
,))
456 $(eval
$(call BuildPlugin
,hmac
,HMAC crypto
,))
457 $(eval
$(call BuildPlugin
,kernel-libipsec
,libipsec kernel interface
,))
458 $(eval
$(call BuildPlugin
,kernel-netlink
,netlink kernel interface
,))
459 $(eval
$(call BuildPlugin
,ldap
,LDAP
,+PACKAGE_strongswan-mod-ldap
:libopenldap
))
460 $(eval
$(call BuildPlugin
,led
,LED blink on IKE activity
,))
461 $(eval
$(call BuildPlugin
,load-tester
,load testing
,))
462 $(eval
$(call BuildPlugin
,nonce
,nonce genereation
,))
463 $(eval
$(call BuildPlugin
,md4
,MD4 crypto
,))
464 $(eval
$(call BuildPlugin
,md5
,MD5 crypto
,))
465 $(eval
$(call BuildPlugin
,mysql
,MySQL database interface
,+PACKAGE_strongswan-mod-mysql
:libmysqlclient-r
))
466 $(eval
$(call BuildPlugin
,openssl
,OpenSSL crypto
,+PACKAGE_strongswan-mod-openssl
:libopenssl
))
467 $(eval
$(call BuildPlugin
,pem
,PEM decoding
,))
468 $(eval
$(call BuildPlugin
,pgp
,PGP key decoding
,))
469 $(eval
$(call BuildPlugin
,pkcs1
,PKCS1 key decoding
,))
470 $(eval
$(call BuildPlugin
,pkcs8
,PKCS8 key decoding
,))
471 $(eval
$(call BuildPlugin
,pkcs11
,PKCS11 key decoding
,))
472 $(eval
$(call BuildPlugin
,pubkey
,raw public key
,))
473 $(eval
$(call BuildPlugin
,random
,RNG
,))
474 $(eval
$(call BuildPlugin
,resolve
,DNS resolver
,))
475 $(eval
$(call BuildPlugin
,revocation
,X509 CRL
/OCSP revocation
,))
476 $(eval
$(call BuildPlugin
,sha1
,SHA1 crypto
,))
477 $(eval
$(call BuildPlugin
,sha2
,SHA2 crypto
,))
478 $(eval
$(call BuildPlugin
,smp
,SMP configuration and control interface
,+PACKAGE_strongswan-mod-smp
:libxml2
))
479 $(eval
$(call BuildPlugin
,socket-default
,default socket implementation for charon
,))
480 $(eval
$(call BuildPlugin
,socket-dynamic
,dynamic socket implementation for charon
,))
481 $(eval
$(call BuildPlugin
,sqlite
,SQLite database interface
,+PACKAGE_strongswan-mod-sqlite
:libsqlite3
))
482 $(eval
$(call BuildPlugin
,stroke
,Stroke
,+strongswan-utils
))
483 $(eval
$(call BuildPlugin
,test-vectors
,crypto
test vectors
,))
484 $(eval
$(call BuildPlugin
,uci
,UCI config interface
,+PACKAGE_strongswan-mod-uci
:libuci
))
485 $(eval
$(call BuildPlugin
,unity
,Cisco Unity extension
,))
486 $(eval
$(call BuildPlugin
,updown
,updown firewall
,))
487 $(eval
$(call BuildPlugin
,whitelist
,peer identity whitelisting
,))
488 $(eval
$(call BuildPlugin
,x509
,x509 certificate
,))
489 $(eval
$(call BuildPlugin
,xauth-eap
,EAP XAuth backend
,))
490 $(eval
$(call BuildPlugin
,xauth-generic
,generic XAuth backend
,))
491 $(eval
$(call BuildPlugin
,xcbc
,xcbc crypto
,))