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 # Set the prefix, unless it is overriden (used when building mono rpms)
18 exec_prefix
=@exec_prefix@
22 [ -x $bindir/monodis
] ||
exit 0;
23 [ -f $libdir/libmono.so
] ||
exit 0;
26 # set LD_LIBRARY_PATH to ensure that libmono.so is found
27 export LD_LIBRARY_PATH
=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
30 for i
in "${monolist[@]}"; do
31 ($bindir/monodis
--assemblyref $i |
awk '
32 BEGIN { START=0; LIBNAME=""; VERSION=""; }
33 (START==0) && /^[0-9]+: Version=/ {
35 sub(/Version=/, "", $2);
39 (START==1) && /^\tName=/ {
43 print "mono(" LIBNAME ") = " VERSION
51 for i
in "${monolist[@]}"; do
52 ($bindir/monodis
--assembly $i |
awk '
53 BEGIN { LIBNAME=""; VERSION=""; }
54 /^Version:/ { VERSION=$2 }
55 /^Name:/ { LIBNAME=$2 }
57 if (VERSION && LIBNAME)
58 print "mono(" LIBNAME ") = " VERSION
64 # This is a little magic trick to get all REQUIRES that are not
65 # in PROVIDES. While RPM functions correctly when such deps exist,
66 # they make the metadata a bit bloated.
69 # Filter out dups from both lists
70 REQUIRES
=$
(echo "$REQUIRES" |
sort |
uniq)
71 PROVIDES
=$
(echo "$PROVIDES" |
sort |
uniq)
74 # Get a list of elements that exist in exactly one of PROVIDES or REQUIRES
76 UNIQ
=$
(echo "$PROVIDES
77 $REQUIRES" |
sort |
uniq -u)
80 # Of those, only chose the ones that are in REQUIRES
83 $REQUIRES" |
sort |
uniq -d