From d6039db1ba74c2274e2f4a4f4b091511ade9284e Mon Sep 17 00:00:00 2001 From: Merlin Mathesius Date: Mon, 22 Jan 2018 13:30:12 -0600 Subject: [PATCH] Version bump. Now supported for all architectures. Generate man pages since they are no longer included in source archive. --- .gitignore | 2 ++ sources | 3 ++- tss2.spec | 33 ++++++++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ba42ed4..088aa2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /ibmtss713withman.tar +/ibmtss1027.tar.gz +/makeman.sh diff --git a/sources b/sources index 7de64c9..22a8499 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -b1b99c1d79cbc5e9191312e54eda39a6 ibmtss713withman.tar +SHA512 (ibmtss1027.tar.gz) = 2adbb392dc35db043a18f8dd9daf85122fe605c6b874a95de81e4b4c15a8e78ff6af511c714118065703fd823ac44f7d17b8a1fa339957f34e6e2ad52562d10a +SHA512 (makeman.sh) = 3ca1bb2cb5dda6e046c260a520ad969d712bdecef15f473eece9c3f3cdafec7eaaf8be1c6993c04f428a52c585b1dc9771965045e3a0b6d2edaeea46a712813f diff --git a/tss2.spec b/tss2.spec index 742e527..f091f38 100644 --- a/tss2.spec +++ b/tss2.spec @@ -4,17 +4,20 @@ %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} Name: tss2 -Version: 713 -Release: 10%{?dist} +Version: 1027 +Release: 1%{?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 +Source0: https://sourceforge.net/projects/ibmtpm20tss/files/NotForUsers_FedoraSourceRpm/ibmtss%{version}.tar.gz +# Source1 should be temporary measure. v1027 of the Source0 tarball no +# longer includes the man pages, but the script with the details to generate +# them wasn't committed until v1045. +Source1: https://sourceforge.net/p/ibmtpm20tss/tss/ci/v1045/tree/utils/makeman.sh?format=raw#/makeman.sh -# tss2 does not work on Big Endian arch yet -ExcludeArch: ppc64 s390x +BuildRequires: help2man BuildRequires: openssl-devel Requires: openssl @@ -38,6 +41,7 @@ order to build TSS 2.0 applications. %prep %setup -q -c %{name}-%{version} +cp %{SOURCE1} utils/makeman.sh %build # nonstandard variable names are used in place of CFLAGS and LDFLAGS @@ -45,6 +49,21 @@ pushd utils CCFLAGS="%{optflags}" \ LNFLAGS="%{__global_ldflags}" \ make -f makefile.fedora %{?_smp_mflags} + +# Generate man pages for extracted list of executables +mkdir -p man/man1 +BIN_PREFIX=tss +man_exe=$(sed -n "s,^help2man.*/usr/bin/${BIN_PREFIX}\\([^ ]*\) .*\$,\\1,p" makeman.sh) +for f in $man_exe; do + # prefixed name + n=${BIN_PREFIX}$f + # extract description of binary + desc=$(sed -n -e "s,^help2man.* -n \"\\([^\"]*\\)\".*/usr/bin/$n .*\$,\\1,p" makeman.sh) + # temporarily link executable to prefixed name so man page is generated with correct name + ln -s $PWD/$f %{_tmppath}/$n + LD_LIBRARY_PATH="$PWD:$LD_LIBRARY_PATH" help2man -h-h --version-string="v%{version}" -n "$desc" %{_tmppath}/$n > man/man1/$n.1 + rm %{_tmppath}/$n +done popd %install @@ -91,6 +110,10 @@ popd %doc ibmtss.doc %changelog +* Fri Jan 19 2018 Merlin Mathesius - 1027-1 +- Version bump. Now supported for all architectures. +- Generate man pages since they are no longer included in source archive. + * Thu Aug 03 2017 Fedora Release Engineering - 713-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild