updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / sup-git / PKGBUILD
blobe0c4751d47e72e45f32637868e60c18fd7d1b81d
1 # Original maintainer: David Campbell <davekong@.archlinux.us>
2 # Current maintainer: Matti Eiden <matti.eiden@env.tamk.fi>
3 pkgname=sup-git
4 pkgver=20110321
5 pkgrel=1
6 pkgdesc="CLI mail client in the style of Gmail (tagging, threading, search)."
7 arch=('i686' 'x86_64')
8 url="http://sup.rubyforge.org/"
9 license=('GPL')
10 depends=('ruby-xapian-full' 'gdbm' 'ruby-ncursesw' 'ruby-rmail>=0.17' \
11          'ruby-highline' 'ruby-net-ssh' 'ruby-trollop>=0.12' 'ruby-lockfile' \
12          'ruby-mime-types>1' 'ruby-locale' 'ruby-gettext' 'ruby-fastthread' )
13 makedepends=('ruby' 'git')
14 source=(rakefile.patch)
15 md5sums=('df66367edde5ced15450efecfc7f8bf9')
17 _gitroot="git://gitorious.org/sup/mainline.git"
18 _gitname="sup"
20 build() {
21   cd "$srcdir"
22   msg "Connecting to GIT server...."
24   if [ -d $_gitname ] ; then
25     cd $_gitname && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$_gitname-build"
35   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
37   cd "$srcdir/$_gitname-build"
38   msg  "Patching the rakefile"
39   patch -p1 -i ../rakefile.patch
41   msg "Building the gem"
42   rake gem
44   cd pkg
45   local _gemdir="$(ruby --enable-gems -e'puts Gem.default_dir')"
47   local target="${pkgdir}${_gemdir}"
48   local bintarget="$pkgdir/usr/bin"
49   install -d "${bintarget}"
51   gem install -li "${target}" sup -n "${bintarget}" --ignore-dependencies