diff --git a/trousers.spec b/trousers.spec index c37c022bc4f4ca5165d3e6490b24338f47c7f56d..5d91c0ca4c3ed3d9ae8f5eb3834da6d4a53addfb 100644 --- a/trousers.spec +++ b/trousers.spec @@ -1,26 +1,24 @@ -%define anolis_release 2 +%define anolis_release 3 + Name: trousers -Summary: TCG's Software Stack v1.2 Version: 0.3.15 Release: %{anolis_release}%{?dist} +Summary: The open-source TCG Software Stack License: BSD - -Url: https://sourceforge.net/projects -Source0: %{url}/trousers/files/trousers/%{version}/%{name}-%{version}.tar.gz +Url: http://trousers.sourceforge.net +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: tcsd.service Patch1: trousers-0.3.14-noinline.patch -# submitted upstream Patch2: trousers-0.3.14-unlock-in-err-path.patch -BuildRequires: make -BuildRequires: libtool openssl-devel gettext-devel autoconf automake -BuildRequires: systemd +BuildRequires: autoconf automake make +BuildRequires: libtool openssl-devel gettext-devel systemd Requires(pre): shadow-utils Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units -Requires: %{name}-lib%{?_isa} = %{version}-%{release} +Requires: %{name}-lib = %{version}-%{release} %description TrouSerS is an implementation of the Trusted Computing Group's Software Stack @@ -31,15 +29,22 @@ state using cryptographic hashes and more. %package lib Summary: TrouSerS libtspi library -# Needed obsoletes due to the -lib subpackage split Obsoletes: trousers < 0.3.13-4 %description lib The libtspi library for use in Trusted Computing enabled applications. +%package devel +Summary: TrouSerS header files and documentation +Requires: %{name}-lib = %{version}-%{release} + +%description devel +Header files and man pages for use in creating Trusted Computing enabled +applications. + %package static Summary: TrouSerS TCG Device Driver Library -Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} %description static The TCG Device Driver Library (TDDL) used by the TrouSerS tcsd as the @@ -47,14 +52,6 @@ interface to the TPM's device driver. For more information about writing applications to the TDDL interface, see the latest TSS spec at https://www.trustedcomputinggroup.org/specs/TSS. -%package devel -Summary: TrouSerS header files and documentation -Requires: %{name}-lib%{?_isa} = %{version}-%{release} - -%description devel -Header files and man pages for use in creating Trusted Computing enabled -applications. - %package doc Summary: Documentation files for %{name} Requires: %{name} = %{version}-%{release} @@ -64,15 +61,14 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%autosetup -p1 -# fix man page paths +%autosetup -p1 -n %{name}-%{version} sed -i -e 's|/var/tpm|/var/lib/tpm|g' -e 's|/usr/local/var|/var|g' man/man5/tcsd.conf.5.in man/man8/tcsd.8.in %build chmod +x ./bootstrap.sh ./bootstrap.sh %configure --with-gui=openssl -make -k %{?_smp_mflags} +%make_build -k %install mkdir -p %{buildroot}%{_localstatedir}/lib/tpm @@ -106,10 +102,10 @@ exit 0 %files %{_sbindir}/tcsd %config(noreplace) %attr(0640, root, tss) %{_sysconfdir}/tcsd.conf -%{_mandir}/man5/* -%{_mandir}/man8/* %attr(644,root,root) %{_unitdir}/tcsd.service %attr(0700, tss, tss) %{_localstatedir}/lib/tpm/ +%{_mandir}/man5/* +%{_mandir}/man8/* %files lib %dir %{abidir} @@ -118,22 +114,23 @@ exit 0 %{abidir}/libtspi.dump %files devel -# The files to be used by developers, 'trousers-devel' -%doc doc/LTC-TSS_LLD_08_r2.pdf doc/TSS_programming_SNAFUs.txt %{_libdir}/libtspi.so %{_includedir}/tss/ %{_includedir}/trousers/ %{_mandir}/man3/Tspi_* +%doc doc/LTC-TSS_LLD_08_r2.pdf doc/TSS_programming_SNAFUs.txt %files static -# The only static library shipped by trousers, the TDDL %{_libdir}/libtddl.a %files doc %doc README ChangeLog %changelog -* Sun Mar 19 2023 Shawn Wang - 0.3.15-2 +* Wed Apr 12 2023 Shawn Wang - 0.3.15-3 +- Optimize the spec file + +* Sun Mar 19 2023 Shawn Wang - 0.3.15-2 - Optimize the spec file * Thu Mar 10 2022 Mingyue Zhao - 0.3.15-1