various adaptations to match Fedora Packaging Guidelines

This commit is contained in:
Fabio Valentini 2022-04-28 00:31:14 +02:00
parent 509250ef13
commit 34994449aa
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF
4 changed files with 33 additions and 47 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@
/libtpms-20220106.tar.xz
/libtpms-20220307.tar.xz
/libtpms-20220425.tar.xz
/libtpms-0.9.4.tar.gz

View File

@ -1,19 +1,22 @@
%global gitdate 20220425
%global gitversion e4d68670e1
Name: libtpms
Version: 0.9.4
Release: 1.%{gitdate}git%{gitversion}%{?dist}
Summary: Library providing Trusted Platform Module (TPM) functionality
Release: 2%{?dist}
Summary: Library providing Trusted Platform Module (TPM) functionality
License: BSD
Url: http://github.com/stefanberger/libtpms
Source0: libtpms-%{gitdate}.tar.xz
URL: http://github.com/stefanberger/libtpms
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: coreutils
BuildRequires: gawk
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pkgconfig gawk sed
BuildRequires: automake autoconf libtool bash coreutils gcc-c++
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: sed
%description
A library providing TPM functionality for VMs. Targeted for integration
@ -27,34 +30,39 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Libtpms header files and documentation.
%prep
%setup -q -n %{name}-%{gitdate}
%autosetup
%build
NOCONFIGURE=1 sh autogen.sh
NOCONFIGURE=1 ./autogen.sh
%configure --disable-static --with-tpm2 --with-openssl
%make_build
%check
make check
%install
%make_install
find %{buildroot} -type f -name '*.la' | xargs rm -f -- || :
find %{buildroot} -type f -name '*.la' -print -delete
%check
make check
%ldconfig_scriptlets
%files
%license LICENSE
%doc README CHANGES
%{_libdir}/lib*.so.*
%{_libdir}/%{name}.so.0{,.*}
%files devel
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/TPM*
%changelog
* Wed Apr 27 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.4-2
- Use standard method for fetching a GitHub release tarball.
- Fix Versioning scheme to confirm with Packaging Guidelines.
- Tighten file globs to match Packaging Guidelines.
* Mon Apr 25 2022 Stefan Berger <stefanb@linux.ibm.com> - 0.9.4-1.20220425gite4d68670e1
- Build of libtpms 0.9.4

View File

@ -1,23 +0,0 @@
#!/bin/sh
# Usage: ./make-git-snapshot.sh [COMMIT]
#
# to make a snapshot of the given tag/branch. Defaults to HEAD.
# Point env var REF to a local mesa repo to reduce clone time.
DIRNAME=libtpms-$( date +%Y%m%d )
echo REF ${REF:+--reference $REF}
echo DIRNAME $DIRNAME
echo HEAD ${1:-HEAD}
rm -rf $DIRNAME
git clone ${REF:+--reference $REF} \
https://github.com/stefanberger/libtpms $DIRNAME
set -x
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
| xz > $DIRNAME.tar.xz
# rm -rf $DIRNAME

View File

@ -1 +1 @@
SHA512 (libtpms-20220425.tar.xz) = 5d1eb3a3269a32b3094966e8ce0c1d06ec37f9f5968563f66d9f45397a1e01740be5c1167c274bd037915b46e180934df8ddd0aea5d07fd7a7bfacc94a392837
SHA512 (libtpms-0.9.4.tar.gz) = ae3e2613bc31d98c10def546c70d0c25bd1246af5090268afa0411502bfd0e454967046ebcd9025350976817441e595fa4e21562f800285db98331e4c2743505