File openssl-engine-tpm2.spec of Package openssl-engine-tpm2
%define realname tpm2-tss-engine
%define srcext tar.bz2
%define _opensslenginesdir %(pkg-config --variable=enginesdir libcrypto)
%define _bashcompletionsdir %(pkg-config --variable=completionsdir bash-completion)
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: openssl-engine-tpm2
Version: 0
Release: wiz%{?extraver:0.}1%{?dist}
License: BSD-3-Clause
Group: Productivity/Networking/Security
URL: https://github.com/tpm2-software/tpm2-tss-engine
Summary: OpenSSL Engine for TPM2 devices
# Install-time parameters
Provides: %{realname} = %{version}-%{release}
Obsoletes: %{realname} < %{version}-%{release}
# Build-time parameters
BuildRequires: autoconf automake libtool
BuildRequires: pkg-config >= 0.25
BuildRequires: pkgconfig(libcrypto) >= 1.0.2g
BuildRequires: pkgconfig(tss2-esys) >= 2.2.2
BuildRequires: pkgconfig(tss2-mu)
# manpages
BuildRequires: pandoc
# bash completion
BuildRequires: pkgconfig(bash-completion)
BuildRoot: %{_tmppath}/%{name}-root
Source: %{realname}-%{version}.%{srcext}
%description
The tpm2-tss-engine project implements a cryptographic engine for OpenSSL for
Trusted Platform Module (TPM 2.0) using the tpm2-tss software stack that follows
the Trusted Computing Groups (TCG) TPM Software Stack (TSS 2.0). It uses the
Enhanced System API (ESAPI) interface of the TSS 2.0 for downwards communication.
It supports RSA decryption and signatures as well as ECDSA signatures.
%prep
%setup -q -n %{realname}-%{version}%{?extraver}
if [ ! -x configure ]; then
autoreconf --force --install --sym
fi
%build
_CFLAGS='%{optflags} %{?gcc_lto}'
_LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-z,now -Wl,-z,relro %{?gcc_lto}'
%configure \
CFLAGS="$_CFLAGS" \
LDFLAGS="$_LDFLAGS"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc CONTRIBUTING.md LICENSE MAINTAINERS README.md openssl.conf.sample
%{_opensslenginesdir}/tpm2tss.so
%{_bashcompletionsdir}/*
%doc %{_mandir}/man1/*
%exclude %{_opensslenginesdir}/tpm2tss.la
%changelog