raspberrypi-eeprom/raspberrypi-eeprom.spec
2021-09-29 17:55:31 +08:00

66 lines
2.1 KiB
RPMSpec

%global _firmware_path /lib/firmware
%define url_version 2021.04.29-138a1
%global debug_package %{nil}
Name: raspberrypi-eeprom
Version: 2021.04.29
Release: 2
Summary: Raspberry Pi 4 boot EEPROM firmware
License: BSD-3-Clause and custom
URL: https://github.com/raspberrypi/rpi-eeprom
Source0: https://github.com/raspberrypi/rpi-eeprom/archive/v%{url_version}/rpi-eeprom-%{version}.tar.gz
Patch0000: python3_env.patch
AutoReq: no
AutoProv: yes
Provides: rpi-eeprom
Requires: raspberrypi-firmware libraspberrypi-bin python3 binutils pciutils
Provides: rpi-eeprom-config = %{version}
Obsoletes: rpi-eeprom-config < %{version}
ExclusiveArch: aarch64
ExclusiveOS: Linux
%description
Installation scripts and binaries for the closed sourced Raspberry Pi 4 EEPROMs.
%prep
%setup -q -n %{name}-%{version} -c
mv rpi-eeprom-%{url_version} %{name}-%{version}
cd %{name}-%{version}
%patch0000 -p1
%build
%install
cd %{name}-%{version}
mkdir -p %{buildroot}%{_bindir}
install -m 0755 rpi-eeprom-config %{buildroot}%{_bindir}
install -m 0755 rpi-eeprom-update %{buildroot}%{_bindir}
mkdir -p %{buildroot}/etc/default
install -m 644 rpi-eeprom-update-default %{buildroot}/etc/default/rpi-eeprom-update
mkdir -p %{buildroot}%{_firmware_path}/raspberrypi/bootloader
install -m 644 releases.md %{buildroot}%{_firmware_path}/raspberrypi/bootloader/
cp -a firmware/beta %{buildroot}%{_firmware_path}/raspberrypi/bootloader
cp -a firmware/critical %{buildroot}%{_firmware_path}/raspberrypi/bootloader
cp -a firmware/stable %{buildroot}%{_firmware_path}/raspberrypi/bootloader
cd %{buildroot}%{_firmware_path}/raspberrypi/bootloader
ln -s stable latest
ln -s critical default
cd -
%files
%license %{name}-%{version}/LICENSE
%{_bindir}/rpi-eeprom-config
%{_bindir}/rpi-eeprom-update
%config /etc/default/rpi-eeprom-update
%{_firmware_path}/raspberrypi
%changelog
* Sun Sep 26 2021 Yafen Fang <yafen@iscas.ac.cn> - 2021.04.29-2
- remove rpi-eeprom-update.service
* Sat Sep 25 2021 Yafen Fang <yafen@iscas.ac.cn> - 2021.04.29-1
- init package