]> git.pld-linux.org Git - packages/tpm2-tss.git/blame - tpm2-tss.spec
- add tss user/group; release 2
[packages/tpm2-tss.git] / tpm2-tss.spec
CommitLineData
5c0621cb
JB
1#
2# Conditional build:
a73a4e92 3%bcond_with mbedtls # mbedTLS crypto instead of OpenSSL
5c0621cb 4
16e3b58d 5Summary: OSS implementation of the TCG TPM2 Software Stack (TSS2)
5c0621cb 6Summary(pl.UTF-8): Mająca otwarte źródła implementacja TCG TPM2 Software Stack (TSS2)
16e3b58d 7Name: tpm2-tss
b12a6b16 8Version: 3.2.0
0dc87886 9Release: 2
16e3b58d
AM
10License: BSD
11Group: Libraries
5c0621cb 12#Source0Download: https://github.com/tpm2-software/tpm2-tss/releases
16e3b58d 13Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz
b12a6b16 14# Source0-md5: 0d60d0df3fd0daae66881a3022281323
5edc37b9 15Patch0: %{name}-install.patch
16e9c50e
JB
16Patch1: %{name}-missing.patch
17Patch2: %{name}-link.patch
16e3b58d 18URL: https://github.com/tpm2-software/tpm2-tss
5c0621cb
JB
19BuildRequires: autoconf >= 2.50
20BuildRequires: automake
21BuildRequires: curl-devel
16e3b58d 22BuildRequires: doxygen
5c0621cb 23BuildRequires: json-c-devel
b12a6b16 24BuildRequires: libltdl-devel >= 2:2
5c0621cb 25BuildRequires: libtool >= 2:2
16e9c50e 26BuildRequires: libtpms-devel
a73a4e92 27%{?with_mbedtls:BuildRequires: mbedtls-devel}
b12a6b16 28%{!?with_mbedtls:BuildRequires: openssl-devel >= 1.1.0}
5c0621cb 29BuildRequires: pkgconfig
b12a6b16 30BuildRequires: sed >= 4.0
0dc87886
JB
31Requires(pre): /bin/id
32Requires(pre): /usr/bin/getgid
33Requires(pre): /usr/sbin/groupadd
34Requires(pre): /usr/sbin/useradd
35Requires(postun): /usr/sbin/groupdel
36Requires(postun): /usr/sbin/userdel
37Provides: group(tss)
38Provides: user(tss)
16e3b58d
AM
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%description
42Implementation of the Trusted Computing Group's (TCG) TPM2 Software
43Stack (TSS).
44
5c0621cb
JB
45%description -l pl.UTF-8
46Implementacja specyfikacji TPM2 Software Stack (TSS), stworzonej przez
47Trusted Computing Group (TCG).
48
16e3b58d 49%package devel
5c0621cb
JB
50Summary: Header files for tpm2-tss
51Summary(es.UTF-8): Arquivos de cabeçalho para tpm2-tss
52Summary(pl.UTF-8): Pliki nagłówkowe do tpm2-tss
53Summary(pt_BR.UTF-8): Arquivos de inclusão para a tpm2-tss
54Summary(ru.UTF-8): Хедеры для tpm2-tss
55Summary(uk.UTF-8): Хедери для tpm2-tss
16e3b58d 56Group: Development/Libraries
5c0621cb
JB
57Requires: %{name} = %{version}-%{release}
58Requires: curl-devel
59Requires: 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
64Header files for implementation of the Trusted Computing Group's (TCG)
65TPM2 Software Stack (TSS).
16e3b58d
AM
66
67%description devel -l pl.UTF-8
5c0621cb
JB
68Pliki nagłówkowe implementacji Trusted Computing Group (TCG) TPM2
69Software 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
78Summary: Static tpm2-tss library
79Summary(es.UTF-8): Biblioteca estática usada no desenvolvimento de aplicativos com tpm2-tss
80Summary(pl.UTF-8): Biblioteka statyczna tpm2-tss
81Summary(pt_BR.UTF-8): Biblioteca estática de desenvolvimento
82Summary(ru.UTF-8): Статическая библиотека tpm2-tss
83Summary(uk.UTF-8): Статична бібліотека tpm2-tss
84Group: Development/Libraries
5c0621cb 85Requires: %{name}-devel = %{version}-%{release}
16e3b58d
AM
86
87%description static
88Implementation of the Trusted Computing Group's (TCG) TPM2 Software
89Stack (TSS).
90
91This package contains the static library used for development.
92
16e3b58d
AM
93%description static -l pl.UTF-8
94Biblioteka 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
127rm -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)
136install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/tpm
137
16e3b58d
AM
138%clean
139rm -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
149if [ "$1" = "0" ]; then
150 %userremove tss
151 %groupremove tss
152fi
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
This page took 0.104868 seconds and 4 git commands to generate.