Blame SPECS/alsa-sof-firmware.spec

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