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)\$"))
15 # Only include files with /gac/ in path
16 # (Allows packages to contain private assemblies that don't conflict with other packages)
17 #monolist=($(printf "%s\n" "${monolist[@]}" | egrep "/gac/"))
18 # Disabled... see ChangeLog
20 # Set the prefix, unless it is overriden (used when building mono rpms)
23 libdir
=$prefix/@reloc_libdir@
26 # Bail out if monodis or libmono is missing
27 if [ ! -x $bindir/monodis
] ||
[ ! -f $libdir/libmono-2.0.so
.1 ] ; then
28 echo "monodis missing or unusable, exiting..." 1>&2
33 # set LD_LIBRARY_PATH to ensure that libmono is found
34 export LD_LIBRARY_PATH
=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
35 # and set MONO_PATH to ensure that mscorlib.dll can be found
36 export MONO_PATH
=$prefix/lib
/mono
/2.0
38 for i
in "${monolist[@]}"; do
39 ($bindir/monodis
--assembly $i |
awk '
40 BEGIN { LIBNAME=""; VERSION=""; }
41 /^Version:/ { VERSION=$2 }
42 /^Name:/ { LIBNAME=$2 }
44 if (LIBNAME ~ /^policy/) {
45 cnt = split(LIBNAME, toks, ".")
46 VERSION=toks[2] "." toks[3] ".0.0"
48 for (i=4; i<= cnt; i++)
49 LIBNAME = (LIBNAME toks[i] ".")
50 LIBNAME=substr(LIBNAME, 1, length(LIBNAME)-1)
52 if (VERSION && LIBNAME)
53 print "mono(" LIBNAME ") = " VERSION