updated on Tue Jan 10 00:10:07 UTC 2012
[aur-mirror.git] / git-annex / PKGBUILD
blob9c8b2d542f15e0b420ebfa3495720bcc5887f3fe
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 pkgrel=2
11 _githash=c9aab2a5b65d1559133ef9cc140bd030f79bb2f4
12 pkgdesc='manage files with git, without checking their contents into git'
13 arch=('i686' 'x86_64')
14 url="http://git-annex.branchable.com/"
15 license=(GPL3)
16 depends=(git util-linux openssh rsync pcre curl)
17 options=(!makeflags)
18 # optional build dependency: hS3
19 makedepends=(ghc
20              haskell-http
21              haskell-pcre-light
22              haskell-utf8-string
23              haskell-monad-control
24              haskell-dataenc
25              haskell-sha
26              haskell-missingh
27              haskell-hslogger
28              haskell-json
29              haskell-quickcheck
30              haskell-testpack)
31 [ $_build_docs = 1 ] && makedepends=(ikiwiki "${makedepends[@]}")
32 _gitroot=git://git.kitenet.net/git-annex
33 _gitrepo=git-annex
35 build() {
36   cd $srcdir
38   if [ -d $_gitrepo ] ; then
39     cd $_gitrepo
40     git fetch origin || return 1
41     git reset --hard origin/master || return 1
42     msg "The local files are updated."
43   else
44     # --depth=1 should only be used when no merge is done
45     git clone "${_gitroot}" $_gitrepo || return 1
46   fi
47   cd "${srcdir}/$_gitrepo"
48   git checkout $_githash || return 1
49   git merge origin/no-s3 || 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