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
65 PKG_CONFIG_DEPENDS
:= \
66 CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS \
67 CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT \
68 CONFIG_STRONGSWAN4_DEVICE_RANDOM \
69 CONFIG_STRONGSWAN4_DEVICE_URANDOM \
70 CONFIG_STRONGSWAN4_ROUTING_TABLE \
71 CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO \
72 $(patsubst %,CONFIG_PACKAGE_strongswan4-mod-
%,$(PKG_MOD_AVAILABLE
)) \
77 include $(INCLUDE_DIR
)/package.mk
80 define Package
/strongswan4
/Default
84 URL
:=http
://www.strongswan.org
/
87 define Package
/strongswan4
/description
/Default
88 StrongSwan is an OpenSource IPsec implementation for the Linux
93 define Package
/strongswan4
94 $(call Package
/strongswan4
/Default
)
95 DEPENDS
:= +libpthread
+ip \
96 +kmod-ipsec
+kmod-ipsec4 \
97 +kmod-ipt-ipsec
+iptables-mod-ipsec
101 define Package
/strongswan4
/config
102 source
"$(SOURCE)/Config.in"
105 define Package
/strongswan4
/description
106 $(call Package
/strongswan4
/description
/Default
)
108 This package contains shared libraries and scripts.
112 define Package
/strongswan4-full
113 $(call Package
/strongswan4
/Default
)
115 DEPENDS
:= strongswan4 \
116 +strongswan4-app-charon \
117 +strongswan4-app-pluto \
118 +strongswan4-mod-aes \
119 +strongswan4-mod-agent \
120 +strongswan4-mod-attr \
121 +strongswan4-mod-attr-sql \
122 +strongswan4-mod-blowfish \
123 +strongswan4-mod-curl \
124 +strongswan4-mod-des \
125 +strongswan4-mod-dnskey \
126 +strongswan4-mod-eap-md5 \
127 +strongswan4-mod-eap-mschapv2 \
128 +strongswan4-mod-eap-radius \
129 +strongswan4-mod-fips-prf \
130 +strongswan4-mod-gcrypt \
131 +strongswan4-mod-gmp \
132 +strongswan4-mod-hmac \
133 +strongswan4-mod-kernel-klips \
134 +strongswan4-mod-kernel-netlink \
135 +strongswan4-mod-kernel-pfkey \
136 +strongswan4-mod-ldap \
137 +strongswan4-mod-load-tester \
138 +strongswan4-mod-md5 \
139 +strongswan4-mod-medcli \
140 +strongswan4-mod-medsrv \
141 +strongswan4-mod-mysql \
142 +strongswan4-mod-padlock \
143 +strongswan4-mod-pem \
144 +strongswan4-mod-pgp \
145 +strongswan4-mod-pkcs1 \
146 +strongswan4-mod-pubkey \
147 +strongswan4-mod-random \
148 +strongswan4-mod-resolve \
149 +strongswan4-mod-sha1 \
150 +strongswan4-mod-sha2 \
151 +strongswan4-mod-smp \
152 +strongswan4-mod-sql \
153 +strongswan4-mod-sqlite \
154 +strongswan4-mod-stroke \
155 +strongswan4-mod-uci \
156 +strongswan4-mod-updown \
157 +strongswan4-mod-x509 \
158 +strongswan4-mod-xcbc \
162 define Package
/strongswan4-full
/description
163 $(call Package
/strongswan4
/description
/Default
)
165 This meta-package contains only dependencies for a complete setup.
169 define Package
/strongswan4-minimal
170 $(call Package
/strongswan4
/Default
)
172 DEPENDS
:= strongswan4 \
173 +strongswan4-app-charon \
174 +strongswan4-mod-aes \
175 +strongswan4-mod-gmp \
176 +strongswan4-mod-hmac \
177 +strongswan4-mod-pubkey \
178 +strongswan4-mod-random \
179 +strongswan4-mod-sha1 \
180 +strongswan4-mod-stroke \
181 +strongswan4-mod-updown \
182 +strongswan4-mod-x509 \
183 +strongswan4-mod-xcbc
186 define Package
/strongswan4-minimal
/description
187 $(call Package
/strongswan4
/description
/Default
)
189 This meta-package contains only dependencies for a minimal setup.
193 define Package
/strongswan4-app-charon
194 $(call Package
/strongswan4
/Default
)
195 TITLE
+= IKEv2 keying daemon
196 DEPENDS
:= strongswan4
199 define Package
/strongswan4-app-charon
/description
200 $(call Package
/strongswan4
/description
/Default
)
202 This package contains charon
, an IKEv2 keying daemon.
206 define Package
/strongswan4-app-pluto
207 $(call Package
/strongswan4
/Default
)
208 TITLE
+= IKEv1 keying daemon
209 DEPENDS
:= strongswan4
212 define Package
/strongswan4-app-pluto
/description
213 $(call Package
/strongswan4
/description
/Default
)
215 This package contains pluto
, an IKEv1 keying daemon.
219 define Package
/strongswan4-utils
220 $(call Package
/strongswan4
/Default
)
222 DEPENDS
:= strongswan4
225 define Package
/strongswan4-utils
/description
226 $(call Package
/strongswan4
/description
/Default
)
228 This package contains the openac
, pki
& scepclient utilities.
236 define Package
/strongswan4-mod-
$(1)
237 $$(call Package
/strongswan4
/Default
)
238 TITLE
:= StronSwan
$(2) plugin
239 DEPENDS
:= strongswan4
$(3)
242 define Package
/strongswan4-mod-
$(1)/install
243 $(INSTALL_DIR
) $$(1)/usr
/lib
/ipsec
/plugins
245 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/plugins
/libstrongswan-
$(1).so \
246 $$(1)/usr
/lib
/ipsec
/plugins
/ ;
247 $(call Plugin
/$(1)/install,$$(1))
250 $$(eval
$$(call BuildPackage
,strongswan4-mod-
$(1)))
255 $(if
$(CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS
),--enable-cisco-quirks
,--disable-cisco-quirks
) \
256 $(if
$(CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT
),--enable-nat-transport
,--disable-nat-transport
) \
259 $(if
$(CONFIG_PACKAGE_strongswan4-utils
),--enable-tools
,--disable-tools
) \
260 --with-random-device
="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_RANDOM))" \
261 --with-urandom-device
="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_RANDOM))" \
262 --with-routing-table
="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE))" \
263 --with-routing-table-prio
="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO))" \
264 $(foreach m
,$(PKG_MOD_AVAILABLE
), \
265 $(if
$(CONFIG_PACKAGE_strongswan4-mod-
$(m
)),--enable-
$(m
),--disable-
$(m
)) \
268 EXTRA_CPPFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/ClearSilver
270 EXTRA_LDFLAGS
+= -Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
273 define Package
/strongswan4
/conffiles
279 define Package
/strongswan4
/install
280 $(INSTALL_DIR
) $(1)/etc
281 $(CP
) -R
$(PKG_INSTALL_DIR
)/etc
/ipsec.d
$(1)/etc
/
282 $(INSTALL_DIR
) $(1)/usr
/lib
283 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libstrongswan.so.
* $(1)/usr
/lib
/
284 $(INSTALL_DIR
) $(1)/usr
/sbin
285 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipsec
$(1)/usr
/sbin
/
286 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
288 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_copyright \
289 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/starter \
290 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/whack \
294 .
/files
/ipsec.secrets \
295 .
/files
/strongswan.conf \
300 define Package
/strongswan4-full
/install
305 define Package
/strongswan4-minimal
/install
310 define Package
/strongswan4-app-charon
/install
311 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
313 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/charon \
314 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/stroke \
319 define Package
/strongswan4-app-pluto
/install
320 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
322 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pluto \
323 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_pluto_adns \
328 define Package
/strongswan4-utils
/install
329 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
331 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/openac \
332 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pki \
333 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/scepclient \
338 define Plugin
/attr-sql
/install
339 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
341 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/pool \
345 define Plugin
/updown
/install
346 $(INSTALL_DIR
) $(1)/usr
/lib
/ipsec
348 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown \
349 $(PKG_INSTALL_DIR
)/usr
/lib
/ipsec
/_updown_espmark \
354 $(eval
$(call BuildPackage
,strongswan4
))
355 $(eval
$(call BuildPackage
,strongswan4-full
))
356 $(eval
$(call BuildPackage
,strongswan4-minimal
))
357 $(eval
$(call BuildPackage
,strongswan4-app-charon
))
358 $(eval
$(call BuildPackage
,strongswan4-app-pluto
))
359 $(eval
$(call BuildPackage
,strongswan4-utils
))
361 $(eval
$(call BuildPlugin
,aes
,AES crypto
,))
362 $(eval
$(call BuildPlugin
,agent
,SSH agent signing
,))
363 $(eval
$(call BuildPlugin
,attr
,File-based config attr
,))
364 $(eval
$(call BuildPlugin
,attr-sql
,SQL-based config attrib
,+strongswan4-mod-sql
))
365 $(eval
$(call BuildPlugin
,blowfish
,Blowfish crypto
,))
366 $(eval
$(call BuildPlugin
,curl
,cURL
,+libcurl
))
367 $(eval
$(call BuildPlugin
,des
,DES crypto
,))
368 $(eval
$(call BuildPlugin
,dnskey
,DNS RR key decoding
,))
369 $(eval
$(call BuildPlugin
,eap-md5
,MD5 EAP
(CHAP
) auth
,))
370 $(eval
$(call BuildPlugin
,eap-mschapv2
,MS-CHAPv2 EAP auth
,))
371 $(eval
$(call BuildPlugin
,eap-radius
,RADIUS proxy auth
,))
372 $(eval
$(call BuildPlugin
,fips-prf
,FIPS PRF crypto
,))
373 $(eval
$(call BuildPlugin
,gcrypt
,libgcrypt
,+libgcrypt
))
374 $(eval
$(call BuildPlugin
,gmp
,libgmp
,+libgmp
))
375 $(eval
$(call BuildPlugin
,hmac
,HMAC crypto
,))
376 $(eval
$(call BuildPlugin
,kernel-klips
,KLIPS kernel interface
,))
377 $(eval
$(call BuildPlugin
,kernel-netlink
,netlink kernel interface
,))
378 $(eval
$(call BuildPlugin
,kernel-pfkey
,PK_KEY kernel interface
,))
379 $(eval
$(call BuildPlugin
,ldap
,LDAP
,+libopenldap
))
380 $(eval
$(call BuildPlugin
,load-tester
,load testing
,))
381 $(eval
$(call BuildPlugin
,md5
,MD5 crypto
,))
382 $(eval
$(call BuildPlugin
,medcli
,mediation client configuration database
,))
383 $(eval
$(call BuildPlugin
,medsrv
,mediation server configuration database
,))
384 $(eval
$(call BuildPlugin
,mysql
,MySQL database interface
,+strongswan4-mod-sql
+libmysqlclient
))
385 $(eval
$(call BuildPlugin
,padlock
,VIA PadLock crypto
,))
386 $(eval
$(call BuildPlugin
,pem
,PEM decoding
,))
387 $(eval
$(call BuildPlugin
,pgp
,PGP key decoding
,))
388 $(eval
$(call BuildPlugin
,pkcs1
,PKCS1 key decoding
,))
389 $(eval
$(call BuildPlugin
,pubkey
,raw public key
,))
390 $(eval
$(call BuildPlugin
,random
,RNG
,))
391 $(eval
$(call BuildPlugin
,resolve
,DNS resolver
,))
392 $(eval
$(call BuildPlugin
,sha1
,SHA1 crypto
,))
393 $(eval
$(call BuildPlugin
,sha2
,SHA2 crypto
,))
394 $(eval
$(call BuildPlugin
,smp
,SMP configuration and control interface
,+libxml2
))
395 $(eval
$(call BuildPlugin
,sql
,SQL database interface
,))
396 $(eval
$(call BuildPlugin
,sqlite
,SQLite database interface
,+strongswan4-mod-sql
+libsqlite3
))
397 $(eval
$(call BuildPlugin
,stroke
,Stroke
,))
398 $(eval
$(call BuildPlugin
,uci
,UCI config interface
,+libuci
))
399 $(eval
$(call BuildPlugin
,updown
,updown firewall
,))
400 $(eval
$(call BuildPlugin
,x509
,x509 certificate
,))
401 $(eval
$(call BuildPlugin
,xcbc
,xcbc crypto
,))