2 # Copyright (C) 2010 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
/
16 PKG_MD5SUM
:=e071f46b6c463ce76900758734e6143e
25 include $(INCLUDE_DIR
)/package.mk
28 define Package
/strongswan4
/Default
32 URL
:=http
://www.strongswan.org
/
35 define Package
/strongswan4
/description
/Default
36 StrongSwan is an OpenSource IPsec implementation for the Linux
41 define Package
/strongswan4
42 $(call Package
/strongswan4
/Default
)
43 DEPENDS
:= +libpthread
+ip \
44 +kmod-ipsec
+kmod-ipsec4 \
45 +kmod-ipt-ipsec
+iptables-mod-ipsec
49 define Package
/strongswan4
/config
50 source
"$(SOURCE)/Config.in"
53 define Package
/strongswan4
/description
54 $(call Package
/strongswan4
/description
/Default
)
56 This package contains shared libraries and scripts.
60 define Package
/strongswan4-full
61 $(call Package
/strongswan4
/Default
)
63 DEPENDS
:= strongswan4 \
64 +strongswan4-app-charon \
65 +strongswan4-app-pluto \
66 +strongswan4-mod-aes \
67 +strongswan4-mod-agent \
68 +strongswan4-mod-attr \
69 +strongswan4-mod-attr-sql \
70 +strongswan4-mod-blowfish \
71 +strongswan4-mod-curl \
72 +strongswan4-mod-des \
73 +strongswan4-mod-dnskey \
74 +strongswan4-mod-eap-md5 \
75 +strongswan4-mod-eap-mschapv2 \
76 +strongswan4-mod-eap-radius \
77 +strongswan4-mod-fips-prf \
78 +strongswan4-mod-gcrypt \
79 +strongswan4-mod-gmp \
80 +strongswan4-mod-hmac \
81 +strongswan4-mod-kernel-klips \
82 +strongswan4-mod-kernel-netlink \
83 +strongswan4-mod-kernel-pfkey \
84 +strongswan4-mod-ldap \
85 +strongswan4-mod-load-tester \
86 +strongswan4-mod-md5 \
87 +strongswan4-mod-medcli \
88 +strongswan4-mod-medsrv \
89 +strongswan4-mod-mysql \
90 +strongswan4-mod-padlock \
91 +strongswan4-mod-pem \
92 +strongswan4-mod-pgp \
93 +strongswan4-mod-pkcs1 \
94 +strongswan4-mod-pubkey \
95 +strongswan4-mod-random \
96 +strongswan4-mod-resolve \
97 +strongswan4-mod-sha1 \
98 +strongswan4-mod-sha2 \
99 +strongswan4-mod-smp \
100 +strongswan4-mod-sql \
101 +strongswan4-mod-sqlite \
102 +strongswan4-mod-stroke \
103 +strongswan4-mod-uci \
104 +strongswan4-mod-updown \
105 +strongswan4-mod-x509 \
106 +strongswan4-mod-xcbc \
110 define Package
/strongswan4-full
/description
111 $(call Package
/strongswan4
/description
/Default
)
113 This meta-package contains only dependencies for a complete setup.
117 define Package
/strongswan4-minimal
118 $(call Package
/strongswan4
/Default
)
120 DEPENDS
:= strongswan4 \
121 +strongswan4-app-charon \
122 +strongswan4-mod-aes \
123 +strongswan4-mod-gmp \
124 +strongswan4-mod-hmac \
125 +strongswan4-mod-pubkey \
126 +strongswan4-mod-random \
127 +strongswan4-mod-sha1 \
128 +strongswan4-mod-stroke \
129 +strongswan4-mod-updown \
130 +strongswan4-mod-x509 \
131 +strongswan4-mod-xcbc
134 define Package
/strongswan4-minimal
/description
135 $(call Package
/strongswan4
/description
/Default
)
137 This meta-package contains only dependencies for a minimal setup.
141 define Package
/strongswan4-app-charon
142 $(call Package
/strongswan4
/Default
)
143 TITLE
+= IKEv2 keying daemon
144 DEPENDS
:= strongswan4
147 define Package
/strongswan4-app-charon
/description
148 $(call Package
/strongswan4
/description
/Default
)
150 This package contains charon
, an IKEv2 keying daemon.
154 define Package
/strongswan4-app-pluto
155 $(call Package
/strongswan4
/Default
)
156 TITLE
+= IKEv1 keying daemon
157 DEPENDS
:= strongswan4
160 define Package
/strongswan4-app-pluto
/description
161 $(call Package
/strongswan4
/description
/Default
)
163 This package contains pluto
, an IKEv1 keying daemon.
167 define Package
/strongswan4-utils
168 $(call Package
/strongswan4
/Default
)
170 DEPENDS
:= strongswan4
173 define Package
/strongswan4-utils
/description
174 $(call Package
/strongswan4
/description
/Default
)
176 This package contains the openac
, pki
& scepclient utilities.
184 define Package
/strongswan4-mod-
$(1)
185 $$(call Package
/strongswan4
/Default
)
186 TITLE
:= StronSwan
$(2) plugin
187 DEPENDS
:= strongswan4
$(3)
190 define Package
/strongswan4-mod-
$(1)/install
191 $(INSTALL_DIR
) $$(1)/usr
/lib
/ipsec
/plugins
193 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-
$(1).so \
194 $$(1)/usr
/lib
/ipsec
/plugins
/ ;
195 $(call Plugin
/$(1)/install,$$(1))
198 $$(eval
$$(call BuildPackage
,strongswan4-mod-
$(1)))
203 define ConfigurePlugin
204 $(if
$(CONFIG_PACKAGE_strongswan4-mod-
$(1)),--enable-
$(1),--disable-
$(1))
209 $(if
$(CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS
),--enable-cisco-quirks
,--disable-cisco-quirks
) \
210 $(if
$(CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT
),--enable-nat-transport
,--disable-nat-transport
) \
213 $(if
$(CONFIG_PACKAGE_strongswan4-utils
),--enable-tools
,--disable-tools
) \
214 --with-random-device
="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_RANDOM))" \
215 --with-urandom-device
="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_RANDOM))" \
216 --with-routing-table
="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE))" \
217 --with-routing-table-prio
="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO))" \
218 $(call ConfigurePlugin
,aes
) \
219 $(call ConfigurePlugin
,agent
) \
220 $(call ConfigurePlugin
,attr
) \
221 $(call ConfigurePlugin
,attr-sql
) \
222 $(call ConfigurePlugin
,blowfish
) \
223 $(call ConfigurePlugin
,curl
) \
224 $(call ConfigurePlugin
,des
) \
225 $(call ConfigurePlugin
,dnskey
) \
226 $(call ConfigurePlugin
,eap-md5
) \
227 $(call ConfigurePlugin
,eap-mschapv2
) \
228 $(call ConfigurePlugin
,eap-radius
) \
229 $(call ConfigurePlugin
,fips-prf
) \
230 $(call ConfigurePlugin
,gcrypt
) \
231 $(call ConfigurePlugin
,gmp
) \
232 $(call ConfigurePlugin
,hmac
) \
233 $(call ConfigurePlugin
,kernel-klips
) \
234 $(call ConfigurePlugin
,kernel-netlink
) \
235 $(call ConfigurePlugin
,kernel-pfkey
) \
236 $(call ConfigurePlugin
,ldap
) \
237 $(call ConfigurePlugin
,load-tester
) \
238 $(call ConfigurePlugin
,md5
) \
239 $(call ConfigurePlugin
,medcli
) \
240 $(call ConfigurePlugin
,medsrv
) \
241 $(call ConfigurePlugin
,mysql
) \
242 $(call ConfigurePlugin
,padlock
) \
243 $(call ConfigurePlugin
,pem
) \
244 $(call ConfigurePlugin
,pgp
) \
245 $(call ConfigurePlugin
,pkcs1
) \
246 $(call ConfigurePlugin
,pubkey
) \
247 $(call ConfigurePlugin
,random
) \
248 $(call ConfigurePlugin
,resolve
) \
249 $(call ConfigurePlugin
,sha1
) \
250 $(call ConfigurePlugin
,sha2
) \
251 $(call ConfigurePlugin
,smp
) \
252 $(call ConfigurePlugin
,sql
) \
253 $(call ConfigurePlugin
,sqlite
) \
254 $(call ConfigurePlugin
,stroke
) \
255 $(call ConfigurePlugin
,uci
) \
256 $(call ConfigurePlugin
,updown
) \
257 $(call ConfigurePlugin
,x509
) \
258 $(call ConfigurePlugin
,xcbc
) \
259 #$(call ConfigurePlugin,openssl,OpenSSL,openssl,,+libopenssl))
261 EXTRA_CPPFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/ClearSilver
263 EXTRA_LDFLAGS
+= -Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
266 define Package
/strongswan4
/conffiles
272 define Package
/strongswan4
/install
273 $(INSTALL_DIR
) $(1)/etc
274 $(CP
) -R
$(PKG_INSTALL_DIR
)/etc
/ipsec.d
$(1)/etc
/
275 $(INSTALL_DIR
) $(1)/usr
/lib
276 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libstrongswan.so.
* $(1)/usr
/lib
/
277 $(INSTALL_DIR
) $(1)/usr
/sbin
278 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipsec
$(1)/usr
/sbin
/
279 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
281 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_copyright \
282 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/starter \
283 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/whack \
287 .
/files
/ipsec.secrets \
288 .
/files
/strongswan.conf \
293 define Package
/strongswan4-full
/install
298 define Package
/strongswan4-minimal
/install
303 define Package
/strongswan4-app-charon
/install
304 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
306 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/charon \
307 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/stroke \
312 define Package
/strongswan4-app-pluto
/install
313 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
315 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pluto \
316 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_pluto_adns \
321 define Package
/strongswan4-utils
/install
322 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
324 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/openac \
325 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pki \
326 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/scepclient \
331 define Plugin
/attr-sql
/install
332 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
334 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pool \
338 define Plugin
/updown
/install
339 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
341 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown \
342 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown_espmark \
347 $(eval
$(call BuildPackage
,strongswan4
))
348 $(eval
$(call BuildPackage
,strongswan4-full
))
349 $(eval
$(call BuildPackage
,strongswan4-minimal
))
350 $(eval
$(call BuildPackage
,strongswan4-app-charon
))
351 $(eval
$(call BuildPackage
,strongswan4-app-pluto
))
352 $(eval
$(call BuildPackage
,strongswan4-utils
))
354 $(eval
$(call BuildPlugin
,aes
,AES crypto
,))
355 $(eval
$(call BuildPlugin
,agent
,SSH agent signing
,))
356 $(eval
$(call BuildPlugin
,attr
,File-based config attr
,))
357 $(eval
$(call BuildPlugin
,attr-sql
,SQL-based config attrib
,+strongswan4-mod-sql
))
358 $(eval
$(call BuildPlugin
,blowfish
,Blowfish crypto
,))
359 $(eval
$(call BuildPlugin
,curl
,cURL
,+libcurl
))
360 $(eval
$(call BuildPlugin
,des
,DES crypto
,))
361 $(eval
$(call BuildPlugin
,dnskey
,DNS RR key decoding
,))
362 $(eval
$(call BuildPlugin
,eap-md5
,MD5 EAP
(CHAP
) auth
,))
363 $(eval
$(call BuildPlugin
,eap-mschapv2
,MS-CHAPv2 EAP auth
,))
364 $(eval
$(call BuildPlugin
,eap-radius
,RADIUS proxy auth
,))
365 $(eval
$(call BuildPlugin
,fips-prf
,FIPS PRF crypto
,))
366 $(eval
$(call BuildPlugin
,gcrypt
,libgcrypt
,+libgcrypt
))
367 $(eval
$(call BuildPlugin
,gmp
,libgmp
,+libgmp
))
368 $(eval
$(call BuildPlugin
,hmac
,HMAC crypto
,))
369 $(eval
$(call BuildPlugin
,kernel-klips
,KLIPS kernel interface
,))
370 $(eval
$(call BuildPlugin
,kernel-netlink
,netlink kernel interface
,))
371 $(eval
$(call BuildPlugin
,kernel-pfkey
,PK_KEY kernel interface
,))
372 $(eval
$(call BuildPlugin
,ldap
,LDAP
,+libopenldap
))
373 $(eval
$(call BuildPlugin
,load-tester
,load testing
,))
374 $(eval
$(call BuildPlugin
,md5
,MD5 crypto
,))
375 $(eval
$(call BuildPlugin
,medcli
,mediation client configuration database
,))
376 $(eval
$(call BuildPlugin
,medsrv
,mediation server configuration database
,))
377 $(eval
$(call BuildPlugin
,mysql
,MySQL database interface
,+strongswan4-mod-sql
+libmysqlclient
))
378 $(eval
$(call BuildPlugin
,padlock
,VIA PadLock crypto
,))
379 $(eval
$(call BuildPlugin
,pem
,PEM decoding
,))
380 $(eval
$(call BuildPlugin
,pgp
,PGP key decoding
,))
381 $(eval
$(call BuildPlugin
,pkcs1
,PKCS1 key decoding
,))
382 $(eval
$(call BuildPlugin
,pubkey
,raw public key
,))
383 $(eval
$(call BuildPlugin
,random
,RNG
,))
384 $(eval
$(call BuildPlugin
,resolve
,DNS resolver
,))
385 $(eval
$(call BuildPlugin
,sha1
,SHA1 crypto
,))
386 $(eval
$(call BuildPlugin
,sha2
,SHA2 crypto
,))
387 $(eval
$(call BuildPlugin
,smp
,SMP configuration and control interface
,+libxml2
))
388 $(eval
$(call BuildPlugin
,sql
,SQL database interface
,))
389 $(eval
$(call BuildPlugin
,sqlite
,SQLite database interface
,+strongswan4-mod-sql
+libsqlite3
))
390 $(eval
$(call BuildPlugin
,stroke
,Stroke
,))
391 $(eval
$(call BuildPlugin
,uci
,UCI config interface
,+libuci
))
392 $(eval
$(call BuildPlugin
,updown
,updown firewall
,))
393 $(eval
$(call BuildPlugin
,x509
,x509 certificate
,))
394 $(eval
$(call BuildPlugin
,xcbc
,xcbc crypto
,))
395 #$(eval $(call BuildPlugin,openssl,OpenSSL,+libopenssl))