diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2018-07-03 15:21:19 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-07-03 17:42:25 -0700 |
commit | d490ac28fe54d3ce3fdd749e403ad4653631c778 (patch) | |
tree | e473f2726fc8bc5a59f0cb1e0ae2ef719166171c /meta-networking/recipes-support/strongswan/strongswan_5.6.3.bb | |
parent | 7ccfc9d818f08a9d1d2a44d5d527b64270dc674b (diff) | |
download | meta-openembedded-d490ac28fe54d3ce3fdd749e403ad4653631c778.tar.gz |
strongswan: upgrade 5.6.2 -> 5.6.3
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/strongswan/strongswan_5.6.3.bb')
-rw-r--r-- | meta-networking/recipes-support/strongswan/strongswan_5.6.3.bb | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/strongswan/strongswan_5.6.3.bb b/meta-networking/recipes-support/strongswan/strongswan_5.6.3.bb new file mode 100644 index 000000000..297f0e76f --- /dev/null +++ b/meta-networking/recipes-support/strongswan/strongswan_5.6.3.bb | |||
@@ -0,0 +1,134 @@ | |||
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 | file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "a6a28eeb22aa58080a7581771a5b63f9" | ||
16 | SRC_URI[sha256sum] = "c3c7dc8201f40625bba92ffd32eb602a8909210d8b3fac4d214c737ce079bf24" | ||
17 | |||
18 | UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar" | ||
19 | |||
20 | EXTRA_OECONF = " \ | ||
21 | --without-lib-prefix \ | ||
22 | " | ||
23 | |||
24 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
25 | |||
26 | |||
27 | PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \ | ||
28 | ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \ | ||
29 | " | ||
30 | PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni" | ||
31 | PACKAGECONFIG[charon] = "--enable-charon,--disable-charon," | ||
32 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl" | ||
33 | PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp" | ||
34 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap" | ||
35 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql" | ||
36 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl" | ||
37 | PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient," | ||
38 | PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup" | ||
39 | PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite" | ||
40 | PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke" | ||
41 | PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc" | ||
42 | |||
43 | # requires swanctl | ||
44 | PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd," | ||
45 | |||
46 | inherit autotools systemd pkgconfig | ||
47 | |||
48 | RRECOMMENDS_${PN} = "kernel-module-ipsec" | ||
49 | |||
50 | FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}" | ||
51 | FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug" | ||
52 | FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la" | ||
53 | FILES_${PN}-staticdev += "${libdir}/ipsec/*.a" | ||
54 | |||
55 | CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf" | ||
56 | |||
57 | PACKAGES += "${PN}-plugins" | ||
58 | ALLOW_EMPTY_${PN}-plugins = "1" | ||
59 | |||
60 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*$" | ||
61 | NOAUTOPACKAGEDEBUG = "1" | ||
62 | |||
63 | python split_strongswan_plugins () { | ||
64 | sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon') | ||
65 | libdir = d.expand('${libdir}/ipsec/plugins') | ||
66 | dbglibdir = os.path.join(libdir, '.debug') | ||
67 | |||
68 | def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename): | ||
69 | dvar = d.getVar('PKGD', True) | ||
70 | oldfiles = d.getVar('CONFFILES_' + pkg, True) | ||
71 | newfile = '/' + os.path.relpath(f, dvar) | ||
72 | |||
73 | if not oldfiles: | ||
74 | d.setVar('CONFFILES_' + pkg, newfile) | ||
75 | else: | ||
76 | d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile) | ||
77 | |||
78 | split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True) | ||
79 | do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf) | ||
80 | |||
81 | 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') | ||
82 | 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') | ||
83 | 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') | ||
84 | |||
85 | if split_packages: | ||
86 | pn = d.getVar('PN', True) | ||
87 | d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages)) | ||
88 | d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages)) | ||
89 | d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages)) | ||
90 | d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages)) | ||
91 | } | ||
92 | |||
93 | PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins " | ||
94 | |||
95 | # Install some default plugins based on default strongSwan ./configure options | ||
96 | # See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist | ||
97 | RDEPENDS_${PN} += "\ | ||
98 | ${PN}-plugin-aes \ | ||
99 | ${PN}-plugin-attr \ | ||
100 | ${PN}-plugin-cmac \ | ||
101 | ${PN}-plugin-constraints \ | ||
102 | ${PN}-plugin-des \ | ||
103 | ${PN}-plugin-dnskey \ | ||
104 | ${PN}-plugin-hmac \ | ||
105 | ${PN}-plugin-kernel-netlink \ | ||
106 | ${PN}-plugin-md5 \ | ||
107 | ${PN}-plugin-nonce \ | ||
108 | ${PN}-plugin-pem \ | ||
109 | ${PN}-plugin-pgp \ | ||
110 | ${PN}-plugin-pkcs1 \ | ||
111 | ${PN}-plugin-pkcs7 \ | ||
112 | ${PN}-plugin-pkcs8 \ | ||
113 | ${PN}-plugin-pkcs12 \ | ||
114 | ${PN}-plugin-pubkey \ | ||
115 | ${PN}-plugin-random \ | ||
116 | ${PN}-plugin-rc2 \ | ||
117 | ${PN}-plugin-resolve \ | ||
118 | ${PN}-plugin-revocation \ | ||
119 | ${PN}-plugin-sha1 \ | ||
120 | ${PN}-plugin-sha2 \ | ||
121 | ${PN}-plugin-socket-default \ | ||
122 | ${PN}-plugin-sshkey \ | ||
123 | ${PN}-plugin-updown \ | ||
124 | ${PN}-plugin-vici \ | ||
125 | ${PN}-plugin-x509 \ | ||
126 | ${PN}-plugin-xauth-generic \ | ||
127 | ${PN}-plugin-xcbc \ | ||
128 | ${PN}-plugin-curve25519 \ | ||
129 | " | ||
130 | |||
131 | RPROVIDES_${PN} += "${PN}-systemd" | ||
132 | RREPLACES_${PN} += "${PN}-systemd" | ||
133 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
134 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}" | ||