Skip to content

Commit

Permalink
github build script for Ubuntu 16.04
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo authored and Karl Ostmo committed Apr 22, 2016
1 parent d8803e2 commit f2febfa
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions scripts/build/from-github/stock-ubuntu-16.04.sh
@@ -0,0 +1,65 @@
#!/bin/bash -xe

BUILD_HOME=~/leksah-github-build

# Some general Haskell prerequisites:
# ===================================

# Install stack
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442
echo 'deb http://download.fpcomplete.com/ubuntu wily main' | sudo tee /etc/apt/sources.list.d/fpco.list
sudo apt-get update && sudo apt-get install -y --allow-unauthenticated stack

# Install git and cabal
sudo apt-get install -y git cabal-install

# Add cabal-installed binaries to your path
echo -e '\nPATH=$PATH:$HOME/.cabal/bin' >> ~/.bashrc

# Avoids "./genBindings.sh: line 23: haskell-gi: command not found" error
export PATH=$PATH:$HOME/.cabal/bin


# Leksah-specific prerequsistes
# ===================================

# Install binaries required by Leksah
sudo apt-get install -y libgirepository1.0-dev libgtksourceview-3.0-dev \
libjavascriptcoregtk-3.0-dev libjavascriptcoregtk-4.0-dev \
libwebkit2gtk-4.0-dev libwebkitgtk-3.0-dev libpoppler-glib-dev \
libvte-2.91-dev libnotify-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev


# Clone all git repositories
mkdir --parents $BUILD_HOME
cd $BUILD_HOME

git clone https://github.com/haskell-gi/haskell-gi-base.git
git clone https://github.com/haskell-gi/haskell-gi.git
git clone https://github.com/gtk2hs/gi-gtk-hs.git
git clone https://github.com/ghcjs/jsaddle.git
git clone https://github.com/ghcjs/jsaddle-dom.git
git clone https://github.com/ghcjs/ghcjs-dom.git
git clone https://github.com/leksah/leksah.git
cd leksah
git submodule update --init
cd -


# Install cabal prerequisites
cabal update
cabal install alex happy gtk2hs-buildtools
cabal install ./haskell-gi-base ./haskell-gi


cd haskell-gi/bindings
./genBindings.sh
cd -


cd leksah

# Remove OSX-specific stack dependency
sed -i "/GtkosxApplication/d" stack.yaml

stack build

0 comments on commit f2febfa

Please sign in to comment.