3 %bcond_without python # CPython 3.x module and tpm2_ptool
4 %bcond_with tests # unit/integration tests
6 Summary: PKCS#11 interface for TPM2 hardware
7 Summary(pl.UTF-8): Interfejs PKCS#11 do układów TPM2
13 #Source0Download: https://github.com/tpm2-software/tpm2-pkcs11/releases
14 Source0: https://github.com/tpm2-software/tpm2-pkcs11/releases/download/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 94cc9e2795b7781f54e4a90480b4b868
16 Patch0: %{name}-ac.patch
17 URL: https://github.com/tpm2-software/tpm2-pkcs11
18 BuildRequires: autoconf >= 2.50
19 BuildRequires: automake
20 BuildRequires: libtool
21 BuildRequires: openssl-devel >= 1.1.0
22 BuildRequires: p11-kit-devel
23 BuildRequires: pkgconfig
24 BuildRequires: sed >= 4.0
25 BuildRequires: sqlite3-devel >= 3
26 BuildRequires: tpm2-tss-devel >= 3.2
27 BuildRequires: yaml-devel
29 BuildRequires: python3 >= 1:3.7
30 BuildRequires: python3-setuptools
37 BuildRequires: iproute2
40 BuildRequires: nss-tools
43 BuildRequires: sqlite3
46 BuildRequires: tpm2-tools
47 BuildRequires: tpm2-abrmd
48 # tpm2tss-genkey, tss2_provision
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 PKCS#11 is a Public-Key Cryptography Standard that defines a standard
54 method to access cryptographic services from tokens/devices such as
55 hardware security modules (HSM), smart cards, etc. This project is
56 intended to use a TPM2 device as the cryptographic token.
58 %description -l pl.UTF-8
59 PKCS#11 (Public-Key Cryptography Standard #11) to standard
60 kryptograficzny klucza publicznego, definiujący standardowy sposób
61 dostępu do usług kryptograficznych tokenów/urządzeń takich jak
62 sprzętowe moduły bezpieczeństwa (HSM, Hardware Security Modules),
63 kart procesorowych itp. Ten projekt ma na celu używanie układów TPM2
64 jako tokenów kryptograficznych.
67 Summary: Header files for tpm2-pkcs11 library
68 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tpm2-pkcs11
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
71 Requires: openssl-devel
72 Requires: tpm2-tss-devel
75 Header files for PKCS#11 interface for TPM2 hardware.
77 %description devel -l pl.UTF-8
78 Pliki nagłówkowe interfejsu PKCS#11 do układów TPM2.
80 %package -n python3-tpm2-pkcs11
81 Summary: Command line tools for the TPM2.0 PKCS11 module
82 Summary(pl.UTF-8): Narzędzia linii poleceń do modułu PKCS11 TPM2.0
83 Group: Libraries/Python
84 Requires: %{name} = %{version}-%{release}
86 %description -n python3-tpm2-pkcs11
87 This tool is used to configure and manipulate stores for the
88 tpm2-pkcs11 cryptographic library.
90 %description -n python3-tpm2-pkcs11 -l pl.UTF-8
91 To narzędzie służy do konfiguracji i operowania na danych
92 przechowywanych przez bibliotekę kryptograficzną tpm2-pkcs11.
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
108 %{?with_tests:--enable-integration} \
109 --disable-ptool-checks \
110 --disable-silent-rules
111 %{?with_tests:--enable-unit}
125 rm -rf $RPM_BUILD_ROOT
128 DESTDIR=$RPM_BUILD_ROOT
130 # obsoleted by pkg-config
131 %{__rm} $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la
139 rm -rf $RPM_BUILD_ROOT
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
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/pkcs11/libtpm2_pkcs11.so
150 %{_pkgconfigdir}/tpm2-pkcs11.pc
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