forked from pool/kernel-source
35 lines
671 B
Bash
35 lines
671 B
Bash
#! /bin/sh
|
|
|
|
IFS=$'\n'
|
|
filelist=($(cat))
|
|
|
|
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides "$@"
|
|
|
|
# these two are updated by the spec file
|
|
sourcedir=${0%/*}
|
|
builddir="$sourcedir/../BUILD"
|
|
|
|
flavor=${1##*-}
|
|
|
|
modlist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
|
|
trap "rm -rf $modlist" EXIT
|
|
|
|
symvers=
|
|
for file in "${filelist[@]}"; do
|
|
case "$file" in
|
|
*/Module.symvers)
|
|
symvers="--symvers-file=$file"
|
|
;;
|
|
*.ko)
|
|
echo "$file" >>"$modlist"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
reference=
|
|
# TODO
|
|
# reference="--reference=$builddir/kabi/..."
|
|
$sourcedir/symsets.pl --list-symsets --modules=$modlist $symvers $reference |\
|
|
sed -rn 's/^(.+)\.([a-z0-9]{16})/kernel('$flavor':\1) = \2/p'
|
|
|