[packages/rockchip-firmware] new

atler atler at pld-linux.org
Wed Feb 19 22:33:06 CET 2025


commit 220e3b99c1e6f3d16d57b060b78e25425704d209
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Feb 19 22:29:42 2025 +0100

    new

 rockchip-firmware.spec | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
---
diff --git a/rockchip-firmware.spec b/rockchip-firmware.spec
new file mode 100644
index 0000000..e1450bd
--- /dev/null
+++ b/rockchip-firmware.spec
@@ -0,0 +1,48 @@
+%define		gitref		0f8ac860f0479da56a1decae207ddc99e289f2e2
+
+Summary:	Firmware for Rockchip devices
+Name:		rockchip-firmware
+Version:	20241219
+Release:	1
+License:	Redistributable
+Group:		Base/Kernel
+Source0:	https://github.com/rockchip-linux/rkbin/archive/%{gitref}/rkbin-%{version}.tar.gz
+# Source0-md5:	259efca909cab32488374f503425341b
+URL:		https://github.com/rockchip-linux/rkbin
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		no_install_post_strip	1
+
+%description
+Firmware for Rockchip devices.
+
+%prep
+%setup -q -n rkbin-%{gitref}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/rockchip-firmware
+cp -pr RKBOOT RKTRUST bin img $RPM_BUILD_ROOT%{_datadir}/rockchip-firmware
+
+# provide constant symlinks (without version part)
+# if multiple versions are present choose latest one
+for bin in `find $RPM_BUILD_ROOT%{_datadir}/rockchip-firmware/bin -type f -regex '.*_v[0-9.]+\.\(bin\|elf\)$'`; do
+	bin_nover=$(echo $bin | sed -e 's/\(.*\)_v[0-9.]\+\.\(bin\|elf\)$/\1.\2/')
+	if [ -e $bin_nover ]; then
+		if [ "$(rpmvercmp $(readlink -f $bin_nover) $bin > /dev/null || echo $?)" = "2" ]; then
+			ln -sf $(basename $bin) $bin_nover
+		fi
+	else
+		ln -s $(basename $bin) $bin_nover
+	fi
+done
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README doc/release/*_EN.md
+%lang(zh_CN) %doc doc/release/*_CN.md
+%{_datadir}/rockchip-firmware
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rockchip-firmware.git/commitdiff/220e3b99c1e6f3d16d57b060b78e25425704d209



More information about the pld-cvs-commit mailing list