!1 init package

From: @woqidaideshi
Reviewed-by: @jianminw
Signed-off-by: @jianminw
This commit is contained in:
openeuler-ci-bot 2021-10-01 08:06:44 +00:00 committed by Gitee
commit fbe37e86a4
3 changed files with 89 additions and 0 deletions

23
python3_env.patch Normal file
View File

@ -0,0 +1,23 @@
From e28936a8fa34346727b229e7366960e508545cf0 Mon Sep 17 00:00:00 2001
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Date: Fri, 22 Jan 2021 17:08:46 +0100
Subject: [PATCH] Avoid using env so rpm catches the python dependency
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
rpi-eeprom-config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpi-eeprom-config b/rpi-eeprom-config
index 0a6ce5e..943d0dd 100755
--- a/rpi-eeprom-config
+++ b/rpi-eeprom-config
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
rpi-eeprom-config
--
2.30.0

66
raspberrypi-eeprom.spec Normal file
View File

@ -0,0 +1,66 @@
%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

Binary file not shown.