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