summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2010-12-21 22:18:48 +0000
committerhallgren <hallgren@chalmers.se>2010-12-21 22:18:48 +0000
commit4bab82398c905c3699cb9cfefbf913d6022b1fbe (patch)
tree41fae81dca22155b945e9889435d1c9fe87ecd52
parent0aab9833f75eaf73a22ae935493fdf879808a128 (diff)
Add build-binary-dist.sh
-rw-r--r--build-binary-dist.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/build-binary-dist.sh b/build-binary-dist.sh
new file mode 100644
index 000000000..d44eb7d24
--- /dev/null
+++ b/build-binary-dist.sh
@@ -0,0 +1,39 @@
+#! /bin/bash
+
+### This script builds a binary distribution of GF from the source package
+### that this script is a part of. It also assumes that you have installed
+### the Haskell Platform, version 2010.1.0.0 or 2010.2.0.0
+
+destdir=/tmp/gf-build-binary-dist # assemble binary dist here
+targz=gf-bin.tar.gz # the final tar file, should be renamed
+langs="" # which languages?
+#langs="langs=-Pol" # temporary problem with Polish, omit it
+
+set -e # Stop if an error occurs
+set -x # print commands before exuting them
+
+cabal install # gf needs to be installed before building gf-server below
+
+runhaskell Setup.hs configure --user --prefix /usr/local
+runhaskell Setup.hs build $langs
+runhaskell Setup.hs copy --destdir=$destdir $langs
+
+## These steps can be skipped when Setup.hs has been updated to build both
+## alltenses and present by default
+runhaskell Setup.hs build $langs present
+runhaskell Setup.hs copy --destdir=$destdir $langs present
+
+(
+cd src/server
+
+## If you don't already have the packages gf-server depends on, this is
+## the easiest way to install them:
+#cabal install
+
+runhaskell Setup.hs configure --user --prefix /usr/local
+runhaskell Setup.hs build
+runhaskell Setup.hs copy --destdir=$destdir
+)
+tar -C $destdir -zcf $targz .
+echo "Created $targz, rename it to something more informative"
+rm -r $destdir