Skip to content

Instantly share code, notes, and snippets.

@panesofglass
Created March 12, 2010 20:10
Show Gist options
  • Save panesofglass/330727 to your computer and use it in GitHub Desktop.
Save panesofglass/330727 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo "Ensuring directory"
mkdir -p ~/src/mono
cd ~/src/mono
curr=`pwd`
echo "Changed to $curr"
MONO_PREFIX=/usr/local/mono
cat << EOF > mono_env
MONO_PREFIX=${MONO_PREFIX}
export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$MONO_PREFIX/include:$C_INCLUDE_PATH
export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
export MONO_GAC_PREFIX=$MONO_PREFIX
PATH=$MONO_PREFIX/bin:$PATH
PS1="[mono] \w @ "
EOF
echo "Created build environment settings"
. mono_env
sudo aptitude install -fy libpng12-dev libpng3-dev libtiff-dev libjpeg-dev libgif-dev libungif4-dev libexif-dev bison
echo "Downloading libraries"
if [ ! -f "mono-2.6.1.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.6.1.tar.bz2; fi
if [ ! -f "libgdiplus-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.6.tar.bz2; fi
if [ ! -f "xsp-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.6.tar.bz2; fi
if [ ! -f "mono-tools-2.6.1.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/mono-tools/mono-tools-2.6.1.tar.bz2; fi
if [ ! -f "boo-0.9.2.3383.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/boo/boo-0.9.2.3383.tar.bz2; fi
if [ ! -f "ikvmbin-0.40.0.1.zip" ]; then wget http://ftp.novell.com/pub/mono/sources/ikvm/ikvmbin-0.40.0.1.zip; fi
if [ ! -f "mono-debugger-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/mono-debugger/mono-debugger-2.6.tar.bz2; fi
if [ ! -f "mono-addins-0.4.zip" ]; then wget http://ftp.novell.com/pub/mono/sources/mono-addins/mono-addins-0.4.zip; fi
echo "Extracting sources"
libs="*.tar.bz2"
for l in $libs; do if [ ! -d ${l%.tar.bz2} ]; then tar -xjf "${l}"; fi; done
libs="*.tar.gz"
for l in $libs; do if [ ! -d ${l%.tar.gz} ]; then tar -xzf "${l}"; fi; done
libs="*.zip"
for l in $libs; do if [ ! -d ${l%.zip} ]; then unzip "$l" -d ${l%.zip}; fi; done
echo "Building libgdiplus"
cd libgdiplus-2.6
make clean
./configure --prefix=/usr/local/mono
make
sudo make install
echo "Building mono"
cd ../mono-2.6.1
make distclean
./configure --prefix=$MONO_PREFIX --with-profile4=yes --with-moonlight=yes
make
sudo make install
echo "Building mono addins"
cd mono-addins-0.4/mono-addins-0.4
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling mono-tools"
cd ../mono-tools-2.6.1
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building xsp"
cd ../xsp-2.6
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling debugger"
cd ../mono-debugger-2.6
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling boo"
cd ../boo-0.9.2.3383
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling IKVM"
sudo cp ikvmbin-0.40.0.1/ikvm-0.40.0.1/bin/* /usr/local/mono/bin
sudo cp ikvmbin-0.40.0.1/ikvm-0.40.0.1/bin-x64/* /usr/local/mono/bin
echo "All done"
#!/usr/bin/env bash
echo "Ensuring directory"
mkdir -p ~/src/mono
cd ~/src/mono
curr=`pwd`
echo "Changed to $curr"
MONO_PREFIX=/usr/local/mono
cat << EOF > mono_env
MONO_PREFIX=${MONO_PREFIX}
export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$MONO_PREFIX/include:$C_INCLUDE_PATH
export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
export MONO_GAC_PREFIX=$MONO_PREFIX
PATH=$MONO_PREFIX/bin:$PATH
PS1="[mono] \w @ "
EOF
echo "Created build environment settings"
. mono_env
sudo aptitude install -fy libpng12-dev libpng3-dev libtiff-dev libjpeg-dev libgif-dev libungif4-dev libexif-dev libxrender-dev libcairo-dev libcairo2-dev gnome-devel libgtkhtml2-dev libvte-dev libgtksourceview-dev libgtksourceview2.0-dev libwebkit-dev bison
echo "Downloading libraries"
if [ ! -f "mono-2.6.1.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.6.1.tar.bz2; fi
if [ ! -f "libgdiplus-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.6.tar.bz2; fi
if [ ! -f "gluezilla-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/gluezilla/gluezilla-2.6.tar.bz2; fi
if [ ! -f "xsp-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.6.tar.bz2; fi
if [ ! -f "mono-tools-2.6.1.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/mono-tools/mono-tools-2.6.1.tar.bz2; fi
if [ ! -f "gecko-sharp-2.0-0.13.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/gecko-sharp2/gecko-sharp-2.0-0.13.tar.bz2; fi
if [ ! -f "gtksourceview-sharp-2.0-0.12.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/gtksourceview-sharp2/gtksourceview-sharp-2.0-0.12.tar.bz2; fi
if [ ! -f "boo-0.9.2.3383.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/boo/boo-0.9.2.3383.tar.bz2; fi
if [ ! -f "ikvmbin-0.40.0.1.zip" ]; then wget http://ftp.novell.com/pub/mono/sources/ikvm/ikvmbin-0.40.0.1.zip; fi
if [ ! -f "mono-debugger-2.6.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/mono-debugger/mono-debugger-2.6.tar.bz2; fi
if [ ! -f "mono-addins-0.4.zip" ]; then wget http://ftp.novell.com/pub/mono/sources/mono-addins/mono-addins-0.4.zip; fi
if [ ! -f "gtk-sharp-2.12.9.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.9.tar.bz2; fi
if [ ! -f "gnome-sharp-2.24.1.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/gnome-sharp2/gnome-sharp-2.24.1.tar.bz2; fi
if [ ! -f "gnome-desktop-sharp-2.24.0.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/gnome-desktop-sharp2/gnome-desktop-sharp-2.24.0.tar.bz2; fi
if [ ! -f "monodevelop-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop/monodevelop-2.2.tar.bz2; fi
if [ ! -f "monodevelop-boo-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop-boo/monodevelop-boo-2.2.tar.bz2; fi
if [ ! -f "monodevelop-database-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop-database/monodevelop-database-2.2.tar.bz2; fi
if [ ! -f "monodevelop-debugger-gdb-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop-debugger-gdb/monodevelop-debugger-gdb-2.2.tar.bz2; fi
if [ ! -f "monodevelop-debugger-mdb-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop-debugger-mdb/monodevelop-debugger-mdb-2.2.tar.bz2; fi
if [ ! -f "monodevelop-java-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop-java/monodevelop-java-2.2.tar.bz2; fi
if [ ! -f "monodevelop-vala-2.2.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/monodevelop-vala/monodevelop-vala-2.2.tar.bz2; fi
if [ ! -f "webkit-sharp-0.3.tar.bz2" ]; then wget http://ftp.novell.com/pub/mono/sources/webkit-sharp/webkit-sharp-0.3.tar.bz2; fi
echo "Extracting sources"
libs="*.tar.bz2"
for l in $libs; do if [ ! -d ${l%.tar.bz2} ]; then tar -xjf "${l}"; fi; done
libs="*.tar.gz"
for l in $libs; do if [ ! -d ${l%.tar.gz} ]; then tar -xzf "${l}"; fi; done
libs="*.zip"
for l in $libs; do if [ ! -d ${l%.zip} ]; then unzip "$l" -d ${l%.zip}; fi; done
echo "Building libgdiplus"
cd libgdiplus-2.6
make clean
./configure --prefix=/usr/local/mono
make
sudo make install
echo "Building mono"
cd ../mono-2.6.1
make distclean
./configure --prefix=$MONO_PREFIX --with-profile4=yes --with-moonlight=yes
make
sudo make install
echo "Building gtk-sharp2"
cd ../gtk-sharp-2.12.9
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building gnome-sharp2"
cd ../gnome-sharp-2.24.1
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building gluezilla"
cd ../gluezilla-2.6
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building gtksourceview-sharp"
cd ../gtksourceview-sharp-2.0-0.12
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building gecko-sharp"
cd ../gecko-sharp-2.0-0.13
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building webkit-sharp"
cd ../webkit-sharp-0.3
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building mono addins"
cd mono-addins-0.4/mono-addins-0.4
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling mono-tools"
cd ../mono-tools-2.6.1
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building xsp"
cd ../xsp-2.6
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling debugger"
cd ../mono-debugger-2.6
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling boo"
cd ../boo-0.9.2.3383
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling IKVM"
sudo cp ikvmbin-0.40.0.1/ikvm-0.40.0.1/bin/* /usr/local/mono/bin
sudo cp ikvmbin-0.40.0.1/ikvm-0.40.0.1/bin-x64/* /usr/local/mono/bin
echo "Buidling monodevelop"
cd ../monodevelop-2.2
make clean
./configure --prefix=$MONO_PREFIX --profile=default
make
sudo make install
echo "Building monodevelop boo support"
cd ../monodevelop-boo-2.2
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building monodevelop database support"
cd ../monodevelop-database-2.2
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building monodevelop gdb debugger"
cd ../monodevelop-debugger-gdb-2.2
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building monodevelop mdb debugger"
cd ../monodevelop-debugger-mdb-2.2
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Building monodevelop java support"
cd ../monodevelop-java-2.2
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "Buidling monodevelop vala support"
cd ../monodevelop-vala-2.2
make clean
./configure --prefix=$MONO_PREFIX
make
sudo make install
echo "All done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment