Use efi-rpm-macros for efi macro definitions

- Use %%{efi} and similar macros from efi-rpm-macros
- Use '%%autosetup -S git' now that it imports patches without rewriting
  the commit message.
- Fix some URLs maybe.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-05-01 15:00:24 -04:00
parent 3801634cda
commit ba384ecc89

View File

@ -1,25 +1,22 @@
%define efivar_version 35-1
%define efivar_version 35-2
Summary: EFI Boot Manager
Name: efibootmgr
Version: 16
Release: 1%{?dist}
Release: 2%{?dist}
Group: System Environment/Base
License: GPLv2+
URL: http://github.com/rhinstaller/%{name}/
BuildRequires: git, popt-devel
URL: https://github.com/rhboot/%{name}/
BuildRequires: efi-rpm-macros git popt-devel
BuildRequires: efivar-libs >= %{efivar_version}
BuildRequires: efivar-devel >= %{efivar_version}
# EFI/UEFI don't exist on PPC
ExclusiveArch: %{ix86} x86_64 aarch64 arm
ExclusiveArch: %{efi}
# for RHEL / Fedora when efibootmgr was part of the elilo package
Conflicts: elilo <= 3.6-6
Obsoletes: elilo <= 3.6-6
Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
Source0: https://github.com/rhboot/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
%description
%{name} displays and allows the user to edit the Intel Extensible
@ -28,26 +25,17 @@ information about EFI can be found at
http://developer.intel.com/technology/efi/efi.htm and http://uefi.org/.
%prep
%setup -q
git init
git config user.email "example@example.com"
git config user.name "RHEL Ninjas"
git add .
git commit -a -q -m "%{version} baseline."
git am %{patches} </dev/null
git config --unset user.email
git config --unset user.name
%autosetup -S git
git config --local --add efibootmgr.efidir %{efi_vendor}
%build
make %{?_smp_mflags} CFLAGS='%{optflags}' LDFLAGS='%{build_ldflags}' \
EFIDIR=%{efidir}
%make_build CFLAGS='%{optflags}' LDFLAGS='%{build_ldflags}'
%install
rm -rf %{buildroot}
%make_install EFIDIR=%{efidir} libdir=%{_libdir} \
bindir=%{_bindir} mandir=%{_mandir} localedir=%{_datadir}/locale/ \
includedir=%{_includedir} libexecdir=%{_libexecdir} \
datadir=%{_datadir}
%make_install libdir=%{_libdir} bindir=%{_bindir} mandir=%{_mandir} \
localedir=%{_datadir}/locale/ includedir=%{_includedir} \
libexecdir=%{_libexecdir} datadir=%{_datadir}
%files
%defattr(-,root,root,-)
@ -56,8 +44,14 @@ rm -rf %{buildroot}
%{_sbindir}/*
%{_mandir}/*/*.?.gz
%doc README
%changelog
* Wed May 02 2018 Peter Jones <pjones@redhat.com> - 16-2
- Use %%{efi} and similar macros from efi-rpm-macros
- Use '%%autosetup -S git' now that it imports patches without rewriting
the commit message.
- Fix some URLs maybe.
* Mon Apr 09 2018 Peter Jones <pjones@redhat.com> - 16-1
- efibootmgr 16
- better coverity and clang-analyzer support