From 13a4987a29dd7c7035d73a805213289b39bed85b Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 3 Mar 2020 17:45:10 +0100 Subject: [PATCH] initial version - v1.4.2 --- .gitignore | 1 + alsa-sof-firmware.spec | 77 ++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 79 insertions(+) create mode 100644 .gitignore create mode 100644 alsa-sof-firmware.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cfe27b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sof-bin-72a04d5.tar.gz diff --git a/alsa-sof-firmware.spec b/alsa-sof-firmware.spec new file mode 100644 index 0000000..fa4e5ec --- /dev/null +++ b/alsa-sof-firmware.spec @@ -0,0 +1,77 @@ +# This is a firmware package, so binaries (which are not run on the host) +# in the end package are expected. +%define _binaries_in_noarch_packages_terminate_build 0 +%global _firmwarepath /usr/lib/firmware + + +%global sof_version 1.4.2 +%global sof_commit 72a04d57d04c2df6e9dbf4eba0a98f40c252ee0b +%global sof_shortcommit %(c=%{sof_commit}; echo ${c:0:7}) + +Summary: Firmware and topology files for Sound Open Firmware project +Name: alsa-sof-firmware +Version: %{sof_version} +Release: 1%{?dist} +# See later in the spec for a breakdown of licensing +License: BSD +URL: https://github.com/thesofproject/sof-bin +Source: https://github.com/thesofproject/sof-bin/archive/%{sof_commit}/sof-bin-%{sof_shortcommit}.tar.gz +Requires: linux-firmware +Conflicts: alsa-firmware <= 1.2.1-5 + +# noarch, since the package is firmware +BuildArch: noarch + +%description +This package contains the firmware binaries for the Sound Open Firmware project. + +%package debug +Requires: alsa-sof-firmware +Summary: Debug files for Sound Open Firmware project +License: BSD + +%description debug +This package contains the debug files for the Sound Open Firmware project. + +%prep +%autosetup -n sof-bin-%{sof_commit} + +%build + +%install +mkdir -p %{buildroot}%{_firmwarepath} +cp -ra lib/firmware/* %{buildroot}%{_firmwarepath} +# remove NXP firmware files +rm -rf %{buildroot}%{_firmwarepath}/nxp + +# gather files and directories +FILEDIR=$(pwd) +pushd %{buildroot}/%{_firmwarepath} +find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files +find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files +find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files +find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs +popd +sed -i -e 's:^./::' alsa-sof-firmware.{files,debug-files,dirs} +sed -i -e 's!^!/usr/lib/firmware/!' alsa-sof-firmware.{files,debug-files,dirs} +sed -e 's/^/%%dir /' alsa-sof-firmware.dirs >> alsa-sof-firmware.files +cat alsa-sof-firmware.files + +%files -f alsa-sof-firmware.files +%license LICENCE* +%doc README* +%dir %{_firmwarepath} + +# Licence: 3-clause BSD +# .. for files with suffix .tplg +%{_firmwarepath}/intel/sof-tplg + +# Licence: SOF (3-clause BSD plus others) +# .. for files with suffix .ri + +%files debug -f alsa-sof-firmware.debug-files + + +%changelog +* Mon Mar 2 2020 Jaroslav Kysela - 1.4.2-1 +- Initial version, SOF firmware 1.4.2 diff --git a/sources b/sources new file mode 100644 index 0000000..cba2231 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sof-bin-72a04d5.tar.gz) = 546d6cb0747fcf7ae09d163b369e1f4be3c1a72af6feb58a29f146c2d8d9a03955edb9e6ce80b2df73f70b94f782c7da890ab0a3e55024c9c4ef3037db19de85