updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / git-hg / PKGBUILD
blobf5469724f19ec18f90f3d1a25f6582085a0690a3
1 # -*- shell-script -*-
2 # Arch Linux package build script
4 # Contributor: Vsevolod Balashov <vsevolod@balashov.name>
6 # $Id$
8 pkgname=git-hg
9 pkgver=20110801
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' 'python2.patch')
19 md5sums=('6ea17d66b7377655398557238f89c33a'
20          'ad3a1e4ee5fc44d2e284a92babcc10bd')
23 _gitroot="https://github.com/offbytwo/git-hg.git"
24 _gitname=$pkgname
26 build() {
27     if [ -d $_gitname ]
28     then
29         rm -rf $_gitname
30     fi
31     git clone $_gitroot $_gitname
32     cd $_gitname
33     git submodule update --init
34     git apply ../githghome.patch
35     git apply ../python2.patch
36     mkdir -p ${pkgdir}/usr/share/git/
37     mkdir -p ${pkgdir}/usr/lib/git-core/
38     cp -r ${srcdir}/${_gitname}/fast-export ${pkgdir}/usr/share/git/
39     install -m 755 ${srcdir}/${_gitname}/bin/git-hg ${pkgdir}/usr/lib/git-core/
41     mkdir -m 755 -p ${pkgdir}/usr/bin
42     install -D -m 755 ${srcdir}/${_gitname}/bin/* ${pkgdir}/usr/bin/