From 4a57dcbb15cd2166f13aab647986e90e541083bb Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: May 12 2020 09:41:03 +0000 Subject: Remove the version from all paths --- diff --git a/alsa-sof-firmware.spec b/alsa-sof-firmware.spec index 6bf7fba..c015b75 100644 --- a/alsa-sof-firmware.spec +++ b/alsa-sof-firmware.spec @@ -11,7 +11,7 @@ Summary: Firmware and topology files for Sound Open Firmware project Name: alsa-sof-firmware Version: %{sof_version} -Release: 5%{?dist} +Release: 6%{?dist} # See later in the spec for a breakdown of licensing License: BSD URL: https://github.com/thesofproject/sof-bin @@ -35,23 +35,55 @@ This package contains the debug files for the Sound Open Firmware project. %prep %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 -ln -s v1.4.2/intel-signed/sof-cnl-v1.4.2.ri lib/firmware/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-cml.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 %install mkdir -p %{buildroot}%{_firmwarepath} cp -ra lib/firmware/* %{buildroot}%{_firmwarepath} -# remove NXP firmware files -rm -rf %{buildroot}%{_firmwarepath}/nxp # gather files and directories FILEDIR=$(pwd) pushd %{buildroot}/%{_firmwarepath} 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 . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs popd @@ -74,8 +106,18 @@ cat alsa-sof-firmware.files %files debug -f alsa-sof-firmware.debug-files +%pretrans -p +path = "%{_firmwarepath}/intel/sof-tplg" +st = posix.stat(path) +if st and st.type == "link" then + os.remove(path) +end %changelog +* Tue May 12 2020 Jaroslav Kysela - 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 - 1.4.2-5 - Add missing symlink for sof-cfl.ri