updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / git-bzr-ng / PKGBUILD
blob4fb6d132524b2d3f76f6cbb4e71c5b7d31b509a2
1 # Contributor: Nuno Araujo <nuno.araujo at russo79.com>
2 # Maintainer: Evan Martin <martine@danga.com>, Andy Smith <andy@term.ie>
3 # Packager: Samir Faci <csgeek@esamir.com>
5 pkgname=git-bzr-ng
6 pkgver=20110410
7 pkgrel=1
8 pkgdesc="git-bzr: a bidirectional git - bazaar gateway"
9 arch=('i686'  'x86_64')
10 url="http://github.com/termie/git-bzr-ng"
11 license=('GPL')
12 groups=()
13 depends=('git' 'bzr' 'bzr-fastimport')
14 makedepends=()
15 optdepends=()
16 provides=()
17 conflicts=()
18 replaces=()
19 backup=()
20 options=()
21 install=
22 changelog=
23 source=()
24 noextract=()
25 md5sums=()
27 _gitroot='http://github.com/termie/git-bzr-ng.git'
28 _gitname='git-bzr-ng'
29 _buildir=${_gitname}-build
31 build() 
33   cd ${srcdir}
34   msg 'Connecting to GIT server...'
35   if [ -d ${_gitname} ]; then
36      cd ${_gitname} && git pull origin
37      cd ..
38   else
39      git clone ${_gitroot}
40   fi
42   msg 'GIT checkout done or server timeout.'
43   if [ -d ${_buildir} ]; then
44      msg 'Cleaning previous build...'
45      rm -rf ${_buildir}
46   fi
48   git clone ${_gitname} ${_buildir}
49   cd ${_buildir}
51    # python2 fix
52   for file in $(find . -type f -name '*' -print); do
53     sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
54     sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
55   done
58 package() {
59     cd ${_buildir}/
60     install -d "${pkgdir}/usr/lib/git-core/"
61     install  -o root -g root -m655 git-bzr ${pkgdir}/usr/lib/git-core/