summaryrefslogtreecommitdiff
path: root/doc/install/cabal.mdwn
blob: 39df35194b5822e3129036f3edad60ba3aa4b8f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
As a haskell package, git-annex can be installed using cabal.

Start by installing the [Haskell Platform](http://hackage.haskell.org/platform/),
and then:

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install c2hs
	cabal install git-annex --bindir=$HOME/bin

The above downloads the latest release and installs it into a ~/bin/
directory, which you can put in your PATH.

But maybe you want something newer (or older). Then [[download]] the version
you want, and use cabal as follows inside its source tree:

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install c2hs --bindir=$HOME/bin
	cabal install --only-dependencies
	cabal configure
	cabal build
	cabal install --bindir=$HOME/bin

By default, cabal will try to build git-annex with the git-annex assistant
and webapp. This requires several C libraries and their headers be already
installed on your system, including libgnutls, libgsasl, libxml2, and zlib.
To build git-annex without the assistant and webapp, you can pass flags to
cabal install. For example:

	cabal install git-annex --flags="-assistant -WebApp" --bindir=$HOME/bin