updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / mercurial-hg / PKGBUILD
blob78541ce2b6a927dd440bde1d53183a612502aa8a
1 # Contributor: Mathieu Clabaut <mathieu.clabaut@gmail.com>
2 # $Id$
4 pkgname=mercurial-hg
5 pkgver=20080411
6 pkgrel=5
7 pkgdesc="A scalable distributed SCM tool compiled from the crew tree"
8 url="http://www.selenic.com/mercurial"
9 license=('GPL')
10 depends=('python>=2.4' 'mercurial' )
11 makedepends=('asciidoc' 'xmlto')
12 provides=('mercurial')
13 conflicts=('mercurial')
14 arch=('i686' 'x86_64')
15 source=()
16 md5sums=()
18 build() {
19 _hgroot=http://hg.intevation.org/mercurial/crew
20 _hgrepo=mercurial-hg
22    cd ${startdir}/src
24    if [ -d ${_hgrepo} ]; then
25       cd ${_hgrepo}
26       hg pull -u || return 1
27    else
28       hg clone ${_hgroot} ${_hgrepo} || return 1
29       cd ${_hgrepo}
30    fi
32    msg "Mercurial checkout done or server timeout"
33    msg "Starting make..."
35    make PREFIX=${startdir}/pkg/usr  install || return 1
36    install -d $startdir/pkg/usr/share
37    install -m755 contrib/hgk $startdir/pkg/usr/bin
38    install -m644 -D contrib/zsh_completion $startdir/pkg/usr/share/zsh/site-functions/_hg
39    install -m644 -D contrib/bash_completion $startdir/pkg/etc/bash_completion.d/hg 
40    install -d $startdir/pkg/usr/share/emacs/site-lisp
41    install -m644 contrib/{mq.el,mercurial.el} $startdir/pkg/usr/share/emacs/site-lisp
42    install -m644 -D contrib/vim/HGAnnotate.vim $startdir/pkg/usr/share/vim/syntax/HGAnnotate.vim
44    install -d $startdir/pkg/usr/share/mercurial/vim
45 #   # Autoloading plugins to vim = no good.  
46    install -m644 contrib/vim/* $startdir/pkg/usr/share/mercurial/vim