2009-01-10 14:03:47 +01:00
|
|
|
#! /bin/bash
|
2008-07-18 12:15:21 +02:00
|
|
|
|
2009-01-10 14:03:47 +01:00
|
|
|
# these are updated by the spec file
|
2008-10-28 00:21:37 +01:00
|
|
|
sourcedir=${0%/*}
|
2008-11-23 08:54:06 +01:00
|
|
|
|
2009-01-10 14:03:47 +01:00
|
|
|
filelist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
|
|
|
|
trap "rm -f $filelist" EXIT
|
|
|
|
cat >"$filelist"
|
2008-10-28 00:21:37 +01:00
|
|
|
flavor=${1##*-}
|
|
|
|
|
2009-01-10 14:03:47 +01:00
|
|
|
/usr/lib/rpm/find-provides "$@" <"$filelist"
|
|
|
|
|
2009-03-24 20:26:04 +01:00
|
|
|
(
|
|
|
|
grep '\.ko$' "$filelist" | \
|
|
|
|
xargs -r $sourcedir/symsets.pl --list-exported-symbols;
|
|
|
|
grep '/Module\.symvers$' "$filelist" | while read f; do
|
|
|
|
$sourcedir/symsets.pl --list-exported-symbols --symvers-file="$f"
|
|
|
|
done
|
|
|
|
) | awk -v flavor="$flavor" '
|
2009-01-10 14:03:47 +01:00
|
|
|
{
|
2009-03-24 20:26:04 +01:00
|
|
|
sub(/^0x0*/, "", $1);
|
|
|
|
if (!$1)
|
|
|
|
$1 = "0";
|
|
|
|
printf "ksym(%s:%s) = %s\n", flavor, $2, $1
|
|
|
|
}'
|
2009-01-10 14:03:47 +01:00
|
|
|
|
|
|
|
exit 0
|
2008-11-23 08:54:06 +01:00
|
|
|
|