Blame SPECS/alsa-sof-firmware.spec

fd8d81
# This is a firmware package, so binaries (which are not run on the host)
fd8d81
# in the end package are expected.
fd8d81
%define _binaries_in_noarch_packages_terminate_build   0
fd8d81
%global _firmwarepath  /usr/lib/firmware
fd8d81
fd8d81
fc86ae
%global sof_version 1.6.1
fc86ae
%global sof_commit f31c9ce30ac2792ec39e19da489aee7631e00654
fd8d81
%global sof_shortcommit %(c=%{sof_commit}; echo ${c:0:7})
fd8d81
fd8d81
Summary:        Firmware and topology files for Sound Open Firmware project
fd8d81
Name:           alsa-sof-firmware
fd8d81
Version:        %{sof_version}
fd8d81
Release:        2%{?dist}
fd8d81
# See later in the spec for a breakdown of licensing
fd8d81
License:        BSD
fd8d81
URL:            https://github.com/thesofproject/sof-bin
fd8d81
Source:         https://github.com/thesofproject/sof-bin/archive/%{sof_commit}/sof-bin-%{sof_shortcommit}.tar.gz
fd8d81
fd8d81
# noarch, since the package is firmware
fd8d81
BuildArch:      noarch
fd8d81
fd8d81
%description
fd8d81
This package contains the firmware binaries for the Sound Open Firmware project.
fd8d81
fd8d81
%package debug
fd8d81
Requires:       alsa-sof-firmware
fd8d81
Summary:        Debug files for Sound Open Firmware project
fd8d81
License:        BSD
fd8d81
fd8d81
%description debug
fd8d81
This package contains the debug files for the Sound Open Firmware project.
fd8d81
fd8d81
%prep
fd8d81
%autosetup -n sof-bin-%{sof_commit}
fd8d81
fd8d81
cd lib/firmware
fd8d81
fd8d81
# we have the version in the package name
fd8d81
mv intel/sof/v%{sof_version}/* intel/sof
fd8d81
rmdir intel/sof/v%{sof_version}
fd8d81
fd8d81
# rename intel signed firmware files
fc86ae
for platform in apl cnl ehl icl tgl tgl-h; do
fd8d81
  mv intel/sof/intel-signed/sof-$platform-v%{sof_version}.ri intel/sof/intel-signed/sof-$platform.ri
fd8d81
  ln -sf intel-signed/sof-$platform.ri intel/sof/sof-$platform.ri
fd8d81
done
fd8d81
fd8d81
# rename public signed firmware files
fc86ae
for platform in apl cnl icl jsl tgl tgl-h; do
fd8d81
  mv intel/sof/public-signed/sof-$platform-v%{sof_version}.ri intel/sof/public-signed/sof-$platform.ri
fd8d81
done
fd8d81
fd8d81
# rename unsigned firmware files
fd8d81
for platform in bdw byt cht; do
fd8d81
  mv intel/sof/sof-$platform-v%{sof_version}.ri intel/sof/sof-$platform.ri
fd8d81
done
fd8d81
fd8d81
# rename debug files
fc86ae
for platform in apl bdw byt cht cnl ehl icl tgl tgl-h; do
fd8d81
  mv intel/sof/sof-$platform-v%{sof_version}.ldc intel/sof/sof-$platform.ldc
fd8d81
done
fd8d81
fc86ae
# add missing symlinks
fc86ae
ln -s intel-signed/sof-apl.ri intel/sof/sof-glk.ri
fd8d81
ln -s intel-signed/sof-cnl.ri intel/sof/sof-cml.ri
fd8d81
ln -s intel-signed/sof-cnl.ri intel/sof/sof-cfl.ri
fd8d81
fd8d81
# move topology files
fd8d81
rm -f intel/sof-tplg
fd8d81
mv intel/sof-tplg-v%{sof_version} intel/sof-tplg
fd8d81
fd8d81
# remove NXP firmware files
fc86ae
rm -rf nxp ../../LICENCE.NXP
fc86ae
rm -rf intel/sof-tplg/sof-imx8*
fd8d81
fd8d81
%build
fd8d81
fd8d81
%install
fd8d81
mkdir -p %{buildroot}%{_firmwarepath}
fd8d81
cp -ra lib/firmware/* %{buildroot}%{_firmwarepath}
fd8d81
fd8d81
# gather files and directories
fd8d81
FILEDIR=$(pwd)
fd8d81
pushd %{buildroot}/%{_firmwarepath}
fd8d81
find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files
fd8d81
#find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files
fd8d81
find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files
fd8d81
find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs
fd8d81
popd
fd8d81
sed -i -e 's:^./::' alsa-sof-firmware.{files,debug-files,dirs}
fd8d81
sed -i -e 's!^!/usr/lib/firmware/!' alsa-sof-firmware.{files,debug-files,dirs}
fd8d81
sed -e 's/^/%%dir /' alsa-sof-firmware.dirs >> alsa-sof-firmware.files
fd8d81
cat alsa-sof-firmware.files
fd8d81
fd8d81
%files -f alsa-sof-firmware.files
fd8d81
%license LICENCE*
fd8d81
%doc README*
fd8d81
%dir %{_firmwarepath}
fd8d81
fd8d81
# Licence: 3-clause BSD
fd8d81
# .. for files with suffix .tplg
fd8d81
%{_firmwarepath}/intel/sof-tplg
fd8d81
fd8d81
# Licence: SOF (3-clause BSD plus others)
fd8d81
# .. for files with suffix .ri
fd8d81
fd8d81
%files debug -f alsa-sof-firmware.debug-files
fd8d81
fd8d81
%changelog
fc86ae
* Fri Mar  5 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
fc86ae
- Add TGL-H firmware files
fc86ae
fc86ae
* Sun Jan  3 2021 Jaroslav Kysela <perex@perex.cz> - 1.6.1-1
fc86ae
- Update to v1.6.1
fc86ae
fc86ae
* Thu Dec 10 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-2
fc86ae
- Update to v1.6 (Dec 9)
fc86ae
fc86ae
* Wed Nov 11 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-1
fc86ae
- Update to v1.6 (Oct 13)
fc86ae
fd8d81
* Mon Jun  8 2020 Jaroslav Kysela <perex@perex.cz> - 1.5-2
fd8d81
- Update to v1.5
fd8d81
fd8d81
* Tue Apr 21 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-2
fd8d81
- Initial version (Open Sound Firmware v1.4.2)