A quick guide to creating an rpm of mono 3 from source, starting with a CentOS 6.4 minimal using fpm to create the package.c++
Install prerequisites for building mono 3ruby
yum -y update yum -y install glib2-devel libpng-devel libjpeg-devel giflib-devel libtiff-devel libexif-devel libX11-devel fontconfig-devel gettext make gcc-c++
Download and extract libgdiplus and mono sourcescurl
curl -O http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.9.tar.bz2 curl -O http://download.mono-project.com/sources/mono/mono-3.1.2.tar.bz2 tar -jxf libgdiplus-2.10.9.tar.bz2 tar -jxf mono-3.1.2.tar.bz2
Configure, make, and make installide
cd libgdiplus-2.10.9 ./configure --prefix=/opt/libgdiplus # overwrite incompatible libtool script in pixman cp libtool pixman/libtool make su -c "make install" cd mono-3.1.2 ./configure --prefix=/opt/mono-3.1.2 make su -c "make install"
Install ruby prerequisites for fpm, then fpm itselfpost
yum -y install ruby ruby-devel rubygems gem install fpm
Make sure /etc/hosts contains your host name since it will be used in some fpm defaults.ui
vi /etc/hosts
Install rpm tools and generate the RPMurl
yum -y install rpm-build fpm -s dir -t rpm -n "mono" -v 3.1.2 /opt/mono-3.1.2 /opt/libdgiplus
You probably will want to explore some other fpm options to customize your rpm further, like setting the maintainer, dependencies, or running pre/post install scripts.spa