diff options
author | 2015-09-26 06:16:01 -0400 | |
---|---|---|
committer | 2015-09-26 06:20:09 -0400 | |
commit | 19cbdf8c4ede29346e2e498cd76238d5fbcbcb87 (patch) | |
tree | 8a04feb3bc9c93444aac17e491356cc1e7b2676f | |
parent | a1bb4bb80d1d5f96fa645b0c9c30f3a2607a47f9 (diff) |
Added stack.yaml to support easy builds from source with stack.
Update install instructions.
Note that xmpp is disabled in the stack.yaml, because that needs C
libraries that would take extra work for the user to install.
xmpp is moving toward deprecation anyway.
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/install/fromsource.mdwn | 31 | ||||
-rw-r--r-- | stack.yaml | 30 |
3 files changed, 55 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index aa3675cdc..814c82339 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ git-annex (5.20150917) UNRELEASED; urgency=medium yet. Triggered by eg, git-annex sync --no-commit in a fresh clone of a repository. * status: Show added but not yet committed files. + * Added stack.yaml to support easy builds from source with stack. -- Joey Hess <id@joeyh.name> Wed, 16 Sep 2015 12:23:33 -0400 diff --git a/doc/install/fromsource.mdwn b/doc/install/fromsource.mdwn index 1c0bc06d7..8ffec5b38 100644 --- a/doc/install/fromsource.mdwn +++ b/doc/install/fromsource.mdwn @@ -34,7 +34,28 @@ First, install everything git-annex needs to build: Now you can build git-annex by running either `make` or `cabal build` inside the source tree. -## minimal build with cabal and stackage +## building from source with stack + +Using stack automates nearly everything, will work on many systems, +and avoids build failures due to fast-changing haskell libraries. + +First, [install stack](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md) +It will be part of the Haskell Platform soon. On Debian unstable/testing: + + sudo apt-get install haskell-stack + +Use stack to install all dependencies and git-annex: + + stack setup + stack install git-annex + +Move git-annex into some directory that is in your PATH: + + mv ~/.local/bin/git-annex ~/bin # or /usr/local/bin/ or whatever + +Note that this build produces a git-annex without XMPP support. + +## minimal build from source with cabal This can be done anywhere, and builds git-annex without some optional features that require harder-to-install C libraries. This is plenty to let you get started with @@ -42,9 +63,7 @@ git-annex, but it does not include the assistant or webapp. Be warned that this involves building a lot of Haskell libraries from source, and so it has a lot of moving parts, and it's not uncommon for it -to be broken from time to time. A nice way to avoid such breakage is to -[configure cabal to use the Stackage repository](http://www.stackage.org/), -which is a more stable and consistent version of the Hackage repository. +to be broken from time to time. Inside the source tree, run: @@ -54,15 +73,13 @@ Inside the source tree, run: PATH=$HOME/bin:$PATH cabal install --bindir=$HOME/bin -## full build with cabal and stackage +## full build from source with cabal To build with all features enabled, including the assistant and webapp, you will need to install several C libraries and their headers, including libgnutls, libgsasl, libxml2, and zlib. How to do that for your OS is beyond the scope of this page. -Using [Stackage](http://www.stackage.org/) is again a good idea here! - Once the C libraries are installed, run inside the source tree: cabal install -j --only-dependencies diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 000000000..e81fe029a --- /dev/null +++ b/stack.yaml @@ -0,0 +1,30 @@ +flags: + git-annex: + asciiprogress: false + tahoe: true + tdfa: true + inotify: true + feed: true + database: true + webapp-secure: true + production: true + ekg: false + assistant: true + pairing: true + cryptonite: true + xmpp: false + network-uri: true + s3: true + dbus: true + testsuite: true + webdav: true + torrentparser: true + android: false + androidsplice: false + quvi: true + dns: true + desktopnotify: true + webapp: true +packages: +- '.' +extra-deps: [] |