Browse Source

Install mono and xsp from official packages

Pēteris Ņikiforovs 10 years ago
parent
commit
fa84ef73ee
2 changed files with 24 additions and 36 deletions
  1. 20 23
      toolset/setup/linux/languages/mono.sh
  2. 4 13
      toolset/setup/linux/languages/xsp.sh

+ 20 - 23
toolset/setup/linux/languages/mono.sh

@@ -1,30 +1,27 @@
 #!/bin/bash
 
-set -x
+post_install () {
+  echo "Installing SSL certificates"
+  sudo mozroots --import --sync --machine
+  echo -e 'y\ny\ny\n' | sudo certmgr -ssl -m https://nuget.org
 
-RETCODE=$(fw_exists ${IROOT}/mono.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  echo "Installing RootCAs from Mozilla..."; 
-  sudo $IROOT/mono-3.6.0-install/bin/mozroots --import --sync;
-  return 0; }
+  # For apps that need write access to the registry
+  sudo mkdir -p /etc/mono/registry
+  sudo chmod 777 /etc/mono/registry
+}
 
-sudo apt-get install -y build-essential \
-             autoconf \
-             automake \
-             libtool \
-             zlib1g-dev \
-             pkg-config \
-             gettext
+RETCODE=$(fw_exists $IROOT/mono.installed)
+[ ! "$RETCODE" == 0 ] || { 
+  post_install
+  return 0
+}
 
-fw_get http://download.mono-project.com/sources/mono/mono-3.6.0.tar.bz2 -O mono-3.6.0.tar.bz2
-fw_untar mono-3.6.0.tar.bz2
+echo "Installing mono from official Xamarin packages for Debian"
+curl -s http://download.mono-project.com/repo/xamarin.gpg | sudo apt-key add -
+echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/xamarin.list
+sudo apt-get update
+sudo apt-get -y install mono-complete
 
-cd mono-3.6.0
-./autogen.sh --prefix=${IROOT}/mono-3.6.0-install
-make -j4 EXTERNAL_MCS=${IROOT}/mono-3.6.0/mcs/class/lib/monolite/basic.exe
-make install
+post_install
 
-echo "Installing RootCAs from Mozilla..."; 
-sudo ${IROOT}/mono-3.6.0-install/bin/mozroots --import --sync;
-
-touch ${IROOT}/mono.installed
+touch $IROOT/mono.installed

+ 4 - 13
toolset/setup/linux/languages/xsp.sh

@@ -1,18 +1,9 @@
 #!/bin/bash
 
-RETCODE=$(fw_exists ${IROOT}/xsp.installed)
+RETCODE=$(fw_exists $IROOT/xsp.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-fw_depends mono
-git clone git://github.com/mono/xsp
-cd xsp
-git checkout 8a31bc625727594d42f94173768bee5cf8afd0a4
+echo "Installing XSP"
+sudo apt-get -y install mono-xsp4 mono-fastcgi-server4
 
-export PKG_CONFIG_PATH=${IROOT}/mono-3.6.0-install/lib/pkgconfig
-export PATH=${IROOT}/mono-3.6.0-install/bin:$PATH
-
-./autogen.sh --prefix=${IROOT}/mono-3.6.0-install
-make
-make install
-
-touch ${IROOT}/xsp.installed
+touch $IROOT/xsp.installed