Remove the version from all paths
This commit is contained in:
parent
ec2cc55a2e
commit
4a57dcbb15
@ -11,7 +11,7 @@
|
|||||||
Summary: Firmware and topology files for Sound Open Firmware project
|
Summary: Firmware and topology files for Sound Open Firmware project
|
||||||
Name: alsa-sof-firmware
|
Name: alsa-sof-firmware
|
||||||
Version: %{sof_version}
|
Version: %{sof_version}
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
# See later in the spec for a breakdown of licensing
|
# See later in the spec for a breakdown of licensing
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/thesofproject/sof-bin
|
URL: https://github.com/thesofproject/sof-bin
|
||||||
@ -35,23 +35,55 @@ This package contains the debug files for the Sound Open Firmware project.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n sof-bin-%{sof_commit}
|
%autosetup -n sof-bin-%{sof_commit}
|
||||||
|
|
||||||
|
cd lib/firmware
|
||||||
|
|
||||||
|
# we have the version in the package name
|
||||||
|
mv intel/sof/v1.4.2/* intel/sof
|
||||||
|
rmdir intel/sof/v1.4.2
|
||||||
|
|
||||||
|
# rename intel signed firmware files
|
||||||
|
for platform in apl cnl icl; do
|
||||||
|
mv intel/sof/intel-signed/sof-$platform-v1.4.2.ri intel/sof/intel-signed/sof-$platform.ri
|
||||||
|
ln -sf intel-signed/sof-$platform.ri intel/sof/sof-$platform.ri
|
||||||
|
done
|
||||||
|
|
||||||
|
# rename public signed firmware files
|
||||||
|
for platform in apl cnl icl; do
|
||||||
|
mv intel/sof/public-signed/sof-$platform-v1.4.2.ri intel/sof/public-signed/sof-$platform.ri
|
||||||
|
done
|
||||||
|
|
||||||
|
# rename unsigned firmware files
|
||||||
|
for platform in bdw byt cht; do
|
||||||
|
mv intel/sof/sof-$platform-v1.4.2.ri intel/sof/sof-$platform.ri
|
||||||
|
done
|
||||||
|
|
||||||
|
# rename debug files
|
||||||
|
for platform in apl bdw byt cht cnl icl; do
|
||||||
|
mv intel/sof/sof-$platform-v1.4.2.ldc intel/sof/sof-$platform.ldc
|
||||||
|
done
|
||||||
|
|
||||||
# add missing symlink
|
# add missing symlink
|
||||||
ln -s v1.4.2/intel-signed/sof-cnl-v1.4.2.ri lib/firmware/intel/sof/sof-cml.ri
|
ln -s intel-signed/sof-cnl.ri intel/sof/sof-cml.ri
|
||||||
ln -s v1.4.2/intel-signed/sof-cnl-v1.4.2.ri lib/firmware/intel/sof/sof-cfl.ri
|
ln -s intel-signed/sof-cnl.ri intel/sof/sof-cfl.ri
|
||||||
|
|
||||||
|
# move topology files
|
||||||
|
rm intel/sof-tplg
|
||||||
|
mv intel/sof-tplg-v1.4.2 intel/sof-tplg
|
||||||
|
|
||||||
|
# remove NXP firmware files
|
||||||
|
rm -rf nxp
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_firmwarepath}
|
mkdir -p %{buildroot}%{_firmwarepath}
|
||||||
cp -ra lib/firmware/* %{buildroot}%{_firmwarepath}
|
cp -ra lib/firmware/* %{buildroot}%{_firmwarepath}
|
||||||
# remove NXP firmware files
|
|
||||||
rm -rf %{buildroot}%{_firmwarepath}/nxp
|
|
||||||
|
|
||||||
# gather files and directories
|
# gather files and directories
|
||||||
FILEDIR=$(pwd)
|
FILEDIR=$(pwd)
|
||||||
pushd %{buildroot}/%{_firmwarepath}
|
pushd %{buildroot}/%{_firmwarepath}
|
||||||
find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files
|
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 "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files
|
||||||
find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-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
|
find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs
|
||||||
popd
|
popd
|
||||||
@ -74,8 +106,18 @@ cat alsa-sof-firmware.files
|
|||||||
|
|
||||||
%files debug -f alsa-sof-firmware.debug-files
|
%files debug -f alsa-sof-firmware.debug-files
|
||||||
|
|
||||||
|
%pretrans -p <lua>
|
||||||
|
path = "%{_firmwarepath}/intel/sof-tplg"
|
||||||
|
st = posix.stat(path)
|
||||||
|
if st and st.type == "link" then
|
||||||
|
os.remove(path)
|
||||||
|
end
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 12 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-6
|
||||||
|
- Fix the upgrade (make /usr/lib/firmware/intel/sof-tplg directory again)
|
||||||
|
- Remove the version from all paths
|
||||||
|
|
||||||
* Thu Apr 30 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-5
|
* Thu Apr 30 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-5
|
||||||
- Add missing symlink for sof-cfl.ri
|
- Add missing symlink for sof-cfl.ri
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user