diff --git a/.gitignore b/.gitignore index e69de29..ba42ed4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ibmtss713withman.tar diff --git a/sources b/sources index e69de29..7de64c9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b1b99c1d79cbc5e9191312e54eda39a6 ibmtss713withman.tar diff --git a/tss2.spec b/tss2.spec new file mode 100644 index 0000000..8660f88 --- /dev/null +++ b/tss2.spec @@ -0,0 +1,119 @@ +# +# Spec file for IBM's TSS for the TPM 2.0 +# +%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} + +Name: tss2 +Version: 713 +Release: 7%{?dist} +Summary: IBM's TCG Software Stack (TSS) for TPM 2.0 and related utilities + +Group: Applications/System +License: BSD +URL: http://sourceforge.net/projects/ibmtpm20tss/ +Source0: https://sourceforge.net/projects/ibmtpm20tss/files/NotForUsers_FedoraSourceRpm/ibmtss%{version}withman.tar + +# tss2 does not work on Big Endian arch yet +ExcludeArch: ppc64 s390x +BuildRequires: openssl-devel +Requires: openssl + +%description +TSS2 is a user space Trusted Computing Group's Software Stack (TSS) for +TPM 2.0. It implements the functionality equivalent to the TCG TSS +working group's ESAPI, SAPI, and TCTI layers (and perhaps more) but with +a hopefully far simpler interface. + +It comes with about 80 "TPM tools" that can be used for rapid prototyping, +education and debugging. + +%package devel +Summary: Development libraries and headers for IBM's TSS 2.0 +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development libraries and headers for IBM's TSS 2.0. You will need this in +order to build TSS 2.0 applications. + +%prep +%setup -q -c %{name}-%{version} + +%build +# nonstandard variable names are used in place of CFLAGS and LDFLAGS +pushd utils +CCFLAGS="%{optflags}" \ +LNFLAGS="%{__global_ldflags}" \ +make -f makefile.fedora %{?_smp_mflags} +popd + +%install +# Prefix for namespacing +BIN_PREFIX=tss +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_libdir} +mkdir -p %{buildroot}/%{_includedir}/%{name}/ +mkdir -p %{buildroot}/%{_mandir}/man1 +pushd utils +# Pick out executables and copy with namespacing +for f in *; do + if [[ -x $f && -f $f && ! $f =~ .*\..* ]]; then + cp -p $f %{buildroot}/%{_bindir}/${BIN_PREFIX}$f + fi; +done +cp -p *.so.0.1 %{buildroot}/%{_libdir} +cp -p %{name}/*.h %{buildroot}/%{_includedir}/%{name}/ +cp -p man/man1/tss*.1 %{buildroot}/%{_mandir}/man1/ +popd + + +# Make symbolic links to the shared lib +pushd %{buildroot}/%{_libdir} +rm -f libtss.so.0 +ln -sf libtss.so.0.1 libtss.so.0 +rm -f libtss.so +ln -sf libtss.so.0 libtss.so +popd + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%license LICENSE +%{_bindir}/tss* +%{_libdir}/libtss.so.0 +%{_libdir}/libtss.so.0.* +%attr(0644, root, root) %{_mandir}/man1/tss*.1* + +%files devel +%{_includedir}/%{name} +%{_libdir}/libtss.so +%doc ibmtss.doc + +%changelog +* Wed Oct 05 2016 Hon Ching(Vicky) Lo - 713-7 +- Removed defattr from the devel subpackage + +* Mon Sep 26 2016 Hon Ching(Vicky) Lo - 713-6 +- Added s390x arch as another "ExcludeArch" + +* Mon Sep 26 2016 Hon Ching(Vicky) Lo - 713-5 +- Replaced ExclusiveArch with ExcludeArch + +* Mon Sep 19 2016 Hon Ching(Vicky) Lo - 713-4 +- Used ExclusiveArch instead of BuildArch tag +- Removed attr from symlink in devel subpackage +- Added manpages and modified the Source0 +- Added CCFLAGS and LNFLAGS to enforce hardening and optimization + +* Wed Aug 17 2016 Hon Ching(Vicky) Lo - 713-3 +- Modified supported arch to ppc64le + +* Sat Aug 13 2016 Hon Ching(Vicky) Lo - 713-2 +- Minor spec fixes + +* Tue Aug 09 2016 Hon Ching(Vicky) Lo - 713-1 +- Updated for initial submission + +* Fri Mar 20 2015 George Wilson +- Initial implementation