updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / repo-git / PKGBUILD
blob6584a1e7e2d3c3959513ef9496e349aff804d433
1 # Contributor: Alexis Robert <alexis.robert@gmail.com>
2 # Contributor: Paul Archan <paul.archan@gmail.com>
4 pkgname=repo-git
5 pkgver=20111115
6 pkgrel=1
7 pkgdesc="The Multiple Git Repository Tool from the Android Open Source Project"
8 arch=(i686 x86_64)
9 url="http://source.android.com/source/git-repo.html"
10 license=('APACHE')
11 depends=('git' 'python2')
12 makedepends=('git')
14 source=(python2-patch.diff)
15 md5sums=('816628bf070c3315e1be24285ee9a083')
17 #noextract=()
19 _gitroot="https://android.googlesource.com/tools/repo.git"
20 _gitbranch="stable"
21 _gitname="repo"
23 build() {
24   cd "$srcdir"
25   msg "Connecting to GIT server...."
27   if [ -d $_gitname ] ; then
28     cd $_gitname && git pull origin
29     msg "The local files are updated."
30   else
31         git clone --depth=1 -b $_gitbranch $_gitroot $_gitname
32   fi
34   msg "Patching for Python2 ..."
35   patch -p0 -i $srcdir/python2-patch.diff
37   rm -rf $(find "$pkgdir" -type d -name ".git")
40 package() {
41   mkdir -p $pkgdir/usr/bin/ || return 1
42   install -oroot -groot -m0755 $srcdir/$_gitname/repo $pkgdir/usr/bin/repo
43