1
0
kernel-firmware/makespec.sh
Takashi Iwai c4d644630a Accepting request 981268 from home:tiwai:branches:Kernel:HEAD
- Update to version 20220607 (git commit 02c69863c885):
  * rtl_bt: Update RTL8852A BT USB firmware to 0xDFB8_0634
  * Makefile: replace mkdir by install
  * iwlwifi: remove old unsupported 3160/7260/7265/8000/8265 firmware
  * ath11k: WCN6855 hw2.0: update to WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
  * WHENCE: ath11k: move regdb.bin before board-2.bin
  * ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.9.0.2-00157
  * ath10k: QCA9888 hw2.0: update board-2.bin
  * ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.9.0.2-00157
  * ath10k: QCA4019 hw1.0: update board-2.bin
  * ath10k: WCN3990 hw1.0: add board-2.bin
- Update aliases from 5.19-rc1
- Minor adjustment of spec template and makespec.sh to align with
  the latest TW format

OBS-URL: https://build.opensuse.org/request/show/981268
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=378
2022-06-08 10:40:21 +00:00

86 lines
2.1 KiB
Bash

#!/bin/sh
#
# makespec.sh VERSION < kernel-firmware.spec.in > kernel-firmware.spec
#
version="$1"
topics=$(awk '{print $1}' topicdefs)
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 "%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="$*"
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" = "@@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