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
4de1c9
%global sof_ver 1.8
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
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}
4de1c9
Release:        1%{?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
4de1c9
BuildRequires:  alsa-topology >= %{tplg_version}
4de1c9
BuildRequires:  alsa-topology-utils >= %{tplg_version}
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
630c91
# remove NXP firmware files
4de1c9
rm LICENCE.NXP
4de1c9
rm -rf firmware/intel/sof-tplg/sof-imx8*
630c91
630c91
%build
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
4de1c9
alsatplg -c /usr/share/alsa/topology/hda-dsp/skl_hda_dsp_generic-tplg.conf \
4de1c9
         -o firmware/skl_hda_dsp_generic-tplg.bin
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
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)