File efitools.spec of Package efitools

Name:       efitools
Summary:    Tools for manipulating UEFI secure boot platforms
Version:    1.9.2
Release:    1
Group:      Applications/Productivity
License:    GPLv2
Source0:    %{name}-%{version}.tar.gz
Source1:    Shell.efi.X64
Source2:    Shell_full.efi.X64
Source3:    Shell.efi.IA32
Source4:    Shell_full.efi.IA32
Source99:   baselibs.conf

BuildRequires: sbsigntools >= 0.7
BuildRequires: strace
BuildRequires: openssl-devel
BuildRequires: help2man
%if 0%{?suse_version}
BuildRequires: gnu-efi >= 3.0q
BuildRequires: gnu-efi-devel
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Slurp)

Requires: sbsigntools
Requires: openssl
Requires: parted
Requires: dosfstools
Requires: mtools

%define keydir %{_datadir}/efitools/keys
%define efidir %{_datadir}/efitools/efi
%define usbdir %{_datadir}/efitools/usb
# translate Uname into the UEFI architecture extension
%define uefiarch %(uname -m|sed 's/i.86/IA32/;s/x86_64/X64/')

This package installs a variety of tools for manipulating keys and binary signatures on UEFI secure boot platforms.  For more information see the README file.

%setup -q


rm -rf %{buildroot}
# the LockDown binary has the wrong keys in it
rm -f %{buildroot}/%{efidir}/LockDown.efi
# install the shell binaries (may not have them)
for f in Shell.efi Shell_full.efi; do
    install -m 0755  %{_sourcedir}/$f.%{uefiarch} %{buildroot}/%{efidir}/$f || true
mkdir %{buildroot}/%{keydir}
mkdir %{buildroot}/%{usbdir}

# -f efitools.lang

%include %{_sourcedir}/debian.postinst

%include %{_sourcedir}/debian.prerm
openSUSE Build Service is sponsored by