summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls/gnutls_3.7.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gnutls/gnutls_3.7.5.bb')
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.7.5.bb24
1 files changed, 23 insertions, 1 deletions
diff --git a/meta/recipes-support/gnutls/gnutls_3.7.5.bb b/meta/recipes-support/gnutls/gnutls_3.7.5.bb
index 5feedb7fdc..63157eac97 100644
--- a/meta/recipes-support/gnutls/gnutls_3.7.5.bb
+++ b/meta/recipes-support/gnutls/gnutls_3.7.5.bb
@@ -21,6 +21,7 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
21 21
22SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ 22SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \
23 file://arm_eabi.patch \ 23 file://arm_eabi.patch \
24 file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \
24 " 25 "
25 26
26SRC_URI[sha256sum] = "1f85028475b4f255cc5b480af0c37e61eab43024c1507c8b75d6be506c0553ad" 27SRC_URI[sha256sum] = "1f85028475b4f255cc5b480af0c37e61eab43024c1507c8b75d6be506c0553ad"
@@ -36,6 +37,7 @@ PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
36PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1" 37PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
37PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit" 38PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
38PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers" 39PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
40PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}"
39 41
40EXTRA_OECONF = " \ 42EXTRA_OECONF = " \
41 --enable-doc \ 43 --enable-doc \
@@ -59,10 +61,30 @@ do_configure:prepend() {
59 done 61 done
60} 62}
61 63
62PACKAGES =+ "${PN}-openssl ${PN}-xx" 64do_install:append:class-target() {
65 if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then
66 install -d ${D}${bindir}/bin
67 install -m 0755 ${B}/lib/.libs/fipshmac ${D}/${bindir}/
68 fi
69}
70
71PACKAGES =+ "${PN}-openssl ${PN}-xx ${PN}-fips"
63 72
64FILES:${PN}-dev += "${bindir}/gnutls-cli-debug" 73FILES:${PN}-dev += "${bindir}/gnutls-cli-debug"
65FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*" 74FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
66FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*" 75FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*"
76FILES:${PN}-fips = "${bindir}/fipshmac"
67 77
68BBCLASSEXTEND = "native nativesdk" 78BBCLASSEXTEND = "native nativesdk"
79
80pkg_postinst_ontarget:${PN}-fips () {
81 if test -x ${bindir}/fipshmac
82 then
83 mkdir ${sysconfdir}/gnutls
84 touch ${sysconfdir}/gnutls/config
85 ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac
86 ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac
87 ${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac
88 ${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac
89 fi
90}