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
URL:		http://sourceforge.net/projects/ibmtpm20tss/
Source0:	%{name}_%{version}.orig.tar.gz

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

BuildRequires: openssl-devel

%description
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

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

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

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

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

%files
%doc LICENSE ibmtpm.doc
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by