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