]> git.pld-linux.org Git - packages/tpm2-pkcs11.git/blame - tpm2-pkcs11.spec
- updated to 1.9.0
[packages/tpm2-pkcs11.git] / tpm2-pkcs11.spec
CommitLineData
d5986b4b
JB
1#
2# Conditional build:
3%bcond_without python # CPython 3.x module and tpm2_ptool
4%bcond_with tests # unit/integration tests
5
74e99771
JB
6Summary: PKCS#11 interface for TPM2 hardware
7Summary(pl.UTF-8): Interfejs PKCS#11 do układów TPM2
d5986b4b 8Name: tpm2-pkcs11
642f4677 9Version: 1.9.0
d5986b4b
JB
10Release: 1
11License: BSD
12Group: Libraries
13#Source0Download: https://github.com/tpm2-software/tpm2-pkcs11/releases
14Source0: https://github.com/tpm2-software/tpm2-pkcs11/releases/download/%{version}/%{name}-%{version}.tar.gz
642f4677 15# Source0-md5: 94cc9e2795b7781f54e4a90480b4b868
d5986b4b
JB
16Patch0: %{name}-ac.patch
17URL: https://github.com/tpm2-software/tpm2-pkcs11
18BuildRequires: autoconf >= 2.50
19BuildRequires: automake
20BuildRequires: libtool
21BuildRequires: openssl-devel >= 1.1.0
22BuildRequires: p11-kit-devel
23BuildRequires: pkgconfig
24BuildRequires: sed >= 4.0
25BuildRequires: sqlite3-devel >= 3
26BuildRequires: tpm2-tss-devel >= 3.2
27BuildRequires: yaml-devel
28%if %{with python}
29BuildRequires: python3 >= 1:3.7
30BuildRequires: python3-setuptools
31%endif
32%if %{with tests}
33BuildRequires: expect
34# p11tool
35BuildRequires: gnutls
36# ss
37BuildRequires: iproute2
38BuildRequires: jdk
39# certutil, modutil
40BuildRequires: nss-tools
41# pkcs11-tool
42BuildRequires: opensc
43BuildRequires: sqlite3
44# or ibmswtpm2
45BuildRequires: swtpm
46BuildRequires: tpm2-tools
47BuildRequires: tpm2-abrmd
48# tpm2tss-genkey, tss2_provision
49%endif
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
74e99771
JB
53PKCS#11 is a Public-Key Cryptography Standard that defines a standard
54method to access cryptographic services from tokens/devices such as
55hardware security modules (HSM), smart cards, etc. This project is
56intended to use a TPM2 device as the cryptographic token.
d5986b4b
JB
57
58%description -l pl.UTF-8
74e99771
JB
59PKCS#11 (Public-Key Cryptography Standard #11) to standard
60kryptograficzny klucza publicznego, definiujący standardowy sposób
61dostępu do usług kryptograficznych tokenów/urządzeń takich jak
62sprzętowe moduły bezpieczeństwa (HSM, Hardware Security Modules),
63kart procesorowych itp. Ten projekt ma na celu używanie układów TPM2
64jako tokenów kryptograficznych.
d5986b4b
JB
65
66%package devel
74e99771
JB
67Summary: Header files for tpm2-pkcs11 library
68Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tpm2-pkcs11
d5986b4b
JB
69Group: Development/Libraries
70Requires: %{name} = %{version}-%{release}
71Requires: openssl-devel
72Requires: tpm2-tss-devel
73
74%description devel
74e99771 75Header files for PKCS#11 interface for TPM2 hardware.
d5986b4b
JB
76
77%description devel -l pl.UTF-8
74e99771 78Pliki nagłówkowe interfejsu PKCS#11 do układów TPM2.
d5986b4b
JB
79
80%package -n python3-tpm2-pkcs11
81Summary: Command line tools for the TPM2.0 PKCS11 module
82Summary(pl.UTF-8): Narzędzia linii poleceń do modułu PKCS11 TPM2.0
83Group: Libraries/Python
84Requires: %{name} = %{version}-%{release}
85
86%description -n python3-tpm2-pkcs11
87This tool is used to configure and manipulate stores for the
88tpm2-pkcs11 cryptographic library.
89
90%description -n python3-tpm2-pkcs11 -l pl.UTF-8
91To narzędzie służy do konfiguracji i operowania na danych
92przechowywanych przez bibliotekę kryptograficzną tpm2-pkcs11.
93
94%prep
95%setup -q
96%patch0 -p1
97
98# set VERSION properly when there is no .git directory
99%{__sed} -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/%{version}/' configure.ac
100
101%build
102%{__libtoolize}
103%{__aclocal} -I m4
104%{__autoconf}
105%{__autoheader}
106%{__automake}
107%configure \
108 %{?with_tests:--enable-integration} \
109 --disable-ptool-checks \
110 --disable-silent-rules
111 %{?with_tests:--enable-unit}
112
113%{__make}
114
115%if %{with tests}
116%{__make} check
117%endif
118
119%if %{with python}
120cd tools
121%py3_build
122%endif
123
124%install
125rm -rf $RPM_BUILD_ROOT
126
127%{__make} install \
128 DESTDIR=$RPM_BUILD_ROOT
129
130# obsoleted by pkg-config
131%{__rm} $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la
132
133%if %{with python}
134cd tools
135%py3_install
136%endif
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%files
142%defattr(644,root,root,755)
143%doc AUTHORS LICENSE docs/{ARCHITECTURE,DB_UPGRADE,EAP-TLS,FAPI,INITIALIZING,INTEROPERABILITY,OPENSSL,OPENVPN,P11,PKCS11_TOOL,README,SSH,SSH_HOSTKEYS,tpm2-pkcs11_object_auth_model}.md
144%attr(755,root,root) %{_libdir}/pkcs11/libtpm2_pkcs11.so.*
145%{_datadir}/p11-kit/modules/tpm2_pkcs11.module
146
147%files devel
148%defattr(644,root,root,755)
149%attr(755,root,root) %{_libdir}/pkcs11/libtpm2_pkcs11.so
150%{_pkgconfigdir}/tpm2-pkcs11.pc
151
152%files -n python3-tpm2-pkcs11
153%defattr(644,root,root,755)
154%attr(755,root,root) %{_bindir}/tpm2_ptool
155%{py3_sitescriptdir}/tpm2_pkcs11
156%{py3_sitescriptdir}/tpm2_pkcs11_tools-1.33.7-py*.egg-info
This page took 0.108527 seconds and 4 git commands to generate.