kernel-firmware/makespec.sh
Takashi Iwai 8e8eb79471 - Update to version 20240809 (git commit 36db650dae03):
* qcom: update path for video firmware for vpu-1/2/3.0
  * QCA: Update Bluetooth WCN685x 2.1 firmware to 2.1.0-00642
  * rtw89: 8852c: add fw format-1 v0.27.97.0
  * rtw89: 8852bt: add firmware 0.29.91.0
  * amdgpu: Update ISP FW for isp v4.1.1
  * mediatek: Update mt8195 SOF firmware
  * amdgpu: DMCUB updates for DCN314
  * xe: First GuC release v70.29.2 for BMG
  * xe: Add GuC v70.29.2 for LNL
  * i915: Add GuC v70.29.2 for ADL-P, DG1, DG2, MTL, and TGL
  * i915: Update MTL DMC v2.22
  * i915: update MTL GSC to v102.0.10.1878
  * xe: Add BMG HuC 8.2.10
  * xe: Add GSC 104.0.0.1161 for LNL
  * xe: Add LNL HuC 9.4.13
  * i915: update DG2 HuC to v7.10.16
  * amdgpu: Update ISP FW for isp v4.1.1
  * QCA: Update Bluetooth QCA2066 firmware to 2.1.0-00641

  (bsc#1229069, CVE-2023-31315)

OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=494
2024-08-13 07:39:44 +00:00

103 lines
2.5 KiB
Bash

#!/bin/sh
#
# makespec.sh VERSION < kernel-firmware.spec.in > kernel-firmware.spec
#
export LANG=C
version="$1"
topics=$(awk '{print $1}' topicdefs | sort)
define_subpackage () {
local topic="$1"
local desc=$(grep '^'"$topic"'[[:space:]]' topicdefs | sed -e's/^[a-zA-Z0-9-]*[[:space:]]*//')
echo "%package $topic"
echo "Summary: Kernel firmware files for $desc"
echo "Group: System/Kernel"
echo "Requires(post): /usr/bin/mkdir /usr/bin/touch"
echo "Requires(postun):/usr/bin/mkdir /usr/bin/touch"
echo "Requires(post): dracut >= 049"
echo "Conflicts: kernel < 5.3"
echo "Conflicts: kernel-firmware < %{version}"
echo "Conflicts: kernel-firmware-uncompressed"
echo "%if 0%{?suse_version} >= 1550"
echo "# make sure we have post-usrmerge filesystem package on TW"
echo "Conflicts: filesystem < 84"
echo "%endif"
grep "^${topic}:" topicprovs | sed -e's/^[^ \t]*:[[:space:]]*//g'
sh ./get_supplements.sh $topic
echo
echo "%description $topic"
echo "This package contains compressed kernel firmware files for"
echo "$desc."
echo
}
define_post () {
local l="$*"
if [ -z "$l" -a -f uncompressed-post ]; then
cat uncompressed-post
return 0
fi
if [ -n "$l" -a -f "$l"-post ]; then
cat "$l"-post
return 0
fi
test -n "$l" && l=" $l"
echo "%post$l"
echo "%{?regenerate_initrd_post}"
echo
echo "%postun$l"
echo "%{?regenerate_initrd_post}"
echo
echo "%posttrans$l"
echo "%{?regenerate_initrd_posttrans}"
}
sed -e"s/@@VERSION@@/$version/g" | while read line; do
if [ "$line" = "@@ALLPROVS@@" ]; then
sed -e's/^[^ \t]*:[[:space:]]*//g' topicprovs
continue
fi
if [ "$line" = "@@SUBPKGLIST@@" ]; then
for t in $topics; do
echo "Requires: %{name}-$t = %{version}"
done
continue
fi
if [ "$line" = "@@SUBPKGPROVS@@" ]; then
for t in $topics; do
echo "Provides: %{name}-$t = %{version}"
done
continue
fi
if [ "$line" = "@@SUBPACKAGES@@" ]; then
for t in $topics; do
define_subpackage $t
done
continue
fi
case "$line" in
@@POST@@*)
define_post $(echo "$line" | sed -e's/^@@POST@@ *//')
continue;;
esac
if [ "$line" = "@@SUBPKGPOSTS@@" ]; then
for t in $topics; do
echo
define_post $t
done
continue
fi
if [ "$line" = "@@SUBPKGFILES@@" ]; then
for t in $topics; do
echo "%files -f files-$t $t"
echo
done
continue
fi
echo "$line"
done
exit 0