Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > 1d4e5c06c45819339367fa5f50149943 > files > 2

mbedtls-2.16.7-1.mga7.src.rpm

%define major 12
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d
%define x509major 0
%define libx509 %mklibname mbedx509_ %{x509major}
%define cryptomajor 3
%define libcrypto %mklibname mbedcrypto %{cryptomajor}

Name:           mbedtls
# Please stay on LTS branch 2.16.x:
# https://tls.mbed.org/tech-updates/blog/announcing-lts-branch-mbedtls-2.16
Version:        2.16.7
Release:        %mkrel 1
Summary:        Light-weight cryptographic and SSL/TLS library
Group:          System/Libraries
License:        ASL 2.0
URL:            https://tls.mbed.org
Source0:        https://github.com/ARMmbed/mbedtls/archive/%{name}-%{version}/%{name}-%{version}.tar.gz

Obsoletes:      polarssl < 1.3.16-1
Provides:       polarssl = %{version}-%{release}

BuildRequires:  cmake
BuildRequires:  pkgconfig(libpkcs11-helper-1)
BuildRequires:  pkgconfig(zlib)

%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 %{libx509}
Summary:        mbed TLS X509 library
Group:          System/Libraries
Conflicts:      %{_lib}mbedtls10 < 2.16.2-1

%description -n %{libx509}
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 X509 library.

%package -n %{libcrypto}
Summary:        mbed crypto library
Group:          System/Libraries
Conflicts:      %{_lib}mbedtls10 < 2.16.2-1

%description -n %{libcrypto}
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 mbedcrypto library.

%package -n %{develname}
Summary:        mbed TLS development files
Group:          Development/C
Requires:       %{libname} = %{version}-%{release}
Requires:       %{libx509} = %{version}-%{release}
Requires:       %{libcrypto} = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}
Provides:       polarssl-devel = %{version}-%{release}
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
%autosetup -p1 -n %{name}-%{name}-%{version}

# 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=ON \
    -DUSE_PKCS11_HELPER_LIBRARY=ON \
    -DENABLE_ZLIB_SUPPORT=ON

%make_build

%check
%make_build check

%install
%make_install -C build

# prevent possible file clashes
pushd %{buildroot}%{_bindir}
    for i in *; do mv ${i} %{name}-${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}

%files -n %{libx509}
%{_libdir}/libmbedx509.so.%{x509major}
%{_libdir}/libmbedx509.so.%{version}

%files -n %{libcrypto}
%{_libdir}/libmbedcrypto.so.%{cryptomajor}
%{_libdir}/libmbedcrypto.so.%{version}

%files -n %{develname}
%{_includedir}/%{name}/
%{_libdir}/libmbed*.so


%changelog
* Wed Jul 08 2020 akien <akien> 2.16.7-1.mga7
+ Revision: 1603057
- Version 2.16.7 (mga#26924)
- Version 2.16.6 (mga#26758)
- Version 2.16.5 (mga#26259)
- Version 2.16.4 (mga#25952)
- Version 2.16.2
- Fix conflicts with mga6

* Wed Apr 03 2019 akien <akien> 2.16.1-2.mga7
+ Revision: 1385567
- Disable building docs (shaves off 6 MB). Devs use online docs nowadays.
- Explicitly enable zlib support.
- Remove unnecessary dependency in libs on the mbedtls util binaries

* Wed Apr 03 2019 akien <akien> 2.16.1-1.mga7
+ Revision: 1385560
- Version 2.16.1, new LTS

* Tue Jan 01 2019 luigiwalser <luigiwalser> 2.7.8-1.mga7
+ Revision: 1347836
- 2.7.8 (fixes CVE-2018-19608)

* Fri Oct 12 2018 mrambo3501 <mrambo3501> 2.7.6-1.mga7
+ Revision: 1319842
- version 2.7.6 fixes CVE-2018-049[7-8] (mga#23660)

* Sun Sep 23 2018 umeabot <umeabot> 2.7.3-3.mga7
+ Revision: 1299493
- Mageia 7 Mass Rebuild

* Tue May 08 2018 daviddavid <daviddavid> 2.7.3-2.mga7
+ Revision: 1227704
- add missing requires on devel subpkg

* Tue May 08 2018 kekepower <kekepower> 2.7.3-1.mga7
+ Revision: 1227673
- Update to version 2.7.3
- Fixes CVE-2018-9988 and CVE-2018-9989 (mga#22914)
- Split x509 and crypto into their own package

* Wed Mar 07 2018 kekepower <kekepower> 2.7.0-1.mga7
+ Revision: 1206999
- Update to version 2.7.0
- This fixes CVE-2017-18187, CVE-2018-0487 and CVE-2018-0488 (mga#22653)

* Thu Dec 28 2017 luigiwalser <luigiwalser> 2.6.0-1.mga7
+ Revision: 1186336
- 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