rpi-eeprom/SPECS/rpi-eeprom.spec

102 lines
3.6 KiB
RPMSpec

%global gh_tag v%{version}-2712
%global srcdir %{name}-%{version}-2712
Name: rpi-eeprom
Version: 2025.02.12
Release: 2%{?dist}
Summary: Raspberry Pi 4/5 boot EEPROM updater (experimental)
BuildArch: noarch
ExclusiveArch: aarch64
License: BSD-3-Clause
URL: https://github.com/raspberrypi/rpi-eeprom
Source0: https://github.com/raspberrypi/rpi-eeprom/archive/refs/tags/%{gh_tag}.tar.gz
Source1: LICENSE.rpi-eeprom-firmware
Requires: bash
Requires: coreutils
Requires: findutils
Requires: nano
Requires: openssl
Requires: pciutils
Requires: python3
Requires: raspberrypi-userland
%if 0%{?rhel} >= 10
Requires: xxd
%else
Requires: vim-common
%endif
Requires: rpi-eeprom-firmware = %{version}-%{release}
%description
Raspberry Pi 4/5 boot EEPROM updater and configuration tool to edit the
bootloader configuration such as boot order and more.
%package firmware
Summary: Raspberry Pi 4/5 boot EEPROM firmware biaries
#
# NOTE: MIT-like but proprietary license with some restrictions.
# See LICENSE.rpi-eeprom-firmware for full license text.
#
# - Redistribution without modification permitted.
# - This software may only be used for the purposes of developing for,
# running or using a Raspberry Pi device.
#
License: Proprietary
%description firmware
Raspberry Pi 4/5 boot EEPROM firmware binaries.
%prep
%setup -n %{srcdir}
%{__cp} %{SOURCE1} .
%build
# nothing to build
%install
rm -rf $RPM_BUILD_ROOT
%{__install} -d %{buildroot}%{_bindir}
%{__install} -m 555 rpi-eeprom-config %{buildroot}%{_bindir}
%{__install} -m 555 rpi-eeprom-digest %{buildroot}%{_bindir}
%{__install} -m 555 rpi-eeprom-update %{buildroot}%{_bindir}
# These tools are not installed due to lack of pycryptdome
#%{__install} -m 555 tools/rpi-bootloader-key-convert %{buildroot}%{_bindir}
#%{__install} -m 555 tools/rpi-otp-private-key %{buildroot}%{_bindir}
#%{__install} -m 555 tools/rpi-sign-bootcode %{buildroot}%{_bindir}
# bootloader
%{__install} -d %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2711
%{__install} -d %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2711
%{__install} -d %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2711
%{__install} -d %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2712
%{__install} -m 644 firmware-2711/release-notes.md %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2711
%{__install} -m 644 firmware-2712/release-notes.md %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2712
%{__cp} -r firmware-2711/default %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2711/
%{__cp} -r firmware-2711/latest %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2711/
%{__cp} -r firmware-2712/default %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2712/
%{__cp} -r firmware-2712/latest %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader-2712/
%files
%license LICENSE
%doc README.md releases.md
%dir %{_prefix}/lib/firmware/raspberrypi
%{_bindir}/rpi-eeprom-config
%{_bindir}/rpi-eeprom-digest
%{_bindir}/rpi-eeprom-update
%files firmware
%license LICENSE.rpi-eeprom-firmware
%{_prefix}/lib/firmware/raspberrypi/*
%changelog
* Thu Feb 20 2025 Koichiro Iwao <meta@almalinux.org> - 2025.02.12-2
- Update to v2025.02.12
* Fri Feb 14 2025 Koichiro Iwao <meta@almalinux.org> - 2025.01.22-2
- Separate the package into updater/config script and firmware binaries,
each licensed under different licenses
* Thu Feb 13 2025 Koichiro Iwao <meta@almalinux.org> - 2025.01.22-1
- Initial creation