File sbsigntools.spec of Package sbsigntools
Name: sbsigntools
Summary: Canonical EFI binary signing tools
Version: 0.9.5
Release: 1
Group: Applications/Productivity
License: GPLv3
Source0: %{name}_%{version}.orig.tar.gz
# ccan source file. It's got to be in this form for the debian build
Source1: %{name}_%{version}.orig-lib.tar.gz
Patch0: 0001-sbsigntools-fix-autogen.sh-for-build-service.patch
BuildRequires: binutils-devel
BuildRequires: openssl-devel
BuildRequires: libuuid-devel
%if 0%{?suse_version}
BuildRequires: gnu-efi
BuildRequires: pkg-config
%else
BuildRequires: gnu-efi-devel
BuildRequires: pkgconfig
%endif
BuildRequires: automake
BuildRequires: help2man
BuildRequires: git
%description
This package installs tools which can cryptographically sign EFI
binaries and drivers.
%prep
%setup -q
%setup -T -D -n %{name}-%{version}/lib -a 1
%setup -T -D
%patch0 -p1
# horrible prep from the debian files.
# debian requires any secondary tar file to have a stripped first level
# and then install into a named first level directories
# this means the prefix for the ccan tar file is ccan-0.0.2/ccan.git/
# we need to move this under lib/ccan.git
rmdir lib/ccan.git
mv lib/ccan-0.0.2/ccan.git lib/
rmdir lib/ccan-0.0.2
%build
NOCONFIGURE=1 ./autogen.sh
%configure
# hack to make sure ccan uses correct config file
cp lib/ccan.git/config.h lib/ccan/
make %{?jobs:-j%jobs}
%check
make check
%install
rm -rf %{buildroot}
%make_install
find $RPM_BUILD_ROOT -name \*.la -exec rm {} \;
%files
%defattr(-,root,root,-)
%doc COPYING
%{_bindir}/*
%{_mandir}/*