Blame SOURCES/gstreamer1.prov

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