diff options
author | fan.xin <fan.xin@jp.fujitsu.com> | 2017-06-22 11:03:39 +0900 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-06-28 10:29:20 -0400 |
commit | fd2c2ee0a45a6e851ca42a0580ebe6a9cb76944c (patch) | |
tree | 59d906633122201fda1d4cc4c78d23825d9991b6 /meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb | |
parent | 325e3ebf420e872f2c35dc242736d09bd9da8063 (diff) | |
download | meta-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.bb | 130 |
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 @@ | |||
1 | DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \ | ||
2 | Linux operating system." | ||
3 | SUMMARY = "strongSwan is an OpenSource IPsec implementation" | ||
4 | HOMEPAGE = "http://www.strongswan.org" | ||
5 | SECTION = "net" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
8 | DEPENDS = "gmp openssl flex-native flex bison-native" | ||
9 | |||
10 | SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \ | ||
11 | file://fix-funtion-parameter.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "4afffe3c219bb2e04f09510905af836b" | ||
15 | SRC_URI[sha256sum] = "c5ea54b199174708de11af9b8f4ecf28b5b0743d4bc0e380e741f25b28c0f8d4" | ||
16 | |||
17 | EXTRA_OECONF = " \ | ||
18 | --without-lib-prefix \ | ||
19 | " | ||
20 | |||
21 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
22 | |||
23 | |||
24 | PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \ | ||
25 | ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \ | ||
26 | " | ||
27 | PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni" | ||
28 | PACKAGECONFIG[charon] = "--enable-charon,--disable-charon," | ||
29 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl" | ||
30 | PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp" | ||
31 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap" | ||
32 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql" | ||
33 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl" | ||
34 | PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient," | ||
35 | PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup" | ||
36 | PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite" | ||
37 | PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke" | ||
38 | PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc" | ||
39 | |||
40 | # requires swanctl | ||
41 | PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd," | ||
42 | |||
43 | inherit autotools systemd pkgconfig | ||
44 | |||
45 | RRECOMMENDS_${PN} = "kernel-module-ipsec" | ||
46 | |||
47 | FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}" | ||
48 | FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug" | ||
49 | FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la" | ||
50 | FILES_${PN}-staticdev += "${libdir}/ipsec/*.a" | ||
51 | |||
52 | CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf" | ||
53 | |||
54 | PACKAGES += "${PN}-plugins" | ||
55 | ALLOW_EMPTY_${PN}-plugins = "1" | ||
56 | |||
57 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*$" | ||
58 | NOAUTOPACKAGEDEBUG = "1" | ||
59 | |||
60 | python 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 | |||
90 | PACKAGESPLITFUNCS_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 | ||
94 | RDEPENDS_${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 | |||
127 | RPROVIDES_${PN} += "${PN}-systemd" | ||
128 | RREPLACES_${PN} += "${PN}-systemd" | ||
129 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
130 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}" | ||