2008-03-25 10:48:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Script to install in:
|
|
|
|
# /usr/lib/rpm/redhat/find-provides.d
|
|
|
|
#
|
|
|
|
# Transform GStreamer auto install info into RPM provides
|
|
|
|
#
|
|
|
|
# Author: Bastien Nocera <hadess@hadess.net>
|
|
|
|
# Based on other provides scripts from RPM
|
|
|
|
#
|
|
|
|
|
2008-09-11 23:48:12 +00:00
|
|
|
filelist=`grep -e '.so$' | sed "s/['\"]/\\\&/g"`
|
2008-03-25 10:48:18 +00:00
|
|
|
|
|
|
|
# --- Alpha does not mark 64bit dependencies•
|
|
|
|
case `uname -m` in
|
|
|
|
alpha*) mark64="" ;;
|
|
|
|
*) mark64="()(64bit)" ;;
|
|
|
|
esac
|
|
|
|
|
2008-09-11 23:48:12 +00:00
|
|
|
solist=$(echo $filelist | grep -v "^/lib/ld.so" | \
|
2008-03-25 10:48:18 +00:00
|
|
|
xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1 | grep libgst)
|
|
|
|
|
|
|
|
function getmark()
|
|
|
|
{
|
|
|
|
lib64=`if file -L $1 2>/dev/null | \
|
|
|
|
grep "ELF 64-bit" >/dev/null; then echo -n "$mark64"; fi`
|
|
|
|
}
|
|
|
|
|
2008-09-14 13:20:53 +00:00
|
|
|
function libdir()
|
|
|
|
{
|
|
|
|
buildlibdir=`dirname $1`
|
|
|
|
buildlibdir=`dirname $buildlibdir`
|
|
|
|
}
|
|
|
|
|
2008-03-25 10:48:18 +00:00
|
|
|
for so in $solist ; do
|
|
|
|
getmark $so
|
2008-09-14 13:20:53 +00:00
|
|
|
libdir $so
|
|
|
|
LD_LIBRARY_PATH=$buildlibdir gst-inspect --print-plugin-auto-install-info --rpm $so 2> /dev/null | while read line ; do
|
2008-03-25 10:48:18 +00:00
|
|
|
echo -n "$line";
|
|
|
|
echo -n "$lib64"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|