2024-01-06 06:59:32 +01:00
|
|
|
Name: mbedtls
|
2024-01-06 06:59:32 +01:00
|
|
|
Version: 3.2.1
|
2024-01-06 06:59:32 +01:00
|
|
|
Release: 1mamba
|
|
|
|
Summary: A C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols
|
|
|
|
Group: System/Libraries
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
2024-01-06 06:59:32 +01:00
|
|
|
URL: https://www.trustedfirmware.org/projects/mbed-tls/
|
2024-01-06 06:59:32 +01:00
|
|
|
Source: https://github.com/ARMmbed/mbedtls.git/v%{version}/mbedtls-%{version}.tar.bz2
|
|
|
|
License: Apache License 2.0
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
BuildRequires: cmake
|
|
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description
|
|
|
|
Mbed TLS is a C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols. Its small code footprint makes it suitable for embedded systems.
|
|
|
|
|
|
|
|
%package -n lib%{name}
|
|
|
|
Group: System/Libraries
|
|
|
|
Summary: Shared libraries for %{name}
|
|
|
|
|
|
|
|
%description -n lib%{name}
|
|
|
|
This package contains shared libraries for %{name}.
|
|
|
|
|
|
|
|
%package -n lib%{name}-devel
|
|
|
|
Group: Development/Libraries
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
## note: you can add this requirement if .pc files are provided by this package
|
|
|
|
#Requires: pkg-config
|
|
|
|
|
|
|
|
%description -n lib%{name}-devel
|
|
|
|
This package contains libraries and header files for developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
%debug_package
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2024-01-06 06:59:32 +01:00
|
|
|
## enable flags for non-embedded systems
|
|
|
|
#sed -i 's|//\(#define MBEDTLS_THREADING_C\)|\1|' include/mbedtls/config.h
|
|
|
|
#sed -i 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' include/mbedtls/config.h
|
|
|
|
|
|
|
|
## broken in 2.25.0
|
|
|
|
#sed -i 's/thread_id, -ret/thread_id, (unsigned int)(-ret)/' programs/ssl/ssl_pthread_server.c
|
|
|
|
#sed -i 's/thread_id, ret/thread_id, (unsigned int)ret/' programs/ssl/ssl_pthread_server.c
|
|
|
|
#sed -i 's/ -ret );/ (unsigned int)(-ret) );/' programs/ssl/ssl_pthread_server.c
|
|
|
|
#sed -i 's/ -ret, error_buf/ (unsigned int)(-ret), error_buf/' programs/ssl/ssl_pthread_server.c
|
|
|
|
#sed -i 's/04x\\n", ret /04x\\n", (unsigned int)ret /' programs/ssl/ssl_pthread_server.c
|
2024-01-06 06:59:32 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CC=/usr/bin/clang
|
|
|
|
export CXX=/usr/bin/clang++
|
|
|
|
|
|
|
|
%cmake -d build \
|
2024-01-06 06:59:32 +01:00
|
|
|
-DUSE_SHARED_MBEDTLS_LIBRARY=ON \
|
|
|
|
%ifnarch x86_64 aarch64
|
|
|
|
-DENABLE_TESTING=OFF
|
|
|
|
%endif
|
2024-01-06 06:59:32 +01:00
|
|
|
|
|
|
|
%make
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%makeinstall -C build
|
|
|
|
|
|
|
|
chmod +x %{buildroot}%{_libdir}/lib*.so*
|
|
|
|
|
2024-01-06 06:59:32 +01:00
|
|
|
mv %{buildroot}%{_prefix}/cmake %{buildroot}%{_libdir}
|
|
|
|
|
2024-01-06 06:59:32 +01:00
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%post -n lib%{name} -p /sbin/ldconfig
|
|
|
|
%postun -n lib%{name} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2024-01-06 06:59:32 +01:00
|
|
|
%{_bindir}/*
|
2024-01-06 06:59:32 +01:00
|
|
|
|
|
|
|
%files -n lib%{name}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libmbedcrypto.so.*
|
|
|
|
%{_libdir}/libmbedtls.so.*
|
|
|
|
%{_libdir}/libmbedx509.so.*
|
|
|
|
%doc LICENSE
|
|
|
|
|
|
|
|
%files -n lib%{name}-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_includedir}/mbedtls
|
|
|
|
%{_includedir}/mbedtls/*.h
|
|
|
|
%dir %{_includedir}/psa
|
|
|
|
%{_includedir}/psa/*.h
|
|
|
|
%{_libdir}/libmbedcrypto.a
|
|
|
|
%{_libdir}/libmbedcrypto.so
|
|
|
|
%{_libdir}/libmbedtls.a
|
|
|
|
%{_libdir}/libmbedtls.so
|
|
|
|
%{_libdir}/libmbedx509.a
|
|
|
|
%{_libdir}/libmbedx509.so
|
2024-01-06 06:59:32 +01:00
|
|
|
%{_libdir}/cmake/MbedTLS*.cmake
|
2024-01-06 06:59:32 +01:00
|
|
|
%doc ChangeLog README.md
|
|
|
|
|
|
|
|
%changelog
|
2024-01-06 06:59:32 +01:00
|
|
|
* Wed Jul 13 2022 Automatic Build System <autodist@mambasoft.it> 3.2.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Jan 05 2022 Automatic Build System <autodist@mambasoft.it> 3.1.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 06:59:32 +01:00
|
|
|
* Sat May 08 2021 Automatic Build System <autodist@mambasoft.it> 2.26.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 06:59:32 +01:00
|
|
|
* Fri May 07 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.25.0-1mamba
|
|
|
|
- package created using the webbuild interface
|