kernel-firmware/makespec.sh
Takashi Iwai 6b93b3b057 Accepting request 732617 from home:tiwai:branches:Kernel:HEAD
- Update to version 20190909 (git-commit 6c6918ad8ae0):
  * linux-firmware: Update firmware file for Intel Bluetooth AX201
  * nvidia: Add XUSB firmware for Tegra186
  * Add symlinks for Tegra VIC firmware binaries
  * rtl_bt: Update RTL8723D BT FW to 0x828A_96F1
  * rtl_nic: add firmware rtl8125a-3
  * linux-firmware: Add firmware file for Intel Bluetooth AX201
  * Chelsio driver loads firmware configuration file to allow firmware
    to distribute resources before chip bring up. Chelsio NIC driver,
    cxgb4 searches for firmware config file at /lib/firmware/cxgb4/
    directory.
- Add dependency on dracut >= 049 (boo#1151552) to compressed f/w
  packages

OBS-URL: https://build.opensuse.org/request/show/732617
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=273
2019-09-23 07:44:12 +00:00

78 lines
1.8 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): coreutils"
echo "Requires(postun): coreutils"
echo "Requires(post): dracut >= 049"
echo "Conflicts: kernel < 5.3"
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