diff --git a/install-split.sh b/install-split.sh index d22cdda..d50a9c6 100644 --- a/install-split.sh +++ b/install-split.sh @@ -15,7 +15,7 @@ fi topics="$1" DESTDIR="$2" -fwdir=/lib/firmware +fwdir=${3:-/lib/firmware} dest=$DESTDIR/$fwdir do_compress=1 @@ -85,7 +85,7 @@ while read l; do $verbose "Switching to topic $topic" if [ -n "$topic" ]; then if [ ! -s files-$topic ]; then - echo "%dir /lib/firmware" > files-$topic + echo "%dir $fwdir" > files-$topic fi fi ;; diff --git a/kernel-firmware.changes b/kernel-firmware.changes index c99cb81..1c0e61b 100644 --- a/kernel-firmware.changes +++ b/kernel-firmware.changes @@ -14,6 +14,11 @@ Thu Oct 29 08:07:03 UTC 2020 - tiwai@suse.com * qcom : updated venus firmware files for v5.4 - Add _constraints to fix the build error (bsc#1178242) +------------------------------------------------------------------- +Mon Oct 19 12:57:37 UTC 2020 - Ludwig Nussel + +- use %_firmwaredir + ------------------------------------------------------------------- Mon Oct 12 10:09:10 CEST 2020 - tiwai@suse.de diff --git a/kernel-firmware.spec b/kernel-firmware.spec index 51a8cca..8b6c217 100644 --- a/kernel-firmware.spec +++ b/kernel-firmware.spec @@ -18,7 +18,7 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define __ksyms_path ^/lib/firmware +%define __ksyms_path ^%{_firmwaredir} %define version_unconverted 20201023 Name: kernel-firmware @@ -5685,11 +5685,11 @@ cp %{SOURCE2} %{SOURCE8} %{SOURCE9} %{SOURCE10} . # nothing to do %install -mkdir -p %{buildroot}/lib/firmware +mkdir -p %{buildroot}%{_firmwaredir} %if "%flavor" != "compressed" -sh ./copy-firmware.sh %{buildroot}/lib/firmware +sh ./copy-firmware.sh %{buildroot}%{_firmwaredir} %else -sh %{_sourcedir}/install-split.sh -v %{_sourcedir}/topics.list %{buildroot} < WHENCE +sh %{_sourcedir}/install-split.sh -v %{_sourcedir}/topics.list %{buildroot} %{_firmwaredir} < WHENCE sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list %endif %fdupes -s %{buildroot} @@ -5900,14 +5900,14 @@ sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list %files %doc WHENCE README %license GPL-2 GPL-3 LICEN[CS]E.* -/lib/firmware -%exclude /lib/firmware/amd-ucode -%exclude /lib/firmware/amd-ucode/* +%{_firmwaredir} +%exclude %{_firmwaredir}/amd-ucode +%exclude %{_firmwaredir}/amd-ucode/* %files -n ucode-amd %license LICENSE.amd-ucode -%dir /lib/firmware -/lib/firmware/amd-ucode +%dir %{_firmwaredir} +%{_firmwaredir}/amd-ucode %endif %if "%flavor" == "compressed" diff --git a/kernel-firmware.spec.in b/kernel-firmware.spec.in index 29a42b4..20d47a2 100644 --- a/kernel-firmware.spec.in +++ b/kernel-firmware.spec.in @@ -18,7 +18,7 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define __ksyms_path ^/lib/firmware +%define __ksyms_path ^%{_firmwaredir} %define version_unconverted @@VERSION@@ Name: kernel-firmware @@ -114,14 +114,14 @@ cp %{SOURCE2} %{SOURCE8} %{SOURCE9} %{SOURCE10} . # nothing to do %install -mkdir -p %{buildroot}/lib/firmware +mkdir -p %{buildroot}%{_firmwaredir} %if "%flavor" != "compressed" -sh ./copy-firmware.sh %{buildroot}/lib/firmware +sh ./copy-firmware.sh %{buildroot}%{_firmwaredir} %else -sh %{_sourcedir}/install-split.sh %{_sourcedir}/topics.list %{buildroot} < WHENCE +sh %{_sourcedir}/install-split.sh -v %{_sourcedir}/topics.list %{buildroot} %{_firmwaredir} < WHENCE sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list %endif -%fdupes %{buildroot} +%fdupes -s %{buildroot} %if "%flavor" != "compressed" @@POST@@ @@ -135,14 +135,14 @@ sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list %files %doc WHENCE README %license GPL-2 GPL-3 LICEN[CS]E.* -/lib/firmware -%exclude /lib/firmware/amd-ucode -%exclude /lib/firmware/amd-ucode/* +%{_firmwaredir} +%exclude %{_firmwaredir}/amd-ucode +%exclude %{_firmwaredir}/amd-ucode/* %files -n ucode-amd %license LICENSE.amd-ucode -%dir /lib/firmware -/lib/firmware/amd-ucode +%dir %{_firmwaredir} +%{_firmwaredir}/amd-ucode %endif %if "%flavor" == "compressed"