File tpm2.0-tools.spec of Package tpm2.0-tools

#
# spec file for package tpm-tools
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           tpm2.0-tools
Version:        1.0.1
Release:        0
Summary:        Trusted Platform Module (TPM) 2.0 administration tools
License:        BSD-3-Clause
Group:          Productivity/Security
Url:            http://trousers.sourceforge.net/
Source0:        https://github.com/01org/tpm2.0-tools/archive/v%{version}.zip
# https://github.com/01org/TPM2.0-TSS ... 
Source1:	https://github.com/01org/TPM2.0-TSS/archive/1.0-alpha_0.zip
Patch0:		tpm2-install-binaries.patch
BuildRequires:  unzip
BuildRequires:  gcc-c++
BuildRequires:  autoconf-archive
BuildRequires:  automake
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Trusted Computing is a set of specifications published by the Trusted
Computing Group (TCG). The Trusted Platform Module (TPM) is the
hardware component for Trusted Computing. The tpm-tools package
provides tools for enablement and configuration of the TPM and
associated interfaces. Also look inside the trousers package for more
software for TC.

%prep
%setup -q
%patch0 -p1

# embedded tss copy for now
unzip %{SOURCE1}
mv  TPM2.0-TSS-1.0-alpha_0 tss

%build
cd tss
bash ./bootstrap
CFLAGS="$RPM_OPT_FLAGS" ./configure
make %{?_smp_mflags}
cd ..
aclocal
autoconf
automake --add-missing
%configure --disable-static
make %{?_smp_mflags}

%check
make %{?_smp_mflags} check

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print

%files
%defattr(-,root,root)
%doc README.md manual LICENSE
/usr/sbin/tpm2_*

%changelog
openSUSE Build Service is sponsored by