2021-04-28 14:40:03 +00:00
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
Summary: Firmware update EFI binaries
|
|
|
|
Name: fwupd-efi
|
2023-01-27 09:45:28 +00:00
|
|
|
Version: 1.4
|
|
|
|
Release: %autorelease
|
2023-02-22 09:36:23 +00:00
|
|
|
License: LGPL-2.1-or-later
|
2021-04-28 14:40:03 +00:00
|
|
|
URL: https://github.com/fwupd/fwupd-efi
|
|
|
|
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
|
|
|
|
|
|
|
# these are the only architectures supporting UEFI UpdateCapsule
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: meson
|
|
|
|
BuildRequires: gnu-efi-devel
|
|
|
|
BuildRequires: pesign
|
2023-01-27 09:45:28 +00:00
|
|
|
BuildRequires: python3-pefile
|
2021-04-28 14:40:03 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
fwupd is a project to allow updating device firmware, and this package provides
|
|
|
|
the EFI binary that is used for updating using UpdateCapsule.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
2023-06-28 11:47:26 +00:00
|
|
|
# gnu-efi linker scripts (lds) are missing SBAT, included scripts are used
|
|
|
|
# instead but the build system expects the name to match
|
|
|
|
%ifarch x86_64
|
|
|
|
%global efiarch x64
|
|
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
|
|
%global efiarch aa64
|
|
|
|
%endif
|
|
|
|
ln -s elf_%{_arch}_efi.lds efi/lds/efi.lds
|
|
|
|
%ifarch aarch64
|
|
|
|
ln -s crt0-efi-%{_arch}.S efi/crt0/crt0-efi-%{efiarch}.S
|
|
|
|
%endif
|
2021-04-28 14:40:03 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%meson \
|
2023-06-28 11:47:26 +00:00
|
|
|
-Defi-libdir=%{_prefix}/lib \
|
2021-04-28 14:40:03 +00:00
|
|
|
-Defi_sbat_distro_id="fedora" \
|
|
|
|
-Defi_sbat_distro_summary="The Fedora Project" \
|
|
|
|
-Defi_sbat_distro_pkgname="%{name}" \
|
|
|
|
-Defi_sbat_distro_version="%{version}-%{release}" \
|
|
|
|
-Defi_sbat_distro_url="https://src.fedoraproject.org/rpms/%{name}"
|
|
|
|
|
|
|
|
%meson_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%meson_install
|
|
|
|
|
|
|
|
# sign fwupd.efi loader
|
|
|
|
%global fwup_efi_fn $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efiarch}.efi
|
|
|
|
%pesign -s -i %{fwup_efi_fn} -o %{fwup_efi_fn}.tmp
|
|
|
|
%define __pesign_client_cert fwupd-signer
|
|
|
|
%pesign -s -i %{fwup_efi_fn}.tmp -o %{fwup_efi_fn}.signed
|
|
|
|
rm -vf %{fwup_efi_fn}.tmp
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md AUTHORS
|
|
|
|
%license COPYING
|
|
|
|
%{_libexecdir}/fwupd/efi/*.efi
|
|
|
|
%{_libexecdir}/fwupd/efi/*.efi.signed
|
2023-01-27 09:45:28 +00:00
|
|
|
%{_libdir}/pkgconfig/fwupd-efi.pc
|
2021-04-28 14:40:03 +00:00
|
|
|
|
|
|
|
%changelog
|
2023-01-27 09:45:28 +00:00
|
|
|
%autochangelog
|