[Mono-devel-list] Adapting /etc/mono/config for a specific distribution

Dag Wieers dag at wieers.com
Wed Mar 3 07:38:40 EST 2004


Hi,

Here's the small script that I use now. I haven't added it to the RPM 
package as I want to make sure this is the right approach for packagers.

	#!/usr/bin/perl

	while(<>) {
	        $line=$_;
	        if ($line=~m| target="([^"]+)"|) {
	                $lib=$1;
	                if (($new=readlink("/lib/$lib")) or ($new=readlink("/usr/lib/$lib"))) {
	                        $line=~s| target="$lib"| target="$new"|;
	                }
	        }
	        print $line;
	}

On my RHFC1 system this would generate:

	[root at lisse mono]# cat /etc/mono/config | ./mono.pl
	<configuration>
	        <dllmap dll="cygwin1.dll" target="libc-2.3.2.so" />
	        <dllmap dll="libc" target="libc-2.3.2.so" />
	        <dllmap dll="libxslt.dll" target="libxslt.so.1.0.33" />
	        <dllmap dll="libmySQL.dll" target="libmysqlclient.so" />
	        <dllmap dll="odbc32.dll" target="libodbc.so.1.0.0" />
	        <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0.200.3" />
	        <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0.200.3" />
	        <dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0.so.0.200.3" />
	        <dllmap dll="libpango-1.0-0.dll" target="libpango-1.0.so.0.200.5" />
	        <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0.400.0" />
	        <dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0.200.4" />
	        <dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so.0.200.4" />
	        <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0.200.4" />
	        <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0.200.4" />
	        <dllmap dll="libglade-2.0-0.dll" target="libglade-2.0.so.0.0.1" />
	        <dllmap dll="oci" target="clntsh" />
	        <dllmap dll="gtkhtml-3.0" target="libgtkhtml-3.0.so.2.1.2" />
	        <dllmap dll="db2cli" target="libdb2_36.so"/>
	        <dllmap dll="gstreamer" target="libgstreamer-0.6.so.0.1.0" />
	</configuration>

Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]



More information about the Mono-devel-list mailing list