]>
Commit | Line | Data |
---|---|---|
5c0621cb JB |
1 | # |
2 | # Conditional build: | |
1e0c40e2 | 3 | %bcond_with libftdi1 # build with libftdi1 instead of old libftdi |
6130439c JP |
4 | %bcond_with mbedtls # mbedTLS crypto instead of OpenSSL |
5 | %bcond_without static_libs # static libraries | |
5c0621cb | 6 | |
16e3b58d | 7 | Summary: OSS implementation of the TCG TPM2 Software Stack (TSS2) |
5c0621cb | 8 | Summary(pl.UTF-8): Mająca otwarte źródła implementacja TCG TPM2 Software Stack (TSS2) |
16e3b58d | 9 | Name: tpm2-tss |
6dd31d9b | 10 | Version: 4.1.3 |
1abbb8e3 | 11 | Release: 1 |
16e3b58d AM |
12 | License: BSD |
13 | Group: Libraries | |
5c0621cb | 14 | #Source0Download: https://github.com/tpm2-software/tpm2-tss/releases |
16e3b58d | 15 | Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz |
6dd31d9b | 16 | # Source0-md5: 018e7f53a7c2d6385c7a76cf7699019c |
1e0c40e2 | 17 | Patch0: prefer-libftdi1.patch |
16e3b58d | 18 | URL: https://github.com/tpm2-software/tpm2-tss |
5c0621cb JB |
19 | BuildRequires: autoconf >= 2.50 |
20 | BuildRequires: automake | |
21 | BuildRequires: curl-devel | |
16e3b58d | 22 | BuildRequires: doxygen |
9cd971bd JB |
23 | BuildRequires: json-c-devel >= 0.13 |
24 | # or libftdi1-devel, but version 0 is preferred (as of tpm2-tss 4.1.1) | |
1e0c40e2 MK |
25 | %if %{with libftdi1} |
26 | BuildRequires: libftdi1-devel | |
27 | %else | |
9cd971bd | 28 | BuildRequires: libftdi-devel |
1e0c40e2 | 29 | %endif |
b12a6b16 | 30 | BuildRequires: libltdl-devel >= 2:2 |
5c0621cb | 31 | BuildRequires: libtool >= 2:2 |
16e9c50e | 32 | BuildRequires: libtpms-devel |
9cd971bd JB |
33 | BuildRequires: libusb-devel >= 1.0 |
34 | BuildRequires: libuuid-devel | |
a73a4e92 | 35 | %{?with_mbedtls:BuildRequires: mbedtls-devel} |
b12a6b16 | 36 | %{!?with_mbedtls:BuildRequires: openssl-devel >= 1.1.0} |
5c0621cb | 37 | BuildRequires: pkgconfig |
6130439c | 38 | BuildRequires: rpmbuild(macros) >= 1.527 |
b12a6b16 | 39 | BuildRequires: sed >= 4.0 |
0dc87886 JB |
40 | Requires(pre): /bin/id |
41 | Requires(pre): /usr/bin/getgid | |
42 | Requires(pre): /usr/sbin/groupadd | |
43 | Requires(pre): /usr/sbin/useradd | |
44 | Requires(postun): /usr/sbin/groupdel | |
45 | Requires(postun): /usr/sbin/userdel | |
46 | Provides: group(tss) | |
47 | Provides: user(tss) | |
16e3b58d AM |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
51 | Implementation of the Trusted Computing Group's (TCG) TPM2 Software | |
52 | Stack (TSS). | |
53 | ||
5c0621cb JB |
54 | %description -l pl.UTF-8 |
55 | Implementacja specyfikacji TPM2 Software Stack (TSS), stworzonej przez | |
56 | Trusted Computing Group (TCG). | |
57 | ||
16e3b58d | 58 | %package devel |
5c0621cb JB |
59 | Summary: Header files for tpm2-tss |
60 | Summary(es.UTF-8): Arquivos de cabeçalho para tpm2-tss | |
61 | Summary(pl.UTF-8): Pliki nagłówkowe do tpm2-tss | |
62 | Summary(pt_BR.UTF-8): Arquivos de inclusão para a tpm2-tss | |
63 | Summary(ru.UTF-8): Хедеры для tpm2-tss | |
64 | Summary(uk.UTF-8): Хедери для tpm2-tss | |
16e3b58d | 65 | Group: Development/Libraries |
5c0621cb JB |
66 | Requires: %{name} = %{version}-%{release} |
67 | Requires: curl-devel | |
9cd971bd | 68 | Requires: json-c-devel >= 0.13 |
3d28b6c2 MK |
69 | %if %{with libftdi1} |
70 | Requires: libftdi1-devel | |
71 | %else | |
9cd971bd | 72 | Requires: libftdi-devel |
3d28b6c2 | 73 | %endif |
9cd971bd JB |
74 | Requires: libusb-devel >= 1.0 |
75 | Requires: libuuid-devel | |
a73a4e92 | 76 | %{?with_mbedtls:Requires: mbedtls-devel >= 1.6.0} |
b12a6b16 | 77 | %{!?with_mbedtls:Requires: openssl-devel >= 1.1.0} |
16e3b58d AM |
78 | |
79 | %description devel | |
5c0621cb JB |
80 | Header files for implementation of the Trusted Computing Group's (TCG) |
81 | TPM2 Software Stack (TSS). | |
16e3b58d AM |
82 | |
83 | %description devel -l pl.UTF-8 | |
5c0621cb JB |
84 | Pliki nagłówkowe implementacji Trusted Computing Group (TCG) TPM2 |
85 | Software Stack (TSS). | |
16e3b58d AM |
86 | |
87 | %description devel -l ru.UTF-8 | |
5c0621cb | 88 | Хедеры необходимые для программирования с tpm2-tss. |
16e3b58d AM |
89 | |
90 | %description devel -l uk.UTF-8 | |
5c0621cb | 91 | Хедери необхідні для програмування з tpm2-tss. |
16e3b58d AM |
92 | |
93 | %package static | |
94 | Summary: Static tpm2-tss library | |
95 | Summary(es.UTF-8): Biblioteca estática usada no desenvolvimento de aplicativos com tpm2-tss | |
96 | Summary(pl.UTF-8): Biblioteka statyczna tpm2-tss | |
97 | Summary(pt_BR.UTF-8): Biblioteca estática de desenvolvimento | |
98 | Summary(ru.UTF-8): Статическая библиотека tpm2-tss | |
99 | Summary(uk.UTF-8): Статична бібліотека tpm2-tss | |
100 | Group: Development/Libraries | |
5c0621cb | 101 | Requires: %{name}-devel = %{version}-%{release} |
16e3b58d AM |
102 | |
103 | %description static | |
104 | Implementation of the Trusted Computing Group's (TCG) TPM2 Software | |
105 | Stack (TSS). | |
106 | ||
107 | This package contains the static library used for development. | |
108 | ||
16e3b58d AM |
109 | %description static -l pl.UTF-8 |
110 | Biblioteka statyczna tpm2-tss. | |
111 | ||
112 | %description static -l ru.UTF-8 | |
113 | Статическая библиотека, необходимая для программирования с tpm2-tss. | |
114 | ||
115 | %description static -l uk.UTF-8 | |
116 | Статична бібліотека, необхідна для програмування з tpm2-tss. | |
117 | ||
118 | %prep | |
119 | %setup -q | |
1e0c40e2 | 120 | %{?with_libftdi1:%patch0 -p1} |
b12a6b16 JB |
121 | |
122 | # set VERSION properly when there is no .git directory | |
123 | %{__sed} -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/%{version}/' configure.ac | |
16e3b58d AM |
124 | |
125 | %build | |
5c0621cb JB |
126 | %{__libtoolize} |
127 | %{__aclocal} -I m4 | |
128 | %{__autoconf} | |
129 | %{__autoheader} | |
130 | %{__automake} | |
16e3b58d | 131 | %configure \ |
9cd971bd JB |
132 | systemd_sysusers=yes \ |
133 | systemd_tmpfiles=yes \ | |
16e3b58d | 134 | --disable-silent-rules \ |
6130439c | 135 | %{__enable_disable static_libs static} \ |
a73a4e92 | 136 | %{?with_mbedtls:--with-crypto=mbed} \ |
5c0621cb | 137 | --with-tmpfilesdir=%{systemdtmpfilesdir} \ |
16e3b58d AM |
138 | --with-udevrulesdir=/lib/udev/rules.d \ |
139 | --with-udevrulesprefix=60- | |
140 | ||
141 | %{__make} | |
142 | ||
143 | %install | |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %{__make} install \ | |
147 | DESTDIR=$RPM_BUILD_ROOT | |
148 | ||
5c0621cb JB |
149 | # obsoleted by pkg-config |
150 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtss2*.la | |
151 | ||
0dc87886 JB |
152 | # tss user home (shared with trousers) |
153 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/tpm | |
154 | ||
16e3b58d AM |
155 | %clean |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
0dc87886 JB |
158 | %pre |
159 | %groupadd -g 139 tss | |
160 | %useradd -u 139 -d %{_localstatedir}/lib/tpm -s /bin/false -c "TrouSerS user" -g tss tss | |
161 | ||
16e3b58d | 162 | %post -p /sbin/ldconfig |
0dc87886 JB |
163 | |
164 | %postun | |
165 | /sbin/ldconfig | |
166 | if [ "$1" = "0" ]; then | |
167 | %userremove tss | |
168 | %groupremove tss | |
169 | fi | |
16e3b58d AM |
170 | |
171 | %files | |
172 | %defattr(644,root,root,755) | |
9cd971bd | 173 | %doc AUTHORS CHANGELOG.md LICENSE MAINTAINERS.md README.md |
5c0621cb JB |
174 | %attr(755,root,root) %{_libdir}/libtss2-esys.so.*.*.* |
175 | %attr(755,root,root) %ghost %{_libdir}/libtss2-esys.so.0 | |
176 | %attr(755,root,root) %{_libdir}/libtss2-fapi.so.*.*.* | |
a73a4e92 | 177 | %attr(755,root,root) %ghost %{_libdir}/libtss2-fapi.so.1 |
5c0621cb JB |
178 | %attr(755,root,root) %{_libdir}/libtss2-mu.so.*.*.* |
179 | %attr(755,root,root) %ghost %{_libdir}/libtss2-mu.so.0 | |
9cd971bd JB |
180 | %attr(755,root,root) %{_libdir}/libtss2-policy.so.*.*.* |
181 | %attr(755,root,root) %ghost %{_libdir}/libtss2-policy.so.0 | |
5c0621cb JB |
182 | %attr(755,root,root) %{_libdir}/libtss2-rc.so.*.*.* |
183 | %attr(755,root,root) %ghost %{_libdir}/libtss2-rc.so.0 | |
184 | %attr(755,root,root) %{_libdir}/libtss2-sys.so.*.*.* | |
a73a4e92 JB |
185 | %attr(755,root,root) %ghost %{_libdir}/libtss2-sys.so.1 |
186 | %attr(755,root,root) %{_libdir}/libtss2-tcti-cmd.so.*.*.* | |
187 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-cmd.so.0 | |
5c0621cb JB |
188 | %attr(755,root,root) %{_libdir}/libtss2-tcti-device.so.*.*.* |
189 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-device.so.0 | |
9cd971bd JB |
190 | %attr(755,root,root) %{_libdir}/libtss2-tcti-i2c-ftdi.so.*.*.* |
191 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-i2c-ftdi.so.0 | |
192 | %attr(755,root,root) %{_libdir}/libtss2-tcti-i2c-helper.so.*.*.* | |
193 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-i2c-helper.so.0 | |
16e9c50e JB |
194 | %attr(755,root,root) %{_libdir}/libtss2-tcti-libtpms.so.*.*.* |
195 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-libtpms.so.0 | |
5c0621cb JB |
196 | %attr(755,root,root) %{_libdir}/libtss2-tcti-mssim.so.*.*.* |
197 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-mssim.so.0 | |
a7003d70 JB |
198 | %attr(755,root,root) %{_libdir}/libtss2-tcti-pcap.so.*.*.* |
199 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-pcap.so.0 | |
9cd971bd JB |
200 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spi-ftdi.so.*.*.* |
201 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-spi-ftdi.so.0 | |
202 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spi-helper.so.*.*.* | |
203 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-spi-helper.so.0 | |
204 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spi-ltt2go.so.*.*.* | |
205 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-spi-ltt2go.so.0 | |
206 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spidev.so.*.*.* | |
207 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-spidev.so.0 | |
a73a4e92 JB |
208 | %attr(755,root,root) %{_libdir}/libtss2-tcti-swtpm.so.*.*.* |
209 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-swtpm.so.0 | |
5c0621cb JB |
210 | %attr(755,root,root) %{_libdir}/libtss2-tctildr.so.*.*.* |
211 | %attr(755,root,root) %ghost %{_libdir}/libtss2-tctildr.so.0 | |
212 | %dir %{_sysconfdir}/tpm2-tss | |
213 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tpm2-tss/fapi-config.json | |
214 | %dir %{_sysconfdir}/tpm2-tss/fapi-profiles | |
215 | %{_sysconfdir}/tpm2-tss/fapi-profiles/P_ECCP256SHA256.json | |
9cd971bd | 216 | %{_sysconfdir}/tpm2-tss/fapi-profiles/P_ECCP384SHA384.json |
5c0621cb | 217 | %{_sysconfdir}/tpm2-tss/fapi-profiles/P_RSA2048SHA256.json |
9cd971bd | 218 | %{_sysconfdir}/tpm2-tss/fapi-profiles/P_RSA3072SHA384.json |
0dc87886 JB |
219 | # tss user home (shared with trousers) |
220 | %attr(700,tss,tss) %{_localstatedir}/lib/tpm | |
5c0621cb | 221 | %{systemdtmpfilesdir}/tpm2-tss-fapi.conf |
16e3b58d | 222 | /lib/udev/rules.d/60-tpm-udev.rules |
5c0621cb JB |
223 | # what subsystem handles this? |
224 | #/etc/sysusers.d/tpm2-tss.conf | |
9c57923c JB |
225 | %{_mandir}/man5/fapi-config.5* |
226 | %{_mandir}/man5/fapi-profile.5* | |
16e3b58d AM |
227 | |
228 | %files devel | |
229 | %defattr(644,root,root,755) | |
5c0621cb JB |
230 | %attr(755,root,root) %{_libdir}/libtss2-esys.so |
231 | %attr(755,root,root) %{_libdir}/libtss2-fapi.so | |
232 | %attr(755,root,root) %{_libdir}/libtss2-mu.so | |
9cd971bd | 233 | %attr(755,root,root) %{_libdir}/libtss2-policy.so |
5c0621cb JB |
234 | %attr(755,root,root) %{_libdir}/libtss2-rc.so |
235 | %attr(755,root,root) %{_libdir}/libtss2-sys.so | |
a73a4e92 | 236 | %attr(755,root,root) %{_libdir}/libtss2-tcti-cmd.so |
5c0621cb | 237 | %attr(755,root,root) %{_libdir}/libtss2-tcti-device.so |
9cd971bd JB |
238 | %attr(755,root,root) %{_libdir}/libtss2-tcti-i2c-ftdi.so |
239 | %attr(755,root,root) %{_libdir}/libtss2-tcti-i2c-helper.so | |
16e9c50e | 240 | %attr(755,root,root) %{_libdir}/libtss2-tcti-libtpms.so |
5c0621cb | 241 | %attr(755,root,root) %{_libdir}/libtss2-tcti-mssim.so |
a7003d70 | 242 | %attr(755,root,root) %{_libdir}/libtss2-tcti-pcap.so |
9cd971bd JB |
243 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spi-ftdi.so |
244 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spi-helper.so | |
245 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spi-ltt2go.so | |
246 | %attr(755,root,root) %{_libdir}/libtss2-tcti-spidev.so | |
a73a4e92 | 247 | %attr(755,root,root) %{_libdir}/libtss2-tcti-swtpm.so |
5c0621cb | 248 | %attr(755,root,root) %{_libdir}/libtss2-tctildr.so |
16e3b58d | 249 | %{_includedir}/tss2 |
5c0621cb JB |
250 | %{_pkgconfigdir}/tss2-esys.pc |
251 | %{_pkgconfigdir}/tss2-fapi.pc | |
252 | %{_pkgconfigdir}/tss2-mu.pc | |
9cd971bd | 253 | %{_pkgconfigdir}/tss2-policy.pc |
5c0621cb JB |
254 | %{_pkgconfigdir}/tss2-rc.pc |
255 | %{_pkgconfigdir}/tss2-sys.pc | |
a73a4e92 | 256 | %{_pkgconfigdir}/tss2-tcti-cmd.pc |
5c0621cb | 257 | %{_pkgconfigdir}/tss2-tcti-device.pc |
9cd971bd JB |
258 | %{_pkgconfigdir}/tss2-tcti-i2c-ftdi.pc |
259 | %{_pkgconfigdir}/tss2-tcti-i2c-helper.pc | |
16e9c50e | 260 | %{_pkgconfigdir}/tss2-tcti-libtpms.pc |
5c0621cb | 261 | %{_pkgconfigdir}/tss2-tcti-mssim.pc |
a7003d70 | 262 | %{_pkgconfigdir}/tss2-tcti-pcap.pc |
9cd971bd JB |
263 | %{_pkgconfigdir}/tss2-tcti-spi-ftdi.pc |
264 | %{_pkgconfigdir}/tss2-tcti-spi-helper.pc | |
265 | %{_pkgconfigdir}/tss2-tcti-spi-ltt2go.pc | |
266 | %{_pkgconfigdir}/tss2-tcti-spidev.pc | |
a73a4e92 | 267 | %{_pkgconfigdir}/tss2-tcti-swtpm.pc |
5c0621cb JB |
268 | %{_pkgconfigdir}/tss2-tctildr.pc |
269 | %{_mandir}/man3/ESYS_*.3* | |
270 | %{_mandir}/man3/Esys_*.3* | |
271 | %{_mandir}/man3/FapiTestgroup.3* | |
272 | %{_mandir}/man3/Fapi_*.3* | |
273 | %{_mandir}/man3/Tss2_*.3* | |
a73a4e92 | 274 | %{_mandir}/man7/tss2-tcti-cmd.7* |
5c0621cb | 275 | %{_mandir}/man7/tss2-tcti-device.7* |
9cd971bd JB |
276 | %{_mandir}/man7/tss2-tcti-i2c-ftdi.7* |
277 | %{_mandir}/man7/tss2-tcti-i2c-helper.7* | |
5c0621cb | 278 | %{_mandir}/man7/tss2-tcti-mssim.7* |
9cd971bd JB |
279 | %{_mandir}/man7/tss2-tcti-spi-ftdi.7* |
280 | %{_mandir}/man7/tss2-tcti-spi-helper.7* | |
281 | %{_mandir}/man7/tss2-tcti-spi-ltt2go.7* | |
282 | %{_mandir}/man7/tss2-tcti-spidev.7* | |
a73a4e92 | 283 | %{_mandir}/man7/tss2-tcti-swtpm.7* |
5c0621cb | 284 | %{_mandir}/man7/tss2-tctildr.7* |
16e3b58d | 285 | |
6130439c | 286 | %if %{with static_libs} |
16e3b58d AM |
287 | %files static |
288 | %defattr(644,root,root,755) | |
5c0621cb JB |
289 | %{_libdir}/libtss2-esys.a |
290 | %{_libdir}/libtss2-fapi.a | |
291 | %{_libdir}/libtss2-mu.a | |
9cd971bd | 292 | %{_libdir}/libtss2-policy.a |
5c0621cb JB |
293 | %{_libdir}/libtss2-rc.a |
294 | %{_libdir}/libtss2-sys.a | |
a73a4e92 | 295 | %{_libdir}/libtss2-tcti-cmd.a |
5c0621cb | 296 | %{_libdir}/libtss2-tcti-device.a |
9cd971bd JB |
297 | %{_libdir}/libtss2-tcti-i2c-ftdi.a |
298 | %{_libdir}/libtss2-tcti-i2c-helper.a | |
16e9c50e | 299 | %{_libdir}/libtss2-tcti-libtpms.a |
5c0621cb | 300 | %{_libdir}/libtss2-tcti-mssim.a |
a7003d70 | 301 | %{_libdir}/libtss2-tcti-pcap.a |
9cd971bd JB |
302 | %{_libdir}/libtss2-tcti-spi-ftdi.a |
303 | %{_libdir}/libtss2-tcti-spi-helper.a | |
304 | %{_libdir}/libtss2-tcti-spi-ltt2go.a | |
305 | %{_libdir}/libtss2-tcti-spidev.a | |
a73a4e92 | 306 | %{_libdir}/libtss2-tcti-swtpm.a |
5c0621cb | 307 | %{_libdir}/libtss2-tctildr.a |
6130439c | 308 | %endif |