c51662b
Name:           tpm2-tss
c51662b
Version:        1.0 
c51662b
Release:        2%{?dist}
c51662b
Summary:        TPM2.0 Software Stack
c51662b
c51662b
%global  pkg_prefix  TPM2.0-TSS
c51662b
c51662b
# The entire source code is under BSD except implementation.h and tpmb.h which
c51662b
# is under TCGL(Trusted Computing Group License).
c51662b
License:        BSD and TCGL
c51662b
URL:            https://github.com/01org/TPM2.0-TSS
c51662b
Source0:        https://github.com/01org/TPM2.0-TSS/archive/%{version}.tar.gz#/%{pkg_prefix}-%{version}.tar.gz
c51662b
c51662b
BuildRequires:  gcc
c51662b
BuildRequires:  gcc-c++
c51662b
BuildRequires:  autoconf-archive
c51662b
BuildRequires:  libtool
c51662b
BuildRequires:  pkgconfig
c51662b
c51662b
# this package does not support big endian arch so far,
c51662b
# and has been verified only on Intel platforms.
c51662b
ExclusiveArch: %{ix86} x86_64
c51662b
c51662b
%description
c51662b
tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
c51662b
APIs. It sits between TPM driver and applications, providing TPM2.0 specified
c51662b
APIs for applications to access TPM module through kernel TPM drivers.
c51662b
c51662b
%prep
c51662b
%autosetup -n %{pkg_prefix}-%{version} 
c51662b
./bootstrap
c51662b
c51662b
c51662b
%build
c51662b
%configure  --disable-static --disable-silent-rules
c51662b
%make_build
c51662b
c51662b
%install
c51662b
%make_install
c51662b
find %{buildroot}%{_libdir} -type f -name \*.la -delete
c51662b
c51662b
%files
c51662b
%doc README.md CHANGELOG.md 
c51662b
%license LICENSE
c51662b
%{_libdir}/libsapi.so.*
c51662b
%{_libdir}/libtcti-device.so.*
c51662b
%{_libdir}/libtcti-socket.so.*
c51662b
%{_sbindir}/resourcemgr
c51662b
c51662b
c51662b
%package        devel
c51662b
Summary:        Headers and libraries for building apps that use tpm2-tss 
c51662b
Requires:       %{name}%{_isa} = %{version}-%{release}
c51662b
c51662b
%description    devel
c51662b
This package contains headers and libraries required to build applications that
c51662b
use tpm2-tss.
c51662b
c51662b
%files devel
c51662b
%{_includedir}/sapi/
c51662b
%{_includedir}/tcti/
c51662b
%{_libdir}/libsapi.so
c51662b
%{_libdir}/libtcti-device.so
c51662b
%{_libdir}/libtcti-socket.so
c51662b
%{_libdir}/pkgconfig/sapi.pc
c51662b
%{_libdir}/pkgconfig/tcti-device.pc
c51662b
%{_libdir}/pkgconfig/tcti-socket.pc
c51662b
c51662b
%post -p /sbin/ldconfig
c51662b
c51662b
%postun -p /sbin/ldconfig
c51662b
c51662b
%changelog
c51662b
* Mon Dec 12 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-2
c51662b
- Remove global macro pkg_version to avoid duplicate of version
c51662b
- Use ExclusiveArch instead of ExcludeArch
c51662b
- Use less wildcard in %files section to be more specific
c51662b
- Add trailing slash at end of added directory in %file section
c51662b
- Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires
c51662b
- Increase release version to 2
c51662b
c51662b
* Fri Dec 2 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-1
c51662b
- Initial version of the package