File swtpm2.spec of Package swtpm2

# Spec file for IBM's TSS for the TPM 2.0
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}

Name:		swtpm2
Version:	1332
Release:	0
Summary:	Software implementation of TPM2

Group:		Applications/System	
License:	BSD-2-Clause
Source0:	%{name}_%{version}.orig.tar.gz

Patch1:		0001-Add-big-endian-detection.patch

BuildRequires: openssl-devel

TPM2 is usually a hardware component.  This package is a full emulator that
allows the development of TPM2 applications in the absence of hardware.

To use with the IBM tss2:

export TPM_INTERFACE_TYPE=socsim

%setup -q
%setup -T -D
%patch1 -p1

# nonstandard variable names are used in place of CFLAGS and LDFLAGS
pushd src

# direct copy from src/Makefile (check if you update source)

# Prefix for namespacing
mkdir -p %{buildroot}/%{_bindir}
cp src/tpm_server %{buildroot}/%{_bindir}

%doc LICENSE ibmtpm.doc

openSUSE Build Service is sponsored by