]>
Commit | Line | Data |
---|---|---|
875e57b3 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with zlib # zlib compression support (may reduce security, see CRIME) | |
4 | # | |
a3f8074d JB |
5 | Summary: Light-weight cryptographic and SSL/TLS library |
6 | Summary(pl.UTF-8): Lekka biblioteka kryptograficzna oraz SSL/TLS | |
7 | Name: mbedtls | |
e0115dde | 8 | Version: 3.1.0 |
95a6445e | 9 | Release: 2 |
a3f8074d JB |
10 | License: GPL v2+ |
11 | Group: Libraries | |
9874b67a JB |
12 | #Source0Download: https://github.com/ARMmbed/mbedtls/releases |
13 | Source0: https://github.com/ARMmbed/mbedtls/archive/v%{version}/%{name}-%{version}.tar.gz | |
e0115dde | 14 | # Source0-md5: a228170fbedd1202edcc1bf13d83b1a3 |
543346bc | 15 | Patch0: %{name}-config-dtls-srtp.patch |
9874b67a | 16 | URL: https://www.trustedfirmware.org/projects/mbed-tls/ |
59cd7fbe | 17 | BuildRequires: cmake >= 2.8.12 |
a3f8074d | 18 | BuildRequires: doxygen |
9874b67a | 19 | BuildRequires: rpm-build >= 4.6 |
a3f8074d | 20 | BuildRequires: rpmbuild(macros) >= 1.605 |
875e57b3 | 21 | %{?with_zlib:BuildRequires: zlib-devel} |
a3f8074d JB |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
9735fbf4 JB |
24 | # some false positives for format-truncation(?) |
25 | # for stringop-overflow see library/ssl_tls.c /stringop-overflow (workaround no longer works with gcc 11) | |
645d2dc1 | 26 | # maybe-uninitialized fails in tests/suites/test_suite_ssl.function only on i686 builder(???) |
07b0e160 | 27 | %define specflags -Wno-error=format-truncation -Wno-error=stringop-overflow -Wno-error=maybe-uninitialized |
59cd7fbe | 28 | |
a3f8074d JB |
29 | %description |
30 | mbedTLS is a light-weight open source cryptographic and SSL/TLS | |
31 | library written in C. mbedTLS makes it easy for developers to include | |
32 | cryptographic and SSL/TLS capabilities in their (embedded) | |
33 | applications with as little hassle as possible. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | mbedTLS to lekka, mająca otwarte źródła biblioteka kryptograficzna | |
37 | oraz SSL/TLS napisana w C. mbedTLS ułatwia programistom dołączanie | |
38 | funkcji kryptograficznych i SSL/TLS do swoich (wbudowanych) aplikacji | |
39 | przy jak najmniejszym narzucie. | |
40 | ||
41 | %package devel | |
42 | Summary: Development files for mbedTLS | |
43 | Summary(pl.UTF-8): Pliki programistyczne biblioteki mbedTLS | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
a3f8074d JB |
46 | |
47 | %description devel | |
48 | This package contains the header files for developing applications | |
49 | that use mbedTLS. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
53 | wykorzystujących bibliotekę mbedTLS. | |
54 | ||
55 | %package static | |
56 | Summary: Static mbedTLS library | |
57 | Summary(pl.UTF-8): Statyczna biblioteka mbedTLS | |
58 | Group: Development/Libraries | |
59 | Requires: %{name}-devel = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static mbedTLS library. | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka mbedTLS. | |
66 | ||
875e57b3 JB |
67 | %package apidocs |
68 | Summary: API documentation for mbedTLS library | |
69 | Summary(pl.UTF-8): Dokumentacja API biblioteki mbedTLS | |
70 | Group: Documentation | |
9874b67a | 71 | BuildArch: noarch |
875e57b3 JB |
72 | |
73 | %description apidocs | |
74 | API documentation for mbedTLS library. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
77 | Dokumentacja API biblioteki mbedTLS. | |
78 | ||
a3f8074d JB |
79 | %prep |
80 | %setup -q | |
543346bc | 81 | %patch0 -p1 |
a3f8074d JB |
82 | |
83 | %build | |
84 | install -d build | |
85 | cd build | |
86 | %cmake .. \ | |
87 | -DLIB_INSTALL_DIR:PATH=%{_libdir} \ | |
875e57b3 | 88 | %{?with_zlib:-DENABLE_ZLIB_SUPPORT=ON} \ |
eb99b0ca JP |
89 | -DUSE_SHARED_MBEDTLS_LIBRARY=ON \ |
90 | -DGEN_FILES=OFF | |
a3f8074d JB |
91 | |
92 | %{__make} | |
93 | %{__make} apidoc | |
94 | ||
95 | %if %{with tests} | |
96 | # Tests are not stable on 64-bit | |
97 | ctest --output-on-failure | |
98 | %endif | |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %{__make} -C build install \ | |
95a6445e | 104 | CMAKE_INSTALL_PREFIX=%{_libdir} \ |
a3f8074d JB |
105 | DESTDIR=$RPM_BUILD_ROOT |
106 | ||
107 | install -d $RPM_BUILD_ROOT%{_libdir} | |
95a6445e JR |
108 | %{__mv} $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libdir}/%{name} |
109 | ||
110 | %{__mv} $RPM_BUILD_ROOT{%{_prefix},%{_libdir}}/cmake | |
a3f8074d JB |
111 | |
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %post -p /sbin/ldconfig | |
116 | %postun -p /sbin/ldconfig | |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
95cbb035 | 120 | %doc ChangeLog LICENSE README.md |
64c8d752 | 121 | %attr(755,root,root) %{_libdir}/libmbedcrypto.so.*.*.* |
e0115dde | 122 | %attr(755,root,root) %ghost %{_libdir}/libmbedcrypto.so.11 |
a3f8074d | 123 | %attr(755,root,root) %{_libdir}/libmbedtls.so.*.*.* |
e0115dde | 124 | %attr(755,root,root) %ghost %{_libdir}/libmbedtls.so.17 |
64c8d752 | 125 | %attr(755,root,root) %{_libdir}/libmbedx509.so.*.*.* |
e0115dde | 126 | %attr(755,root,root) %ghost %{_libdir}/libmbedx509.so.4 |
a3f8074d | 127 | %dir %{_libdir}/%{name} |
a3f8074d JB |
128 | %attr(755,root,root) %{_libdir}/%{name}/benchmark |
129 | %attr(755,root,root) %{_libdir}/%{name}/cert_app | |
130 | %attr(755,root,root) %{_libdir}/%{name}/cert_req | |
131 | %attr(755,root,root) %{_libdir}/%{name}/cert_write | |
132 | %attr(755,root,root) %{_libdir}/%{name}/crl_app | |
133 | %attr(755,root,root) %{_libdir}/%{name}/crypt_and_hash | |
59cd7fbe | 134 | %attr(755,root,root) %{_libdir}/%{name}/crypto_examples |
a3f8074d JB |
135 | %attr(755,root,root) %{_libdir}/%{name}/dh_client |
136 | %attr(755,root,root) %{_libdir}/%{name}/dh_genprime | |
137 | %attr(755,root,root) %{_libdir}/%{name}/dh_server | |
64c8d752 JB |
138 | %attr(755,root,root) %{_libdir}/%{name}/dtls_client |
139 | %attr(755,root,root) %{_libdir}/%{name}/dtls_server | |
59cd7fbe JB |
140 | %attr(755,root,root) %{_libdir}/%{name}/ecdh_curve25519 |
141 | %attr(755,root,root) %{_libdir}/%{name}/ecdsa | |
a3f8074d JB |
142 | %attr(755,root,root) %{_libdir}/%{name}/gen_entropy |
143 | %attr(755,root,root) %{_libdir}/%{name}/gen_key | |
144 | %attr(755,root,root) %{_libdir}/%{name}/gen_random_ctr_drbg | |
a3f8074d JB |
145 | %attr(755,root,root) %{_libdir}/%{name}/generic_sum |
146 | %attr(755,root,root) %{_libdir}/%{name}/hello | |
147 | %attr(755,root,root) %{_libdir}/%{name}/key_app | |
59cd7fbe JB |
148 | %attr(755,root,root) %{_libdir}/%{name}/key_app_writer |
149 | %attr(755,root,root) %{_libdir}/%{name}/key_ladder_demo | |
150 | %attr(755,root,root) %{_libdir}/%{name}/key_ladder_demo.sh | |
e0115dde | 151 | %attr(755,root,root) %{_libdir}/%{name}/load_roots |
bf36c92e | 152 | %attr(755,root,root) %{_libdir}/%{name}/mini_client |
a3f8074d | 153 | %attr(755,root,root) %{_libdir}/%{name}/mpi_demo |
a3f8074d JB |
154 | %attr(755,root,root) %{_libdir}/%{name}/pem2der |
155 | %attr(755,root,root) %{_libdir}/%{name}/pk_decrypt | |
156 | %attr(755,root,root) %{_libdir}/%{name}/pk_encrypt | |
157 | %attr(755,root,root) %{_libdir}/%{name}/pk_sign | |
158 | %attr(755,root,root) %{_libdir}/%{name}/pk_verify | |
59cd7fbe | 159 | %attr(755,root,root) %{_libdir}/%{name}/psa_constant_names |
628fc698 | 160 | %attr(755,root,root) %{_libdir}/%{name}/query_compile_time_config |
a3f8074d JB |
161 | %attr(755,root,root) %{_libdir}/%{name}/req_app |
162 | %attr(755,root,root) %{_libdir}/%{name}/rsa_decrypt | |
163 | %attr(755,root,root) %{_libdir}/%{name}/rsa_encrypt | |
164 | %attr(755,root,root) %{_libdir}/%{name}/rsa_genkey | |
165 | %attr(755,root,root) %{_libdir}/%{name}/rsa_sign | |
59cd7fbe | 166 | %attr(755,root,root) %{_libdir}/%{name}/rsa_sign_pss |
a3f8074d | 167 | %attr(755,root,root) %{_libdir}/%{name}/rsa_verify |
59cd7fbe | 168 | %attr(755,root,root) %{_libdir}/%{name}/rsa_verify_pss |
a3f8074d | 169 | %attr(755,root,root) %{_libdir}/%{name}/selftest |
a3f8074d JB |
170 | %attr(755,root,root) %{_libdir}/%{name}/ssl_client1 |
171 | %attr(755,root,root) %{_libdir}/%{name}/ssl_client2 | |
59cd7fbe | 172 | %attr(755,root,root) %{_libdir}/%{name}/ssl_context_info |
a3f8074d JB |
173 | %attr(755,root,root) %{_libdir}/%{name}/ssl_fork_server |
174 | %attr(755,root,root) %{_libdir}/%{name}/ssl_mail_client | |
175 | %attr(755,root,root) %{_libdir}/%{name}/ssl_pthread_server | |
176 | %attr(755,root,root) %{_libdir}/%{name}/ssl_server | |
9874b67a | 177 | %attr(755,root,root) %{_libdir}/%{name}/ssl_server2 |
a3f8074d | 178 | %attr(755,root,root) %{_libdir}/%{name}/strerror |
64c8d752 | 179 | %attr(755,root,root) %{_libdir}/%{name}/udp_proxy |
59cd7fbe | 180 | %attr(755,root,root) %{_libdir}/%{name}/zeroize |
a3f8074d JB |
181 | |
182 | %files devel | |
183 | %defattr(644,root,root,755) | |
64c8d752 | 184 | %attr(755,root,root) %{_libdir}/libmbedcrypto.so |
a3f8074d | 185 | %attr(755,root,root) %{_libdir}/libmbedtls.so |
64c8d752 JB |
186 | %attr(755,root,root) %{_libdir}/libmbedx509.so |
187 | %{_includedir}/mbedtls | |
59cd7fbe | 188 | %{_includedir}/psa |
95a6445e | 189 | %{_libdir}/cmake/MbedTLS*.cmake |
a3f8074d JB |
190 | |
191 | %files static | |
192 | %defattr(644,root,root,755) | |
95cbb035 | 193 | %{_libdir}/libmbedcrypto.a |
a3f8074d | 194 | %{_libdir}/libmbedtls.a |
64c8d752 | 195 | %{_libdir}/libmbedx509.a |
875e57b3 JB |
196 | |
197 | %files apidocs | |
198 | %defattr(644,root,root,755) | |
199 | %doc apidoc/* |