1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Contributor: totoloco <totoloco at ushcompu dot com dot ar>
# Contributor: hacosta <[email protected]>
# Maintainer: totoloco <totoloco at ushcompu dot com dot ar>

pkgname=googlecl-svn
pkgver=608
pkgrel=1
pkgdesc="Command line tools for the Google Data APIs"
arch=('any')
url="http://code.google.com/p/googlecl/"
license=('APACHE')
depends=('python2-gdata')
makedepends=('subversion')

provides=('googlecl')
conflicts=('googlecl')
replaces=('googlecl')

_svntrunk=http://googlecl.googlecode.com/svn/trunk/
_svnmod=googlecl

build() {
  cd "$srcdir"

  if [[ -d $_svnmod/.svn ]]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_svnmod-build"
  svn export "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  cd "$srcdir/$_svnmod-build"

  sed -i '1c#!/usr/bin/python2' src/google.py
  python2 setup.py install --prefix=/usr --root=$pkgdir
  install -Dm644 man/google.1 "${pkgdir}/usr/share/man/man1/google.1"
}

# vim:set ts=2 sw=2 et: