Mono Packaging Guidelines
File Locations and Architectures
For a while, Fedora considered mono packages to be architecture-specific, and installed assemblies to %\{_libdir}. However, after discussions with upstream, we now consider mono packages to be architecture (and platform) independent. This means that mono packages should be correctly installed into the GAC in in %\{_monogacdir} or installed into /usr/lib/PACKAGENAME.
As a notable exception, any ELF binary libraries generated in a mono package must be correctly installed into %\{_libdir}, because these files are architecture-specific.
Also, even though we consider mono packages to be architecture independent, they must not be marked as "noarch". Although the assemblies are the same, the files may differ due to strings referring to the build architecture.
In addition, because some architectures simply do not support mono, every mono package (either a library or a mono-using application) must include
ExclusiveArch: %{mono_arches}
The `+%mono_arches+` must be used instead of a list of architectures in order to facilitate changes to the architecture list.
gacutil in a spec file
gacutil is used to register dlls with mono (think of it as installing a library - which it is!).
When packaging *any* mono application which generates libraries which gacutil then registers (say mysql-connector-net), you need something like the following in the spec file
mkdir -p %{buildroot}/%{_monogacdir}
gacutil -i bin/mono-1.0/release/MySql.Data.dll -f -package mysql-connector-net -root %{buildroot}/usr/lib
gacutil format
-i = input dll
-f = check references
-package = package name
-root = build root
RPMS and source
Don't build RPMS against built from source versions of mono. It will work for you but probably not for other users!
While you may get away with recompiling the source for part of the overall package (such as gnome-panel is part of gnome or evolution-data-server is part of evolution) for other programs, you should not attempt this with Mono.
If you're going to use the source, you *MUST* remove the RPMS first.
Compiling mono is not a trivial matter and may not even work (when you download the source, you must also _make get-monolite-latest_ which grabs a version of the corelib and mcs which are need for compiling the main C# compilers - the monolite-latest does not always work and you end up without a working copy of Mono.