-#!/bin/sh
+#!/bin/bash
#
# mono-find-requires
#
filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/'))
monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
+a=`which "$0"`
+d=`dirname "$a"`
+
# Set the prefix, unless it is overriden (used when building mono rpms)
-: ${prefix=@prefix@}
+: ${prefix=$d/..}
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-bindir=@bindir@
+exec_prefix=$d/..
+libdir=$prefix/@reloc_libdir@
+bindir=$d
[ -x $bindir/monodis ] || exit 0;
[ -f $libdir/libmono.so ] || exit 0;
sub(/Version=/, "", $2);
VERSION=$2
}
-
+
(START==1) && /^\tName=/ {
sub(/Name=/, "", $1);
LIBNAME=$1
-
- print "mono(" LIBNAME ") = " VERSION
+ # Allow rpm deps to be resolved for 1.0 profile version
+ if (VERSION=="1.0.3300.0")
+ OP=">="
+ else
+ OP="="
+ print "mono(" LIBNAME ") " OP " " VERSION
START=0
}
') 2> /dev/null
$REQUIRES" | sort | uniq -u)
#
-# Of those, only chose the ones that are in REQUIRES
+# Of those, only choose the ones that are in REQUIRES
#
echo "$UNIQ
$REQUIRES" | sort | uniq -d