1 # Maintainer: Dave Reisner <d@falconindy.com>
2 # Contributor: Andrea Fagiani <andfagiani_at_gmail_dot_com>
7 pkgdesc="Brings Eclipse functionality to Vim"
8 url="http://eclim.org/"
11 depends=('vim' 'eclipse')
12 makedepends=('apache-ant' 'python-sphinx')
13 optdepends=('eclipse-pdt: Eclipse PHP Development Tools support'
14 'eclipse-cdt: Eclipse C/C++ Plugin support'
15 'eclipse-dltk-core: Eclipse Dynamic Languagues Toolkit support'
16 'eclipse-dltk-ruby: Eclipse Ruby support'
17 'eclipse-wtp-wst: Eclipse Web Developer Tools support')
18 conflicts=('eclim-git')
20 source=('resources.patch')
21 md5sums=('82ad75037bef68979aedc4f08a121a10')
23 _gitroot="git://github.com/ervandew/eclim.git"
28 msg "Connecting to GIT server...."
30 if [[ -d $_gitname ]] ; then
31 ( cd $_gitname && git pull origin; )
32 msg "The local files are updated."
37 msg "GIT checkout done or server timeout"
38 msg "Starting make..."
40 rm -rf "$srcdir/$_gitname-build"
41 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
42 cd "$srcdir/$_gitname-build"
44 patch -Np1 < "$srcdir"/resources.patch
47 # jdt, ant and maven only require eclipse so they can be enabled without worries
48 # might want to edit the _plugins array with those that suit your needs
49 # options are : jdt, ant, maven, pdt, cdt, wst, dltk, dltkruby
50 _plugins='jdt,ant,maven'
52 # Eventually enabling additional plugins, be sure to comment this if you're defining your own
53 _plugins=$(pacman -Qs eclipse- | sed -n 's/.*\(pdt\|cdt\|wst\|dltk\(-ruby\)*\).*/\1/p' | tr '\n-' ',\0')$_plugins
55 # Get the ANT_HOME environment variable
56 source /etc/profile.d/apache-ant.sh
58 # Build (necessary, we need to build with the correct environment variables
59 mkdir -p $pkgdir/usr/share/eclipse
60 mkdir -p $pkgdir/usr/share/vim/vimfiles
62 chmod +x src/nailgun/configure bin/sphinx
64 export ECLIM_ECLIPSE_HOME="/usr/share/eclipse"
67 ant -Dvim.files=/usr/share/vim/vimfiles \
72 ant -Declipse.home=$pkgdir/usr/share/eclipse \
73 -Dvim.files=$pkgdir/usr/share/vim/vimfiles \
77 msg2 "Generating docs..."
79 ant -Dvim.files=$pkgdir/usr/share/vim/vimfiles vimdocs
82 mkdir -p $pkgdir/usr/share/doc/
83 cp -r build/doc/site $pkgdir/usr/share/doc/eclim
86 sed -i -e "s|$pkgdir||g" $pkgdir/usr/share/vim/vimfiles/eclim/plugin/eclim.vim
88 # delete Windows stuff
89 find "$pkgdir" -regex ".*bat\|.*cmd\|.*exe" -delete