Blame tpm2-tss.spec

Yunying Sun c51662
Name:           tpm2-tss
Yunying Sun a4c7fc
Version:        2.0.0
Javier Martinez Canillas acc3bc
Release:        1%{?dist}
Yunying Sun c51662
Summary:        TPM2.0 Software Stack
Yunying Sun c51662
Yunying Sun c51662
# The entire source code is under BSD except implementation.h and tpmb.h which
Yunying Sun c51662
# is under TCGL(Trusted Computing Group License).
Yunying Sun c51662
License:        BSD and TCGL
Javier Martinez Canillas acc3bc
URL:            https://github.com/tpm2-software/tpm2-tss
Javier Martinez Canillas acc3bc
Source0:        https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz
Yunying Sun c51662
Yunying Sun a4c7fc
%global udevrules_prefix 60-
Javier Martinez Canillas 075fc2
Yunying Sun c51662
BuildRequires:  gcc
Yunying Sun c51662
BuildRequires:  gcc-c++
Yunying Sun c51662
BuildRequires:  autoconf-archive
Yunying Sun c51662
BuildRequires:  libtool
Yunying Sun c51662
BuildRequires:  pkgconfig
Javier Martinez Canillas 075fc2
BuildRequires:  systemd
Yunying Sun c51662
Yunying Sun c51662
%description
Yunying Sun c51662
tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
Yunying Sun c51662
APIs. It sits between TPM driver and applications, providing TPM2.0 specified
Yunying Sun c51662
APIs for applications to access TPM module through kernel TPM drivers.
Yunying Sun c51662
Yunying Sun c51662
%prep
Javier Martinez Canillas 4eb5a0
%autosetup -n %{name}-%{version}
Yunying Sun c51662
Yunying Sun c51662
%build
Yunying Sun a4c7fc
# ESAPI, which was added in TSS 2.0 uses gcry_mac_open() from libgcrypt 1.6. 
Yunying Sun a4c7fc
# However latest libgcrypt available for RHEL7 is 1.5.3, which leads to TSS2.0
Yunying Sun a4c7fc
#  build failure. So here disable esapi support to make TSS2.0 work.
Yunying Sun a4c7fc
%configure --disable-static --disable-silent-rules --enable-esapi=no --with-udevrulesdir=%{_udevrulesdir} --with-udevrulesprefix=%{udevrules_prefix}
Yunying Sun a4c7fc
Yunying Sun a4c7fc
# This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
Yunying Sun a4c7fc
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
Yunying Sun a4c7fc
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
Yunying Sun a4c7fc
Yunying Sun c51662
%make_build
Yunying Sun c51662
Yunying Sun c51662
%install
Yunying Sun c51662
%make_install
Yunying Sun c51662
find %{buildroot}%{_libdir} -type f -name \*.la -delete
Yunying Sun c51662
Yunying Sun c51662
%files
Javier Martinez Canillas acc3bc
%doc README.md CHANGELOG.md
Yunying Sun c51662
%license LICENSE
Yunying Sun a4c7fc
%{_libdir}/libtss2-mu.so.*
Yunying Sun a4c7fc
%{_libdir}/libtss2-sys.so.*
Yunying Sun a4c7fc
%{_libdir}/libtss2-tcti-device.so.*
Yunying Sun a4c7fc
%{_libdir}/libtss2-tcti-mssim.so.*
Yunying Sun a4c7fc
%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules
Yunying Sun c51662
Yunying Sun c51662
Yunying Sun c51662
%package        devel
Yunying Sun c51662
Summary:        Headers and libraries for building apps that use tpm2-tss 
Yunying Sun c51662
Requires:       %{name}%{_isa} = %{version}-%{release}
Yunying Sun c51662
Yunying Sun c51662
%description    devel
Yunying Sun c51662
This package contains headers and libraries required to build applications that
Yunying Sun c51662
use tpm2-tss.
Yunying Sun c51662
Yunying Sun c51662
%files devel
Yunying Sun a4c7fc
%{_includedir}/tss2/
Yunying Sun a4c7fc
%{_libdir}/libtss2-mu.so
Yunying Sun a4c7fc
%{_libdir}/libtss2-sys.so
Yunying Sun a4c7fc
%{_libdir}/libtss2-tcti-device.so
Yunying Sun a4c7fc
%{_libdir}/libtss2-tcti-mssim.so
Yunying Sun a4c7fc
%{_libdir}/pkgconfig/tss2-mu.pc
Yunying Sun a4c7fc
%{_libdir}/pkgconfig/tss2-sys.pc
Yunying Sun a4c7fc
%{_libdir}/pkgconfig/tss2-tcti-device.pc
Yunying Sun a4c7fc
%{_libdir}/pkgconfig/tss2-tcti-mssim.pc
Yunying Sun a4c7fc
%{_mandir}/man3/Tss2*.3.gz
Yunying Sun a4c7fc
%{_mandir}/man7/tss2*.7.gz
Yunying Sun c51662
Yunying Sun c51662
%post -p /sbin/ldconfig
Yunying Sun c51662
Yunying Sun c51662
%postun -p /sbin/ldconfig
Yunying Sun c51662
Yunying Sun c51662
%changelog
Yunying Sun a4c7fc
* Mon Jul 2 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-1
Yunying Sun a4c7fc
- Update to 2.0.0 release (RHBZ#1508870)
Yunying Sun a4c7fc
- Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead
Yunying Sun a4c7fc
- Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0
Yunying Sun a4c7fc
- Add scriptlet to fix Rpath errors
Yunying Sun a4c7fc
- Update file installation paths and names accordingly 
Yunying Sun a4c7fc
Javier Martinez Canillas acc3bc
* Sun Mar 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.4.0-1
Javier Martinez Canillas acc3bc
- Update URLs to point to the new project location
Javier Martinez Canillas acc3bc
- Add README.md CHANGELOG.md to %%files directive
Javier Martinez Canillas acc3bc
- Update to 1.4.0 release (RHBZ#1508870)
Javier Martinez Canillas acc3bc
Javier Martinez Canillas 075fc2
* Fri Feb 23 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-4
Javier Martinez Canillas 075fc2
- Install udev rule for TPM character devices
Javier Martinez Canillas 075fc2
Javier Martinez Canillas 0c0c82
* Wed Feb 21 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-3
Javier Martinez Canillas f61696
- Remove ExclusiveArch: %%{ix86} x86_64 directive
Javier Martinez Canillas 0c0c82
Igor Gnatenko f770b5
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.0-2
Igor Gnatenko f770b5
- Escape macros in %%changelog
Igor Gnatenko f770b5
Javier Martinez Canillas 4eb5a0
* Fri Dec 08 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-1
Javier Martinez Canillas 4eb5a0
- Update to 1.3.0 release
Javier Martinez Canillas 4eb5a0
Javier Martinez Canillas f27ddf
* Wed Nov 29 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-0.1.rc2
Javier Martinez Canillas f27ddf
- Update to 1.3.0 release candidate 2 (RHBZ#1508870)
Javier Martinez Canillas f27ddf
- Remove global pkg_prefix since now the upstream repo and package names match
Javier Martinez Canillas f27ddf
- Update URLs to point to the new project location
Javier Martinez Canillas f27ddf
- Remove -Wno-int-in-bool-context compiler flag since now upstream takes care
Igor Gnatenko f770b5
- Remove %%doc directive since README.md and CHANGELOG.md are not in the tarball
Javier Martinez Canillas f27ddf
- Add patch to include a LICENSE since the generated tarball does not have it
Javier Martinez Canillas f27ddf
Javier Martinez Canillas 9eff27
* Mon Aug 28 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.2.0-1
Javier Martinez Canillas 9eff27
- Update to 1.2.0 release
Javier Martinez Canillas 9eff27
- Use tpm2-tss instead of TPM2.0-TSS as prefix since project name changed
Javier Martinez Canillas 9eff27
- Fix SPEC file access mode
Igor Gnatenko f770b5
- Include new man pages in %%files directive
Javier Martinez Canillas 9eff27
Javier Martinez Canillas 763ff1
* Fri Aug 18 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-3
Javier Martinez Canillas 763ff1
- Remove unneeded source tarballs (RHBZ#1482828)
Javier Martinez Canillas 763ff1
Fedora Release Engineering fe63e0
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
Fedora Release Engineering fe63e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
Fedora Release Engineering fe63e0
Yunying Sun e60c57
* Wed Jul 26 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-1
Yunying Sun e60c57
- Update to 1.1.0 release
Yunying Sun e60c57
Fedora Release Engineering ba9e00
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
Fedora Release Engineering ba9e00
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
Fedora Release Engineering ba9e00
Yunying Sun c51662
* Mon Dec 12 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-2
Yunying Sun c51662
- Remove global macro pkg_version to avoid duplicate of version
Yunying Sun c51662
- Use ExclusiveArch instead of ExcludeArch
Igor Gnatenko f770b5
- Use less wildcard in %%files section to be more specific
Igor Gnatenko f770b5
- Add trailing slash at end of added directory in %%file section
Yunying Sun c51662
- Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires
Yunying Sun c51662
- Increase release version to 2
Yunying Sun c51662
Yunying Sun c51662
* Fri Dec 2 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-1
Yunying Sun c51662
- Initial version of the package