Because we work with CentOS4/RedHat Enterprise Linux 4, I installed the source package on that system, and tried to build the rpms.
Building the code was fine after I deactivated a couple of dependencies.
But I ran into some problems at the file checking stage. I wondered if I can prevent the build stage to happen again and again. That way I should be able to debug the file list check etc.
Reading the man page, these parameters are interesting:
--short-circuitSo with rpmbuild -bl mono.spec I was able to just run the file checking stage.
The errors I got were like this:
rpm build errors: File not found: /var/tmp/mono-2.0-6-root-root/usr/bin/certmgr/usr/bin/chktrust/usr/bin/gacutil/usr/bin/gmcs/usr/bin/mcs/usr/bin/mcs1
But the files do exist in the /var/tmp/mono-2.0-6-root-root/ directory
I finally realised that the problem was caused by the Macros.
see also http://rpm.org/wiki/PackagerDocs/Macros
I had to first add curly brackets to each Macro call:
But even then only the first line of the Macro had an effect.
This command was helpful in the files section to see that the Macros just were not resolved correctly:
In the end, I ended up adding the missing files to my own mono.spec file.
I also had a look at the last available RedHat spec file from Novell for Mono 1.9.x, and I guess there is a different rpm version for RHEL 4 and RHEL 5.
Here is my modified mono.spec file that works for RHEL4/CentOS4 for Mono 2.0:
Please download the src.rpm file from the Fedora 10 Beta, or later, and install it:
rpm -i mono-2.0-6.fc10.src.rpm
Then copy my modified mono.spec to /usr/src/redhat/SPECS, and build the packages:
rpmbuild -ba mono.spec
Alternatively, here is a zip file with the compiled RPM files for CentOS4/RHEL4:
I cannot guarantuee that it actually works, but feel free to use it for your own experiments!