summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
diff options
context:
space:
mode:
authorfan.xin <fan.xin@jp.fujitsu.com>2017-06-22 11:03:39 +0900
committerJoe MacDonald <joe_macdonald@mentor.com>2017-06-28 10:29:20 -0400
commitfd2c2ee0a45a6e851ca42a0580ebe6a9cb76944c (patch)
tree59d906633122201fda1d4cc4c78d23825d9991b6 /meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
parent325e3ebf420e872f2c35dc242736d09bd9da8063 (diff)
downloadmeta-openembedded-fd2c2ee0a45a6e851ca42a0580ebe6a9cb76944c.tar.gz
strongswan: 5.5.1 -> 5.5.3
Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb')
-rw-r--r--meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb b/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
new file mode 100644
index 000000000..9215233b1
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
@@ -0,0 +1,130 @@
1DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
2Linux operating system."
3SUMMARY = "strongSwan is an OpenSource IPsec implementation"
4HOMEPAGE = "http://www.strongswan.org"
5SECTION = "net"
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
8DEPENDS = "gmp openssl flex-native flex bison-native"
9
10SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
11 file://fix-funtion-parameter.patch \
12"
13
14SRC_URI[md5sum] = "4afffe3c219bb2e04f09510905af836b"
15SRC_URI[sha256sum] = "c5ea54b199174708de11af9b8f4ecf28b5b0743d4bc0e380e741f25b28c0f8d4"
16
17EXTRA_OECONF = " \
18 --without-lib-prefix \
19"
20
21EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
22
23
24PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
25 ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
26"
27PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
28PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
29PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
30PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
31PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
32PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
33PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
34PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
35PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
36PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
37PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
38PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
39
40# requires swanctl
41PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
42
43inherit autotools systemd pkgconfig
44
45RRECOMMENDS_${PN} = "kernel-module-ipsec"
46
47FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
48FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
49FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
50FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
51
52CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
53
54PACKAGES += "${PN}-plugins"
55ALLOW_EMPTY_${PN}-plugins = "1"
56
57PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
58NOAUTOPACKAGEDEBUG = "1"
59
60python split_strongswan_plugins () {
61 sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
62 libdir = d.expand('${libdir}/ipsec/plugins')
63 dbglibdir = os.path.join(libdir, '.debug')
64
65 def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
66 dvar = d.getVar('PKGD', True)
67 oldfiles = d.getVar('CONFFILES_' + pkg, True)
68 newfile = '/' + os.path.relpath(f, dvar)
69
70 if not oldfiles:
71 d.setVar('CONFFILES_' + pkg, newfile)
72 else:
73 d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
74
75 split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
76 do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
77
78 split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
79 split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
80 split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
81
82 if split_packages:
83 pn = d.getVar('PN', True)
84 d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
85 d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
86 d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
87 d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
88}
89
90PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
91
92# Install some default plugins based on default strongSwan ./configure options
93# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
94RDEPENDS_${PN} += "\
95 ${PN}-plugin-aes \
96 ${PN}-plugin-attr \
97 ${PN}-plugin-cmac \
98 ${PN}-plugin-constraints \
99 ${PN}-plugin-des \
100 ${PN}-plugin-dnskey \
101 ${PN}-plugin-hmac \
102 ${PN}-plugin-kernel-netlink \
103 ${PN}-plugin-md5 \
104 ${PN}-plugin-nonce \
105 ${PN}-plugin-pem \
106 ${PN}-plugin-pgp \
107 ${PN}-plugin-pkcs1 \
108 ${PN}-plugin-pkcs7 \
109 ${PN}-plugin-pkcs8 \
110 ${PN}-plugin-pkcs12 \
111 ${PN}-plugin-pubkey \
112 ${PN}-plugin-random \
113 ${PN}-plugin-rc2 \
114 ${PN}-plugin-resolve \
115 ${PN}-plugin-revocation \
116 ${PN}-plugin-sha1 \
117 ${PN}-plugin-sha2 \
118 ${PN}-plugin-socket-default \
119 ${PN}-plugin-sshkey \
120 ${PN}-plugin-updown \
121 ${PN}-plugin-vici \
122 ${PN}-plugin-x509 \
123 ${PN}-plugin-xauth-generic \
124 ${PN}-plugin-xcbc \
125 "
126
127RPROVIDES_${PN} += "${PN}-systemd"
128RREPLACES_${PN} += "${PN}-systemd"
129RCONFLICTS_${PN} += "${PN}-systemd"
130SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}"