66c68a3
#!/bin/bash
66c68a3
66c68a3
# This script reads filenames from STDIN and outputs any relevant provides
66c68a3
# information that needs to be included in the package.
66c68a3
0c1e1f9
targets=$@
0c1e1f9
if [ -z "$targets" ] ; then
0c1e1f9
    echo "Usage: $0 [ mingw32 ] [ mingw64 ]"
0c1e1f9
    exit 1
66c68a3
fi
66c68a3
66c68a3
filelist=`sed "s/['\"]/\\\&/g"`
66c68a3
66c68a3
dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll$')
66c68a3
66c68a3
for f in $dlls; do
66c68a3
    basename=`basename $f | tr [:upper:] [:lower:]`
0c1e1f9
    for target in $targets; do
0c1e1f9
        host_triplet=`rpm --eval "%{${target}_target}"`
0c1e1f9
        [[ $f =~ .*$host_triplet.* ]] && echo "$target($basename)"
0c1e1f9
    done
66c68a3
done
0c1e1f9
0c1e1f9
exit 0