2020-03-03 16:45:10 +00:00
|
|
|
# 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}
|
2020-03-12 17:08:06 +00:00
|
|
|
Release: 4%{?dist}
|
2020-03-03 16:45:10 +00:00
|
|
|
# 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
|
2020-03-12 17:19:49 +00:00
|
|
|
Conflicts: alsa-firmware <= 1.2.1-6
|
2020-03-03 16:45:10 +00:00
|
|
|
|
|
|
|
# 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}
|
|
|
|
|
2020-03-12 17:08:06 +00:00
|
|
|
# add missing symlink
|
|
|
|
ln -s v1.4.2/intel-signed/sof-cnl-v1.4.2.ri lib/firmware/intel/sof/sof-cml.ri
|
|
|
|
|
2020-03-03 16:45:10 +00:00
|
|
|
%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
|
2020-03-12 17:08:06 +00:00
|
|
|
* Thu Mar 12 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-4
|
|
|
|
- Add missing symlink for sof-cml.ri
|
|
|
|
|
2020-03-03 18:00:41 +00:00
|
|
|
* Mon Mar 2 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-3
|
2020-03-03 16:45:10 +00:00
|
|
|
- Initial version, SOF firmware 1.4.2
|