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
:=02adcea934ef536e704d03c5d0f934f8
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
)) \
79 include $(INCLUDE_DIR
)/package.mk
82 define Package
/strongswan4
/Default
87 URL
:=http
://www.strongswan.org
/
90 define Package
/strongswan4
/description
/Default
91 StrongSwan is an OpenSource IPsec implementation for the Linux
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
105 define Package
/strongswan4
/config
106 source
"$(SOURCE)/Config.in"
109 define Package
/strongswan4
/description
110 $(call Package
/strongswan4
/description
/Default
)
112 This package contains shared libraries and scripts.
116 define Package
/strongswan4-full
117 $(call Package
/strongswan4
/Default
)
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 \
166 define Package
/strongswan4-full
/description
167 $(call Package
/strongswan4
/description
/Default
)
169 This meta-package contains only dependencies for a complete setup.
173 define Package
/strongswan4-default
174 $(call Package
/strongswan4
/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 \
202 define Package
/strongswan4-default
/description
203 $(call Package
/strongswan4
/description
/Default
)
205 This meta-package contains only dependencies to match upstream
210 define Package
/strongswan4-minimal
211 $(call Package
/strongswan4
/Default
)
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
227 define Package
/strongswan4-minimal
/description
228 $(call Package
/strongswan4
/description
/Default
)
230 This meta-package contains only dependencies for a minimal setup.
234 define Package
/strongswan4-app-charon
235 $(call Package
/strongswan4
/Default
)
236 TITLE
+= IKEv2 keying daemon
237 DEPENDS
:= strongswan4
240 define Package
/strongswan4-app-charon
/description
241 $(call Package
/strongswan4
/description
/Default
)
243 This package contains charon
, an IKEv2 keying daemon.
247 define Package
/strongswan4-app-pluto
248 $(call Package
/strongswan4
/Default
)
249 TITLE
+= IKEv1 keying daemon
250 DEPENDS
:= strongswan4
253 define Package
/strongswan4-app-pluto
/description
254 $(call Package
/strongswan4
/description
/Default
)
256 This package contains pluto
, an IKEv1 keying daemon.
260 define Package
/strongswan4-utils
261 $(call Package
/strongswan4
/Default
)
263 DEPENDS
:= strongswan4
266 define Package
/strongswan4-utils
/description
267 $(call Package
/strongswan4
/description
/Default
)
269 This package contains the openac
, pki
& scepclient utilities.
277 define Package
/strongswan4-mod-
$(1)
278 $$(call Package
/strongswan4
/Default
)
279 TITLE
:= StrongSwan
$(2) plugin
280 DEPENDS
:= strongswan4
$(3)
283 define Package
/strongswan4-mod-
$(1)/install
284 $(INSTALL_DIR
) $$(1)/usr
/lib
/ipsec
/plugins
286 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-
$(1).so \
287 $$(1)/usr
/lib
/ipsec
/plugins
/ ;
288 $(call Plugin
/$(1)/install,$$(1))
291 $$(eval
$$(call BuildPackage
,strongswan4-mod-
$(1)))
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
) \
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
)) \
311 EXTRA_CPPFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/ClearSilver
313 EXTRA_LDFLAGS
+= -Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
316 define Package
/strongswan4
/conffiles
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
331 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_copyright \
332 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/starter \
333 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/whack \
337 .
/files
/ipsec.secrets \
338 .
/files
/strongswan.conf \
343 define Package
/strongswan4-default
/install
348 define Package
/strongswan4-full
/install
353 define Package
/strongswan4-minimal
/install
358 define Package
/strongswan4-app-charon
/install
359 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
361 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/charon \
362 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/stroke \
367 define Package
/strongswan4-app-pluto
/install
368 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
370 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pluto \
371 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_pluto_adns \
376 define Package
/strongswan4-utils
/install
377 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
379 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/openac \
380 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pki \
381 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/scepclient \
386 define Plugin
/attr-sql
/install
387 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
389 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pool \
393 define Plugin
/updown
/install
394 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
396 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown \
397 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown_espmark \
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
))
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
,))