Blame SPECS/alsa-sof-firmware.spec

630c91
# This is a firmware package, so binaries (which are not run on the host)
630c91
# in the end package are expected.
630c91
%define _binaries_in_noarch_packages_terminate_build   0
630c91
%global _firmwarepath  /usr/lib/firmware
630c91
23be5c
%global sof_ver 2.2.4
4de1c9
#global sof_ver_pre rc2
4de1c9
%global sof_ver_rel %{?sof_ver_pre:.%{sof_ver_pre}}
4de1c9
%global sof_ver_pkg v%{sof_ver}%{?sof_ver_pre:-%{sof_ver_pre}}
630c91
23be5c
%global with_sof_addon 0
23be5c
%global sof_ver_addon 0
70e4f2
4de1c9
%global tplg_version 1.2.4
630c91
630c91
Summary:        Firmware and topology files for Sound Open Firmware project
630c91
Name:           alsa-sof-firmware
4de1c9
Version:        %{sof_ver}
23be5c
Release:        2%{?sof_ver_rel}%{?dist}
630c91
# See later in the spec for a breakdown of licensing
630c91
License:        BSD
630c91
URL:            https://github.com/thesofproject/sof-bin
4de1c9
Source:         https://github.com/thesofproject/sof-bin/releases/download/%{sof_ver_pkg}/sof-bin-%{sof_ver_pkg}.tar.gz
70e4f2
%if 0%{?with_sof_addon}
70e4f2
Source2:        https://github.com/thesofproject/sof-bin/releases/download/v%{sof_ver_addon}/sof-tplg-v%{sof_ver_addon}.tar.gz
70e4f2
%endif
23be5c
Source10:       skl_hda_dsp_generic-tplg.bin
630c91
630c91
# noarch, since the package is firmware
630c91
BuildArch:      noarch
630c91
630c91
%description
630c91
This package contains the firmware binaries for the Sound Open Firmware project.
630c91
630c91
%package debug
630c91
Requires:       alsa-sof-firmware
630c91
Summary:        Debug files for Sound Open Firmware project
630c91
License:        BSD
630c91
630c91
%description debug
630c91
This package contains the debug files for the Sound Open Firmware project.
630c91
630c91
%prep
4de1c9
%autosetup -n sof-bin-%{sof_ver_pkg}
630c91
4de1c9
mkdir -p firmware/intel/sof
630c91
630c91
# we have the version in the package name
4de1c9
mv sof-%{sof_ver_pkg}/* firmware/intel/sof
630c91
630c91
# move topology files
4de1c9
mv sof-tplg-%{sof_ver_pkg} firmware/intel/sof-tplg
630c91
70e4f2
%if 0%{?with_sof_addon}
70e4f2
tar xvzf %{SOURCE2}
70e4f2
mv sof-tplg-v%{sof_ver_addon}/*.tplg firmware/intel/sof-tplg
70e4f2
%endif
5df638
630c91
# remove NXP firmware files
4de1c9
rm LICENCE.NXP
4de1c9
rm -rf firmware/intel/sof-tplg/sof-imx8*
630c91
39efd1
# remove Mediatek firmware files
39efd1
rm -rf firmware/intel/sof-tplg/sof-mt8*
39efd1
4de1c9
# SST topology files (not SOF related, but it's a Intel hw support
4de1c9
# and this package seems a good place to distribute them
23be5c
cp %{SOURCE10} firmware/skl_hda_dsp_generic-tplg.bin
23be5c
23be5c
%build
630c91
630c91
%install
630c91
mkdir -p %{buildroot}%{_firmwarepath}
4de1c9
cp -ra firmware/* %{buildroot}%{_firmwarepath}
630c91
630c91
# gather files and directories
630c91
FILEDIR=$(pwd)
630c91
pushd %{buildroot}/%{_firmwarepath}
630c91
find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files
630c91
#find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files
630c91
find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files
630c91
find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs
630c91
popd
630c91
sed -i -e 's:^./::' alsa-sof-firmware.{files,debug-files,dirs}
630c91
sed -i -e 's!^!/usr/lib/firmware/!' alsa-sof-firmware.{files,debug-files,dirs}
630c91
sed -e 's/^/%%dir /' alsa-sof-firmware.dirs >> alsa-sof-firmware.files
630c91
cat alsa-sof-firmware.files
630c91
630c91
%files -f alsa-sof-firmware.files
630c91
%license LICENCE*
630c91
%doc README*
630c91
%dir %{_firmwarepath}
630c91
630c91
# Licence: 3-clause BSD
4de1c9
%{_firmwarepath}/*.bin
4de1c9
4de1c9
# Licence: 3-clause BSD
630c91
# .. for files with suffix .tplg
630c91
%{_firmwarepath}/intel/sof-tplg
630c91
630c91
# Licence: SOF (3-clause BSD plus others)
630c91
# .. for files with suffix .ri
630c91
630c91
%files debug -f alsa-sof-firmware.debug-files
630c91
630c91
%changelog
23be5c
* Mon Jan  9 2023 Jaroslav Kysela <perex@perex.cz> - 2.2.4-2
23be5c
- Update to v2.2.4
23be5c
23be5c
* Wed Dec  7 2022 Jaroslav Kysela <perex@perex.cz> - 2.2.3-1
23be5c
- Update to v2.2.3
23be5c
23be5c
* Thu Sep 29 2022 Jaroslav Kysela <perex@perex.cz> - 2.2.2-1
23be5c
- Update to v2.2.2
23be5c
70e4f2
* Mon Jun 20 2022 Jaroslav Kysela <perex@perex.cz> - 2.1.1-1
70e4f2
- Update to v2.1.1 + v2.1.1a (topology)
70e4f2
b2e9cf
* Wed May 11 2022 Jaroslav Kysela <perex@perex.cz> - 1.9.3-3
5df638
- Add sof-adl-rt711-l2-rt1316-l01.tplg topology file
5df638
39efd1
* Thu Dec 16 2021 Jaroslav Kysela <perex@perex.cz> - 1.9.3-1
39efd1
- Update to v1.9.3
39efd1
39efd1
* Tue Nov 23 2021 Jaroslav Kysela <perex@perex.cz> - 1.9.2-1
39efd1
- Update to v1.9.2
39efd1
4ff90b
* Tue Oct 26 2021 Jaroslav Kysela <perex@perex.cz> - 1.9-1
4ff90b
- Update to v1.9
4ff90b
4de1c9
* Thu Jul 22 2021 Jaroslav Kysela <perex@perex.cz> - 1.8-1
4de1c9
- Update to v1.8
4de1c9
- Add SST Skylake HDA topology binary
ed84b3
bc6164
* Sun Jan  3 2021 Jaroslav Kysela <perex@perex.cz> - 1.6.1-1
bc6164
- Update to v1.6.1
bc6164
f1fd4c
* Thu Dec 10 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-2
f1fd4c
- Update to v1.6 (Dec 9)
f1fd4c
271ef6
* Wed Nov 11 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-1
271ef6
- Update to v1.6 (Oct 13)
271ef6
630c91
* Mon Jun  8 2020 Jaroslav Kysela <perex@perex.cz> - 1.5-2
630c91
- Update to v1.5
630c91
630c91
* Tue Apr 21 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-2
630c91
- Initial version (Open Sound Firmware v1.4.2)