#!/bin/bash
# Install dependencies
sudo apt-get install ghc6 ghc6-prof ghc6-doc haddock libglut-dev happy alex \
libedit-dev zlib1g-dev checkinstall libghc6-mtl-prof libghc6-network-prof
# Get haskell-platform
wget http://hackage.haskell.org/platform/2009.2.0.2/haskell-platform-2009.2.0.2.tar.gz
tar -xzf haskell-platform-2009.2.0.2.tar.gz
cd haskell-platform-2009.2.0.2
# Build & Install
./configure
# Before doing a make, install this patch from http://trac.haskell.org/haskell-platform/ticket/84
# Patch appended at the end of the post
make
sudo checkinstall -y
cabal update
------------------------>8---------------------------
PATCH FOLLOWS
------------------------>8---------------------------
A quick(-and-dirty) hot fix: -- code copied from build.sh
---
scripts/install.sh | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
Index: haskell-platform-2009.2.0.2/scripts/install.sh
===================================================================
--- haskell-platform-2009.2.0.2.orig/scripts/install.sh
+++ haskell-platform-2009.2.0.2/scripts/install.sh
@@ -34,13 +34,23 @@ install_pkg () {
fi
}
+# Is this exact version of the package already installed?
+is_pkg_installed () {
+ PKG_VER=$1
+ grep " ${PKG_VER} " installed.packages > /dev/null 2>&1
+}
+
# Actually do something!
cd packages
for pkg in `cat platform.packages`; do
- cd "${pkg}" || die "The directory for the component ${PKG} is missing"
- echo "Installing ${pkg}..."
- install_pkg ${pkg}
- cd ..
+ if is_pkg_installed "${pkg}"; then
+ echo "Platform package ${pkg} is already installed. Skipping..."
+ else
+ cd "${pkg}" || die "The directory for the component ${PKG} is missing"
+ echo "Installing ${pkg}..."
+ install_pkg ${pkg}
+ cd ..
+ fi
done
echo
------------------------>8---------------------------
Tuesday, March 09, 2010
Installing Haskell Platform (with GHC 6.10.4) in Ubuntu Karmic
From http://gist.github.com/326372
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment