forked from pool/ibmtss
Accepting request 713488 from home:michals
- Update to v1047 - now supports autotools - supports library versioning - installs tools with program prefx - remove binary tool wrapper - remove makefile.patch OBS-URL: https://build.opensuse.org/request/show/713488 OBS-URL: https://build.opensuse.org/package/show/security/ibmtss?expand=0&rev=21
This commit is contained in:
48
ibmtss.spec
48
ibmtss.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ibmtss
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 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
|
||||
@@ -12,30 +12,30 @@
|
||||
# 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/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
%define suite ibmtss
|
||||
%define libversion 0
|
||||
%define libname libtss
|
||||
%define libversion_full 0.0.1
|
||||
%define libname libibmtss
|
||||
%define libpkgname %{libname}%{libversion}
|
||||
%define soname %{libname}.so.%{libversion}
|
||||
|
||||
Name: ibmtss
|
||||
Version: 1045
|
||||
Version: 1470
|
||||
Release: 0
|
||||
Summary: IBM's TPM 2.0 TSS
|
||||
License: BSD-3-Clause
|
||||
Group: Productivity/Security
|
||||
URL: https://sourceforge.net/projects/ibmtpm20tss
|
||||
Source: https://sourceforge.net/projects/ibmtpm20tss/files/ibmtss%{version}.tar.gz
|
||||
Source1: %{name}
|
||||
Source2: %{name}.1
|
||||
Patch: makefile.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: ibmswtpm2
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: libtool
|
||||
Recommends: %{name}-base = %{version}
|
||||
|
||||
%description
|
||||
@@ -72,31 +72,29 @@ Includes IBM's TPM 2.0 TSS C header files
|
||||
|
||||
%prep
|
||||
%setup -q -c
|
||||
%patch -p 1
|
||||
|
||||
%build
|
||||
autoreconf -i
|
||||
%configure --enable-hwtpm --enable-debug
|
||||
cd utils
|
||||
%{_libexecdir}/%{suite}/tpm_server & tpm_server="$!"
|
||||
CCFLAGS="%{optflags}" make LNAFLAGS="-Wl,-rpath,%{_libdir}" %{?_smp_mflags}
|
||||
testfailed=0
|
||||
TPM_INTERFACE_TYPE=socsim LD_LIBRARY_PATH=. ./reg.sh || testfailed=$?
|
||||
TPM_INTERFACE_TYPE=socsim LD_LIBRARY_PATH=.libs ./reg.sh || testfailed=$?
|
||||
kill "$tpm_server" || :
|
||||
[ "$testfailed" -eq 0 ]
|
||||
|
||||
%install
|
||||
cd utils
|
||||
install -m 755 -D -t %{buildroot}/%{_libdir} %{soname}
|
||||
ln -s %{soname} %{buildroot}/%{_libdir}/%{libname}.so
|
||||
install -m 755 -D -t %{buildroot}/%{_libexecdir}/%{suite} \
|
||||
activatecredential eventextend imaextend certify certifycreation changeeps changepps clear clearcontrol clockrateadjust clockset commit contextload contextsave create createloaded createprimary dictionaryattacklockreset dictionaryattackparameters duplicate eccparameters ecephemeral encryptdecrypt eventsequencecomplete evictcontrol flushcontext getcommandauditdigest getcapability getrandom getsessionauditdigest gettime hashsequencestart hash hierarchycontrol hierarchychangeauth hmac hmacstart import importpem load loadexternal makecredential nvcertify nvchangeauth nvdefinespace nvextend nvglobalwritelock nvincrement nvread nvreadlock nvreadpublic nvsetbits nvundefinespace nvundefinespacespecial nvwrite nvwritelock objectchangeauth pcrallocate pcrevent pcrextend pcrread pcrreset policyauthorize policyauthvalue policycommandcode policycphash policycountertimer policygetdigest policymaker policymakerpcr policyauthorizenv policynv policynvwritten policyor policypassword policypcr policyrestart policysigned policysecret policytemplate policyticket quote powerup readclock readpublic returncode rewrap rsadecrypt rsaencrypt sequenceupdate sequencecomplete setprimarypolicy shutdown sign startauthsession startup stirrandom unseal verifysignature signapp writeapp timepacket createek ntc2getconfig ntc2preconfig ntc2lockconfig
|
||||
%make_install
|
||||
mkdir -p %{buildroot}/%{_datadir}/%{suite}
|
||||
cp -a policies certificates %{buildroot}/%{_datadir}/%{suite}
|
||||
mkdir -p %{buildroot}/%{_includedir}/%{suite}
|
||||
cp -a tss2 *.h %{buildroot}/%{_includedir}/%{suite}
|
||||
install -p -D -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/%{suite}
|
||||
install -p -D -m 644 %{SOURCE1}.1 %{buildroot}/%{_mandir}/man1/%{suite}.1
|
||||
sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{suite},g -e s,%DOCDIR%,%{_docdir}/%{name},g \
|
||||
%{buildroot}/%{_bindir}/%{suite} %{buildroot}/%{_mandir}/man1/%{suite}.1
|
||||
cp -a ibmtss *.h %{buildroot}/%{_includedir}/%{suite}
|
||||
|
||||
for i in %{buildroot}/%{_mandir}/man1/tsstss*.1 ; do
|
||||
mv -v $i $(echo $i | sed -e s,/tsstss,/tss,)
|
||||
done
|
||||
|
||||
%post -n %{libpkgname} -p /sbin/ldconfig
|
||||
%postun -n %{libpkgname} -p /sbin/ldconfig
|
||||
@@ -104,12 +102,12 @@ sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{sui
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc ibmtss.doc
|
||||
%{_libexecdir}/%{suite}
|
||||
%{_bindir}/%{suite}
|
||||
%{_mandir}/man1/%{suite}.1%{?ext_man}
|
||||
%{_bindir}/tss*
|
||||
%{_mandir}/man1/tss*.1%{?ext_man}
|
||||
|
||||
%files -n %{libpkgname}
|
||||
%{_libdir}/%{soname}
|
||||
%{_libdir}/%{libname}*.so.%{libversion_full}
|
||||
%{_libdir}/%{libname}*.so.%{libversion}
|
||||
|
||||
%files base
|
||||
%license LICENSE
|
||||
@@ -118,6 +116,8 @@ sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{sui
|
||||
%files devel
|
||||
%license LICENSE
|
||||
%{_includedir}/%{suite}
|
||||
%{_libdir}/%{libname}.so
|
||||
%{_libdir}/%{libname}*.a
|
||||
%{_libdir}/%{libname}*.la
|
||||
%{_libdir}/%{libname}*.so
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user