%define major 10 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Summary: An SSL library Name: mbedtls Version: 2.7.3 Release: %mkrel 1 License: ASL 2.0 Group: System/Libraries URL: https://tls.mbed.org Source0: https://tls.mbed.org/download/%{name}-%{version}-apache.tgz Obsoletes: polarssl < 1.3.16-1 Provides: polarssl = %{version}-%{release} BuildRequires: cmake BuildRequires: doxygen BuildRequires: graphviz BuildRequires: pkgconfig(libpkcs11-helper-1) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(openssl) %description mbed TLS (formerly known as PolarSSL) is an SSL library written in ANSI C. mbed TLS makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products with as little hassle as possible. It is designed to be readable, documented, tested, loosely coupled and portable. This package contains mbed TLS programs. %package -n %{libname} Summary: mbed TLS library Group: System/Libraries %description -n %{libname} mbed TLS (formerly known as PolarSSL) is an SSL library written in ANSI C. mbed TLS makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products with as little hassle as possible. It is designed to be readable, documented, tested, loosely coupled and portable. This package contains the library itself. %package -n %{develname} Summary: mbed TLS development files Group: Development/C Requires: %{libname} = %{version} Provides: mbedtls-devel = %{version} Provides: polarssl-devel = %{version} Obsoletes: %{_lib}polarssl-devel < 1.3.16-1 %description -n %{develname} mbed TLS (formerly known as PolarSSL) is an SSL library written in ANSI C. mbed TLS makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products with as little hassle as possible. It is designed to be readable, documented, tested, loosely coupled and portable. This package contains development files. %prep %setup -q # Enable MBEDTLS_THREADING_PTHREAD and MBEDTLS_THREADING_C flags # https://bugs.mageia.org/show_bug.cgi?id=15391#c4 sed -i -e 's|.*\(#define MBEDTLS_THREADING_C\)|\1|' \ -e 's|.*\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' \ include/mbedtls/config.h %build %cmake \ -DUSE_SHARED_MBEDTLS_LIBRARY:BOOL=ON \ -DUSE_PKCS11_HELPER_LIBRARY:BOOL=ON %make_build %make_build apidoc %check %make_build check %install %make_install -C build # prevent possible file clashes pushd %{buildroot}%{_bindir} for i in * ; do mv ${i} mbedtls-${i}; done popd rm -f %{buildroot}%{_libdir}/*.a %files %doc ChangeLog README* %{_bindir}/%{name}-* %files -n %{libname} %{_libdir}/lib%{name}.so.%{major} %{_libdir}/lib%{name}.so.%{version} %{_libdir}/libmbedcrypto.so.%{version} %{_libdir}/libmbedcrypto.so.2 %{_libdir}/libmbedx509.so.%{version} %{_libdir}/libmbedx509.so.0 %files -n %{develname} %doc apidoc/* %{_libdir}/libmbed*.so %{_includedir}/%{name}/ %changelog * Tue May 08 2018 kekepower <kekepower> 2.7.3-1.mga6 (not released yet) + Revision: 1227804 - Update to version 2.7.3 - Fixes CVE-2018-9988 and CVE-2018-9989 (mga#22914) - Update to version 2.8.0 - Fixes CVE-2018-9988 and CVE-2018-9989 (mga#22914) - Update to version 2.7.0 - This fixes CVE-2017-18187, CVE-2018-0487 and CVE-2018-0488 (mga#22653) + luigiwalser <luigiwalser> - 2.6.0 * Thu Mar 23 2017 luigiwalser <luigiwalser> 2.4.2-1.mga6 + Revision: 1094596 - 2.4.2 (fixes CVE-2017-2784) * Sun Jan 22 2017 akien <akien> 2.4.0-1.mga6 + Revision: 1083018 - Version 2.4.0 - Version 2.2.1, major 10 - Package ASL 2.0 version instead of GPLv2+ * Tue Jul 05 2016 luigiwalser <luigiwalser> 1.3.17-1.mga6 + Revision: 1039028 - 1.3.17 * Thu Jan 14 2016 luigiwalser <luigiwalser> 1.3.16-1.mga6 + Revision: 923139 - library major is now 9 - 1.3.16 (mga#17187) * Tue Jan 12 2016 luigiwalser <luigiwalser> 2.2.1-1.mga6 + Revision: 922231 - 2.2.1 * Mon Nov 16 2015 oden <oden> 2.2.0-2.mga6 + Revision: 903639 - the polarssl -> mbedtls switch was simply premature... * Mon Nov 16 2015 oden <oden> 2.2.0-1.mga6 + Revision: 903624 - imported package mbedtls