From 459c032e1b89713b99108e16fc05c12eb879fe56779f6dab12dc100847807963 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 21 Aug 2021 13:38:43 +0000 Subject: [PATCH] Accepting request 913462 from home:gmbr3:Active - Build and install python tools OBS-URL: https://build.opensuse.org/request/show/913462 OBS-URL: https://build.opensuse.org/package/show/security/tpm2-pkcs11?expand=0&rev=5 --- tpm2-pkcs11.changes | 5 +++++ tpm2-pkcs11.spec | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tpm2-pkcs11.changes b/tpm2-pkcs11.changes index a11961a..9c652b5 100644 --- a/tpm2-pkcs11.changes +++ b/tpm2-pkcs11.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Aug 21 13:32:30 UTC 2021 - Callum Farmer + +- Build and install python tools + ------------------------------------------------------------------- Fri Aug 20 17:59:05 UTC 2021 - Callum Farmer diff --git a/tpm2-pkcs11.spec b/tpm2-pkcs11.spec index 2756b09..230edd6 100644 --- a/tpm2-pkcs11.spec +++ b/tpm2-pkcs11.spec @@ -17,6 +17,7 @@ %define so_ver 0 +%define pythons python3 Name: tpm2-pkcs11 Version: 1.6.0 Release: 0 @@ -31,6 +32,9 @@ BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: tpm2.0-tools +BuildRequires: python3-base +BuildRequires: python3-setuptools +BuildRequires: fdupes BuildRequires: pkgconfig(libcrypto) >= 1.0.2g BuildRequires: pkgconfig(p11-kit-1) BuildRequires: pkgconfig(sqlite3) @@ -39,6 +43,8 @@ BuildRequires: pkgconfig(tss2-mu) BuildRequires: pkgconfig(tss2-rc) BuildRequires: pkgconfig(tss2-tctildr) BuildRequires: pkgconfig(yaml-0.1) +BuildRequires: python-rpm-generators +%{?python_enable_dependency_generator} %description PKCS #11 is a Public-Key Cryptography Standard that defines a standard method to @@ -66,6 +72,7 @@ Provides: libtpm2_pkcs11-devel = %{version}-%{release} %description devel Headers and libraries to build software against %{name}. + %prep %autosetup @@ -73,22 +80,30 @@ Headers and libraries to build software against %{name}. autoreconf -fiv %configure --disable-static %make_build +cd tools +%python_build %install %make_install find %{buildroot} -type f -name "*.la" -delete -print mkdir -p %{buildroot}%{_sysconfdir}/tpm2_pkcs11 +cd tools +%python_install +%fdupes -s %{buildroot} %post -n libtpm2_pkcs11-0 -p /sbin/ldconfig %postun -n libtpm2_pkcs11-0 -p /sbin/ldconfig %files %license LICENSE -%doc CHANGELOG.md docs/* +%doc docs/* %dir %{_datadir}/p11-kit/modules %dir %{_datadir}/p11-kit %{_datadir}/p11-kit/modules/tpm2_pkcs11.module %{_sysconfdir}/tpm2_pkcs11 +%{_bindir}/tpm2_ptool +%{python_sitelib}/tpm2_pkcs11 +%{python_sitelib}/*.egg-info %files -n libtpm2_pkcs11-0 %dir %{_libdir}/pkcs11