updated on Wed Jan 11 12:00:27 UTC 2012
[aur-mirror.git] / git-hg-git / PKGBUILD
blob382d3e903a8070d5129abe333cd911927f1ebe77
1 # -*- shell-script -*-
2 # Arch Linux package build script
4 # Contributor: Vsevolod Balashov <vsevolod@balashov.name>
6 # $Id$
8 pkgname=git-hg-git
9 pkgver=20111229
10 pkgrel=1
11 pkgdesc="git-hg plugin"
12 arch=(any)
13 url="https://github.com/offbytwo/git-hg"
14 license=('MIT')
15 depends=('mercurial' 'python-dulwich-git' 'git')
16 makedepends=()
17 provides=('git-fast-export')
18 source=('githghome.patch')
19 md5sums=('6ea17d66b7377655398557238f89c33a')
22 _gitroot="https://github.com/offbytwo/git-hg.git"
23 _gitname=$pkgname
25 build() {
26     if [ ! -d $_gitname ] 
27     then
28         git clone $_gitroot $_gitname
29         cd $_gitname
30         git submodule update --init
31     else
32         cd $_gitname
33         git reset --hard
34         git pull
35         git submodule update
36     fi
38     git apply ../githghome.patch
39     mkdir -p ${pkgdir}/usr/share/git/
40     mkdir -p ${pkgdir}/usr/lib/git-core/
41     cp -r ${srcdir}/${_gitname}/fast-export ${pkgdir}/usr/share/git/
42     install -m 755 ${srcdir}/${_gitname}/bin/git-hg ${pkgdir}/usr/lib/git-core/
44     mkdir -m 755 -p ${pkgdir}/usr/bin
45     install -D -m 755 ${srcdir}/${_gitname}/bin/* ${pkgdir}/usr/bin/