[package] update to strongswan4 4.3.7 (#7884)
[openwrt/svn-archive/archive.git] / net / strongswan4 / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=strongswan
11 PKG_VERSION:=4.3.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://download.strongswan.org/
16 PKG_MD5SUM:=02adcea934ef536e704d03c5d0f934f8
17
18 PKG_MOD_AVAILABLE:= \
19 aes \
20 agent \
21 attr \
22 attr-sql \
23 blowfish \
24 curl \
25 des \
26 dnskey \
27 eap-md5 \
28 eap-mschapv2 \
29 eap-radius \
30 fips-prf \
31 gcrypt \
32 gmp \
33 hmac \
34 kernel-klips \
35 kernel-netlink \
36 kernel-pfkey \
37 ldap \
38 load-tester \
39 md5 \
40 medcli \
41 medsrv \
42 mysql \
43 padlock \
44 pem \
45 pgp \
46 pkcs1 \
47 pubkey \
48 random \
49 resolve \
50 sha1 \
51 sha2 \
52 smp \
53 sql \
54 sqlite \
55 stroke \
56 uci \
57 updown \
58 x509 \
59 xcbc \
60
61 PKG_BUILD_DEPENDS:= \
62 clearsilver \
63 fcgi \
64
65 PKG_CONFIG_DEPENDS:= \
66 CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS \
67 CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT \
68 CONFIG_STRONGSWAN4_ENABLE_VENDOR_ID \
69 CONFIG_STRONGSWAN4_ENABLE_XAUTH_VID \
70 CONFIG_STRONGSWAN4_DEVICE_RANDOM \
71 CONFIG_STRONGSWAN4_DEVICE_URANDOM \
72 CONFIG_STRONGSWAN4_ROUTING_TABLE \
73 CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO \
74 $(patsubst %,CONFIG_PACKAGE_strongswan4-mod-%,$(PKG_MOD_AVAILABLE)) \
75
76 PKG_FIXUP:=libtool
77 PKG_INSTALL:=1
78
79 include $(INCLUDE_DIR)/package.mk
80
81
82 define Package/strongswan4/Default
83 SUBMENU:=VPN
84 SECTION:=net
85 CATEGORY:=Network
86 TITLE:=StrongSwan
87 URL:=http://www.strongswan.org/
88 endef
89
90 define Package/strongswan4/description/Default
91 StrongSwan is an OpenSource IPsec implementation for the Linux
92 operating system.
93 endef
94
95
96 define Package/strongswan4
97 $(call Package/strongswan4/Default)
98 DEPENDS:= +libpthread +ip \
99 +kmod-crypto-authenc \
100 +kmod-ipsec +kmod-ipsec4 \
101 +kmod-ipt-ipsec +iptables-mod-ipsec
102 MENU:=1
103 endef
104
105 define Package/strongswan4/config
106 source "$(SOURCE)/Config.in"
107 endef
108
109 define Package/strongswan4/description
110 $(call Package/strongswan4/description/Default)
111 .
112 This package contains shared libraries and scripts.
113 endef
114
115
116 define Package/strongswan4-full
117 $(call Package/strongswan4/Default)
118 TITLE+= (full)
119 DEPENDS:= strongswan4 \
120 +strongswan4-app-charon \
121 +strongswan4-app-pluto \
122 +strongswan4-mod-aes \
123 +strongswan4-mod-agent \
124 +strongswan4-mod-attr \
125 +strongswan4-mod-attr-sql \
126 +strongswan4-mod-blowfish \
127 +strongswan4-mod-curl \
128 +strongswan4-mod-des \
129 +strongswan4-mod-dnskey \
130 +strongswan4-mod-eap-md5 \
131 +strongswan4-mod-eap-mschapv2 \
132 +strongswan4-mod-eap-radius \
133 +strongswan4-mod-fips-prf \
134 +strongswan4-mod-gcrypt \
135 +strongswan4-mod-gmp \
136 +strongswan4-mod-hmac \
137 +strongswan4-mod-kernel-klips \
138 +strongswan4-mod-kernel-netlink \
139 +strongswan4-mod-kernel-pfkey \
140 +strongswan4-mod-ldap \
141 +strongswan4-mod-load-tester \
142 +strongswan4-mod-md5 \
143 +strongswan4-mod-medcli \
144 +strongswan4-mod-medsrv \
145 +strongswan4-mod-mysql \
146 +TARGET_x86:strongswan4-mod-padlock \
147 +strongswan4-mod-pem \
148 +strongswan4-mod-pgp \
149 +strongswan4-mod-pkcs1 \
150 +strongswan4-mod-pubkey \
151 +strongswan4-mod-random \
152 +strongswan4-mod-resolve \
153 +strongswan4-mod-sha1 \
154 +strongswan4-mod-sha2 \
155 +strongswan4-mod-smp \
156 +strongswan4-mod-sql \
157 +strongswan4-mod-sqlite \
158 +strongswan4-mod-stroke \
159 +strongswan4-mod-uci \
160 +strongswan4-mod-updown \
161 +strongswan4-mod-x509 \
162 +strongswan4-mod-xcbc \
163 +strongswan4-utils
164 endef
165
166 define Package/strongswan4-full/description
167 $(call Package/strongswan4/description/Default)
168 .
169 This meta-package contains only dependencies for a complete setup.
170 endef
171
172
173 define Package/strongswan4-default
174 $(call Package/strongswan4/Default)
175 TITLE+= (default)
176 DEPENDS:= strongswan4 \
177 +strongswan4-app-charon \
178 +strongswan4-app-pluto \
179 +strongswan4-mod-aes \
180 +strongswan4-mod-attr \
181 +strongswan4-mod-des \
182 +strongswan4-mod-dnskey \
183 +strongswan4-mod-fips-prf \
184 +strongswan4-mod-gmp \
185 +strongswan4-mod-hmac \
186 +strongswan4-mod-md5 \
187 +strongswan4-mod-pem \
188 +strongswan4-mod-pgp \
189 +strongswan4-mod-pkcs1 \
190 +strongswan4-mod-pubkey \
191 +strongswan4-mod-random \
192 +strongswan4-mod-resolve \
193 +strongswan4-mod-sha1 \
194 +strongswan4-mod-sha2 \
195 +strongswan4-mod-stroke \
196 +strongswan4-mod-updown \
197 +strongswan4-mod-x509 \
198 +strongswan4-mod-xcbc \
199 +strongswan4-utils
200 endef
201
202 define Package/strongswan4-default/description
203 $(call Package/strongswan4/description/Default)
204 .
205 This meta-package contains only dependencies to match upstream
206 defaults.
207 endef
208
209
210 define Package/strongswan4-minimal
211 $(call Package/strongswan4/Default)
212 TITLE+= (minimal)
213 DEPENDS:= strongswan4 \
214 +strongswan4-app-charon \
215 +strongswan4-mod-aes \
216 +strongswan4-mod-gmp \
217 +strongswan4-mod-hmac \
218 +strongswan4-mod-pubkey \
219 +strongswan4-mod-random \
220 +strongswan4-mod-sha1 \
221 +strongswan4-mod-stroke \
222 +strongswan4-mod-updown \
223 +strongswan4-mod-x509 \
224 +strongswan4-mod-xcbc
225 endef
226
227 define Package/strongswan4-minimal/description
228 $(call Package/strongswan4/description/Default)
229 .
230 This meta-package contains only dependencies for a minimal setup.
231 endef
232
233
234 define Package/strongswan4-app-charon
235 $(call Package/strongswan4/Default)
236 TITLE+= IKEv2 keying daemon
237 DEPENDS:= strongswan4
238 endef
239
240 define Package/strongswan4-app-charon/description
241 $(call Package/strongswan4/description/Default)
242 .
243 This package contains charon, an IKEv2 keying daemon.
244 endef
245
246
247 define Package/strongswan4-app-pluto
248 $(call Package/strongswan4/Default)
249 TITLE+= IKEv1 keying daemon
250 DEPENDS:= strongswan4
251 endef
252
253 define Package/strongswan4-app-pluto/description
254 $(call Package/strongswan4/description/Default)
255 .
256 This package contains pluto, an IKEv1 keying daemon.
257 endef
258
259
260 define Package/strongswan4-utils
261 $(call Package/strongswan4/Default)
262 TITLE+= utilities
263 DEPENDS:= strongswan4
264 endef
265
266 define Package/strongswan4-utils/description
267 $(call Package/strongswan4/description/Default)
268 .
269 This package contains the openac, pki & scepclient utilities.
270 endef
271
272
273 # 1. Name
274 # 2. Title
275 # 3. Depends
276 define BuildPlugin
277 define Package/strongswan4-mod-$(1)
278 $$(call Package/strongswan4/Default)
279 TITLE:= StrongSwan $(2) plugin
280 DEPENDS:= strongswan4 $(3)
281 endef
282
283 define Package/strongswan4-mod-$(1)/install
284 $(INSTALL_DIR) $$(1)/usr/lib/ipsec/plugins
285 $(CP) \
286 $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-$(1).so \
287 $$(1)/usr/lib/ipsec/plugins/ ;
288 $(call Plugin/$(1)/install,$$(1))
289 endef
290
291 $$(eval $$(call BuildPackage,strongswan4-mod-$(1)))
292 endef
293
294
295 CONFIGURE_ARGS+= \
296 $(if $(CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS),--enable-cisco-quirks,--disable-cisco-quirks) \
297 $(if $(CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT),--enable-nat-transport,--disable-nat-transport) \
298 $(if $(CONFIG_STRONGSWAN4_ENABLE_VENDOR_ID),--enable-vendor-id,--disable-vendor-id) \
299 $(if $(CONFIG_STRONGSWAN4_ENABLE_XAUTH_VID),--enable-xauth-vid,--disable-xauth-vid) \
300 --disable-scripts \
301 --disable-static \
302 $(if $(CONFIG_PACKAGE_strongswan4-utils),--enable-tools,--disable-tools) \
303 --with-random-device="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_RANDOM))" \
304 --with-urandom-device="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_URANDOM))" \
305 --with-routing-table="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE))" \
306 --with-routing-table-prio="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO))" \
307 $(foreach m,$(PKG_MOD_AVAILABLE), \
308 $(if $(CONFIG_PACKAGE_strongswan4-mod-$(m)),--enable-$(m),--disable-$(m)) \
309 ) \
310
311 EXTRA_CPPFLAGS+= -I$(STAGING_DIR)/usr/include/ClearSilver
312
313 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
314
315
316 define Package/strongswan4/conffiles
317 /etc/ipsec.conf
318 /etc/ipsec.secrets
319 /etc/strongswan.conf
320 endef
321
322 define Package/strongswan4/install
323 $(INSTALL_DIR) $(1)/etc
324 $(CP) -R $(PKG_INSTALL_DIR)/etc/ipsec.d $(1)/etc/
325 $(INSTALL_DIR) $(1)/usr/lib
326 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrongswan.so.* $(1)/usr/lib/
327 $(INSTALL_DIR) $(1)/usr/sbin
328 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/
329 $(INSTALL_DIR) $(1)/usr/lib/ipsec
330 $(CP) \
331 $(PKG_INSTALL_DIR)/usr/lib/ipsec/_copyright \
332 $(PKG_INSTALL_DIR)/usr/lib/ipsec/starter \
333 $(PKG_INSTALL_DIR)/usr/lib/ipsec/whack \
334 $(1)/usr/lib/ipsec/
335 $(INSTALL_CONF) \
336 ./files/ipsec.conf \
337 ./files/ipsec.secrets \
338 ./files/strongswan.conf \
339 $(1)/etc/
340 endef
341
342
343 define Package/strongswan4-default/install
344 true
345 endef
346
347
348 define Package/strongswan4-full/install
349 true
350 endef
351
352
353 define Package/strongswan4-minimal/install
354 true
355 endef
356
357
358 define Package/strongswan4-app-charon/install
359 $(INSTALL_DIR) $(1)/usr/lib/ipsec
360 $(CP) \
361 $(PKG_INSTALL_DIR)/usr/lib/ipsec/charon \
362 $(PKG_INSTALL_DIR)/usr/lib/ipsec/stroke \
363 $(1)/usr/lib/ipsec/
364 endef
365
366
367 define Package/strongswan4-app-pluto/install
368 $(INSTALL_DIR) $(1)/usr/lib/ipsec
369 $(CP) \
370 $(PKG_INSTALL_DIR)/usr/lib/ipsec/pluto \
371 $(PKG_INSTALL_DIR)/usr/lib/ipsec/_pluto_adns \
372 $(1)/usr/lib/ipsec/
373 endef
374
375
376 define Package/strongswan4-utils/install
377 $(INSTALL_DIR) $(1)/usr/lib/ipsec
378 $(CP) \
379 $(PKG_INSTALL_DIR)/usr/lib/ipsec/openac \
380 $(PKG_INSTALL_DIR)/usr/lib/ipsec/pki \
381 $(PKG_INSTALL_DIR)/usr/lib/ipsec/scepclient \
382 $(1)/usr/lib/ipsec/
383 endef
384
385
386 define Plugin/attr-sql/install
387 $(INSTALL_DIR) $(1)/usr/lib/ipsec
388 $(CP) \
389 $(PKG_INSTALL_DIR)/usr/lib/ipsec/pool \
390 $(1)/usr/lib/ipsec/
391 endef
392
393 define Plugin/updown/install
394 $(INSTALL_DIR) $(1)/usr/lib/ipsec
395 $(CP) \
396 $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown \
397 $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown_espmark \
398 $(1)/usr/lib/ipsec/
399 endef
400
401
402 $(eval $(call BuildPackage,strongswan4))
403 $(eval $(call BuildPackage,strongswan4-default))
404 $(eval $(call BuildPackage,strongswan4-full))
405 $(eval $(call BuildPackage,strongswan4-minimal))
406 $(eval $(call BuildPackage,strongswan4-app-charon))
407 $(eval $(call BuildPackage,strongswan4-app-pluto))
408 $(eval $(call BuildPackage,strongswan4-utils))
409
410 $(eval $(call BuildPlugin,aes,AES crypto,))
411 $(eval $(call BuildPlugin,agent,SSH agent signing,))
412 $(eval $(call BuildPlugin,attr,File-based config attr,))
413 $(eval $(call BuildPlugin,attr-sql,SQL-based config attrib,+strongswan4-mod-sql))
414 $(eval $(call BuildPlugin,blowfish,Blowfish crypto,))
415 $(eval $(call BuildPlugin,curl,cURL,+libcurl))
416 $(eval $(call BuildPlugin,des,DES crypto,))
417 $(eval $(call BuildPlugin,dnskey,DNS RR key decoding,))
418 $(eval $(call BuildPlugin,eap-md5,MD5 EAP (CHAP) auth,))
419 $(eval $(call BuildPlugin,eap-mschapv2,MS-CHAPv2 EAP auth,))
420 $(eval $(call BuildPlugin,eap-radius,RADIUS proxy auth,))
421 $(eval $(call BuildPlugin,fips-prf,FIPS PRF crypto,))
422 $(eval $(call BuildPlugin,gcrypt,libgcrypt,+libgcrypt))
423 $(eval $(call BuildPlugin,gmp,libgmp,+libgmp))
424 $(eval $(call BuildPlugin,hmac,HMAC crypto,))
425 $(eval $(call BuildPlugin,kernel-klips,KLIPS kernel interface,))
426 $(eval $(call BuildPlugin,kernel-netlink,netlink kernel interface,))
427 $(eval $(call BuildPlugin,kernel-pfkey,PK_KEY kernel interface,))
428 $(eval $(call BuildPlugin,ldap,LDAP,+libopenldap))
429 $(eval $(call BuildPlugin,load-tester,load testing,))
430 $(eval $(call BuildPlugin,md5,MD5 crypto,))
431 $(eval $(call BuildPlugin,medcli,mediation client configuration database,))
432 $(eval $(call BuildPlugin,medsrv,mediation server configuration database,))
433 $(eval $(call BuildPlugin,mysql,MySQL database interface,+strongswan4-mod-sql +PACKAGE_strongswan4-mod-mysql:libmysqlclient))
434 $(eval $(call BuildPlugin,padlock,VIA PadLock crypto,@TARGET_x86))
435 $(eval $(call BuildPlugin,pem,PEM decoding,))
436 $(eval $(call BuildPlugin,pgp,PGP key decoding,))
437 $(eval $(call BuildPlugin,pkcs1,PKCS1 key decoding,))
438 $(eval $(call BuildPlugin,pubkey,raw public key,))
439 $(eval $(call BuildPlugin,random,RNG,))
440 $(eval $(call BuildPlugin,resolve,DNS resolver,))
441 $(eval $(call BuildPlugin,sha1,SHA1 crypto,))
442 $(eval $(call BuildPlugin,sha2,SHA2 crypto,))
443 $(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan4-mod-smp:libxml2))
444 $(eval $(call BuildPlugin,sql,SQL database interface,))
445 $(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan4-mod-sql +PACKAGE_strongswan4-mod-sqlite:libsqlite3))
446 $(eval $(call BuildPlugin,stroke,Stroke,))
447 $(eval $(call BuildPlugin,uci,UCI config interface,+libuci))
448 $(eval $(call BuildPlugin,updown,updown firewall,))
449 $(eval $(call BuildPlugin,x509,x509 certificate,))
450 $(eval $(call BuildPlugin,xcbc,xcbc crypto,))