updated on Sun Jan 8 20:02:33 UTC 2012
[aur-mirror.git] / git-annex / PKGBUILD
blob5765e17e006f64f7f9cb81333c1c0d17b52ea9b7
1 # Maintainer: Nicolas Pouillard <nicolas.pouillard@gmail.com>
2 # Contributor: Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>
4 # Building the documentation requires ikiwiki.
5 # If you don't want to build the documentation turns this to 0.
6 _build_docs=1
8 pkgname=git-annex
9 pkgver=3.20120106
10 _commithash=
11 #8fc0649f4ceeafacece4c26e73eb236b8b1b33f4
12 pkgrel=1
13 pkgdesc='manage files with git, without checking their contents into git'
14 arch=('i686' 'x86_64')
15 url="http://git-annex.branchable.com/"
16 license=(GPL3)
17 depends=(git uuid openssh rsync pcre curl)
18 options=(!makeflags)
19 # optional build dependency: hS3
20 makedepends=(ghc
21              haskell-http
22              haskell-pcre-light
23              haskell-utf8-string
24              haskell-monad-control
25              haskell-dataenc
26              haskell-sha
27              haskell-missingh
28              haskell-hslogger
29              haskell-json
30              haskell-quickcheck
31              haskell-testpack)
32 [ $_build_docs = 1 ] && makedepends=(ikiwiki "${makedepends[@]}")
33 _gitroot=git://git.kitenet.net/git-annex
34 _gitrepo=git-annex
35 _gitbranch=old-monad-control
37 build() {
38   cd $srcdir
40   if [ -d $_gitrepo ] ; then
41     cd $_gitrepo
42     git fetch origin || return 1
43     git reset --hard origin/$_gitbranch || return 1
44     msg "The local files are updated."
45   else
46     git clone --depth=1 "${_gitroot}" $_gitrepo || return 1
47   fi
48   cd "${srcdir}/$_gitrepo"
49   git checkout $_gitbranch || return 1
50   rsync -aH --del "${srcdir}/$_gitrepo/" "${srcdir}/build/" || return 1
51   cd "${srcdir}/build"
53   msg "GIT checkout done or server timeout"
54   msg "Starting make..."
56   sed -i -e 's|\$(bins): sources|\$(bins): sources Remote/S3.o|' Makefile
57   make || return 1
58   # haskell-testpack is required only to run the tests
59   make test || return 1
62 package() {
63   cd $srcdir/build
64   make DESTDIR=$pkgdir install