kernel-firmware/makespec.sh
Takashi Iwai 50a1594899 Accepting request 906683 from home:tiwai:branches:Kernel:HEAD
- Update to version 20210716 (git commit b7c134f0d349):
  * linux-firmware: update NXP 8897/8997 firmware images
  * rtlwifi: de-dupe rtl8723b WiFi firmware
  * rtlwifi: de-dupe rtl8192e WiFi firmware
  * linux-firmware: update frimware for mediatek bluetooth chip (MT7921)
  * cxgb4: Update firmware to revision 1.26.0.0
  * firmware/i915/guc: Add HuC v7.9.3 for TGL & DG1
  * firmware/i915/guc: Add GuC v62.0.3 for ADL-P
  * firmware/i915/guc: Add GuC v62.0.0 for all platforms
- Make TW packages only installable on post-UsrMerge systems;
  the packages for Leap are found in OBS Kernel:stable:Backport repo,
  instead
- Update aliases from 5.14-rc1

OBS-URL: https://build.opensuse.org/request/show/906683
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=358
2021-07-16 14:30:05 +00:00

82 lines
2.0 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 "%postun$l"
echo "%{?regenerate_initrd_post}"
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
define_post $t
done
continue
fi
if [ "$line" = "@@SUBPKGFILES@@" ]; then
for t in $topics; do
echo "%files -f files-$t $t"
done
continue
fi
echo "$line"
done
exit 0