[packages/sof-bin] - generate SST tolologi data - don't package debug files - rel 2

baggins baggins at pld-linux.org
Fri Dec 31 11:07:58 CET 2021


commit 13d9cbd2fad642ebc1259abb230fd8e4dea9958c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 31 11:07:34 2021 +0100

    - generate SST tolologi data
    - don't package debug files
    - rel 2

 sof-bin.spec | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/sof-bin.spec b/sof-bin.spec
index 55e8ef9..210d832 100644
--- a/sof-bin.spec
+++ b/sof-bin.spec
@@ -1,12 +1,18 @@
+
+%define		sof_ver		2.0
+%define		sof_ver_pkg	v%{sof_ver}.x
+
 Summary:	Topology binaries for the Sound Open Firmware
 Name:		sof-bin
-Version:	2.0
-Release:	1
+Version:	%{sof_ver}
+Release:	2
 License:	BSD/BSD-like/ISC
 Group:		Base/Kernel
 Source0:	https://github.com/thesofproject/sof-bin/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	8d06ed4a1fba5fd77bb49bd35ddce757
 URL:		https://github.com/thesofproject/sof-bin
+BuildRequires:	alsa-lib
+BuildRequires:	alsa-utils
 BuildRequires:	rsync
 ExclusiveArch:	%{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -26,14 +32,22 @@ Sound Open Firmware.
 
 %prep
 %setup -q
+mkdir -p firmware/intel/sof
+mv %{sof_ver_pkg}/sof-v%{version}/* firmware/intel/sof
+mv %{sof_ver_pkg}/sof-tplg-v%{version} firmware/intel/sof-tplg
+
+%build
+# SST topology files (not SOF related, but it's a Intel hw support
+# and this package seems a good place to distribute them
+alsatplg -c /usr/share/alsa/topology/hda-dsp/skl_hda_dsp_generic-tplg.conf \
+	-o firmware/skl_hda_dsp_generic-tplg.bin
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/lib/firmware/intel,%{_bindir}}
 
-FW_DEST=$RPM_BUILD_ROOT/lib/firmware/intel \
-TOOLS_DEST=$RPM_BUILD_ROOT%{_bindir} \
-./install.sh v2.0.x/v%{version}
+cp -ra %{sof_ver_pkg}/tools-v%{version}/* $RPM_BUILD_ROOT%{_bindir}
+cp -ra firmware/* $RPM_BUILD_ROOT/lib/firmware/
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -45,4 +59,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n sof-firmware
 %defattr(644,root,root,755)
-/lib/firmware/intel/sof*
+/lib/firmware/*.bin
+/lib/firmware/intel/sof
+/lib/firmware/intel/sof-tplg
+# exclude debug data
+%exclude /lib/firmware/intel/sof/*.ldc
+%exclude /lib/firmware/intel/sof/*/*.ldc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sof-bin.git/commitdiff/13d9cbd2fad642ebc1259abb230fd8e4dea9958c



More information about the pld-cvs-commit mailing list