6 # Ben Maurer (bmaurer@ximian.com)
8 # (C) 2005 Novell (http://www.novell.com)
12 filelist
=($
(grep -Ev '/usr/doc/|/usr/share/doc/'))
13 monolist
=($
(printf "%s\n" "${filelist[@]}" |
egrep "\\.(exe|dll)\$"))
18 # Set the prefix, unless it is overriden (used when building mono rpms)
22 libdir
=$prefix/@reloc_libdir@
25 [ -x $bindir/monodis
] ||
exit 0;
26 [ -f $libdir/libmono.so
] ||
exit 0;
29 # set LD_LIBRARY_PATH to ensure that libmono.so is found
30 export LD_LIBRARY_PATH
=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
32 for i
in "${monolist[@]}"; do
33 ($bindir/monodis
--assembly $i |
awk '
34 BEGIN { LIBNAME=""; VERSION=""; }
35 /^Version:/ { VERSION=$2 }
36 /^Name:/ { LIBNAME=$2 }
38 if (LIBNAME ~ /^policy/) {
39 cnt = split(LIBNAME, toks, ".")
40 VERSION=toks[2] "." toks[3] ".0.0"
42 for (i=4; i<= cnt; i++)
43 LIBNAME = (LIBNAME toks[i] ".")
44 LIBNAME=substr(LIBNAME, 1, length(LIBNAME)-1)
46 if (VERSION && LIBNAME)
47 print "mono(" LIBNAME ") = " VERSION