File efibootmgr.spec of Package efibootmgr
#
# spec file for package efibootmgr
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: efibootmgr
Version: 17
Release: 0
Summary: EFI Boot Manager
License: GPL-2.0-or-later
Group: System/Boot
URL: https://github.com/rhboot/efibootmgr
Source: https://github.com/rhboot/efibootmgr/archive/%{version}/%{name}-%{version}.tar.gz
Patch6: %{name}-delete-multiple.diff
Patch7: %{name}-remove_extra_decl.patch
BuildRequires: efivar-devel >= 36
BuildRequires: pciutils-devel
BuildRequires: pkg-config
BuildRequires: popt-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The EFI Boot Manager allows the user to edit the Intel Extensible
Firmware Interface (EFI) Boot Manager variables. Additional
information about the EFI can be found at
<http://developer.intel.com/technology/efi/efi.htm>.
%prep
%setup -q
#%%patch6 -p1
%patch7 -p1
%build
LOADER="grub.efi" # default loader
[ "$RPM_ARCH" != ia64 ] || LOADER="elilo.efi" # except Itanium
case "%{_repository}" in
(openSUSE*) VENDOR="openSUSE";;
(SLE_11_SP*) VENDOR="SuSE" LOADER="elilo.efi";;
(SUSE*|SLE*) VENDOR="SUSE";;
(*) VENDOR="linux";;
esac
make %{?_smp_mflags} CFLAGS="%{optflags} -flto -fPIE -pie" \
EFIDIR="$VENDOR" EFI_LOADER="$LOADER"
%install
case "%{_repository}" in
(openSUSE*) VENDOR="openSUSE";;
(SLE_11_SP*) VENDOR="SuSE";;
(SUSE*|SLE*) VENDOR="SUSE";;
(*) VENDOR="linux";;
esac
make EFIDIR="$VENDOR" DESTDIR=%{buildroot} sbindir=%{_sbindir} install
%files
%defattr(-, root, root)
%license COPYING
%doc README
%{_sbindir}/efiboot*
%{_mandir}/man8/*.gz
%changelog