1 # Maintainer: Andrea Fagiani <andfagiani_at_gmail_dot_com>
6 pkgdesc="Brings Eclipse functionality to Vim"
7 url="http://eclim.org/"
10 depends=('vim' 'eclipse')
11 makedepends=('apache-ant' 'python-sphinx')
12 optdepends=('eclipse-pdt: Eclipse PHP Development Tools support'
13 'eclipse-cdt: Eclipse C/C++ Plugin support'
14 'eclipse-dltk-core: Eclipse Dynamic Languagues Toolkit support'
15 'eclipse-dltk-ruby: Eclipse Ruby support'
16 'eclipse-wtp-wst: Eclipse Web Developer Tools support')
17 conflicts=('eclim-git')
18 install=$pkgname.install
19 source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/${pkgname}_$pkgver.tar.gz"
21 md5sums=('35882a173e8d340ceee527165cf359f8'
22 '82ad75037bef68979aedc4f08a121a10')
24 cd $srcdir/${pkgname}_$pkgver
26 patch -Np1 -i $srcdir/resources.patch
29 # jdt, ant and maven only require eclipse so they can be enabled without worries
30 # might want to edit the _plugins array with those that suit your needs
31 # options are : jdt, ant, maven, pdt, cdt, wst, dltk, dltkruby
32 _plugins='jdt,ant,maven'
34 # Eventually enabling additional plugins, be sure to comment this if you're defining your own
35 _plugins=$(pacman -Qs eclipse- | sed -n 's/.*\(pdt\|cdt\|wst\|dltk\(-ruby\)*\).*/\1/p' | tr '\n-' ',\0')$_plugins
37 # Get the ANT_HOME environment variable
38 source /etc/profile.d/apache-ant.sh
40 # Build (necessary, we need to build with the correct environment variables
41 mkdir -p $pkgdir/usr/share/eclipse
42 mkdir -p $pkgdir/usr/share/vim/vimfiles
44 chmod +x src/nailgun/configure bin/sphinx
46 # recompiling nailgun to make sure the executable is compliant with our architecture
52 ant -Declipse.home=/usr/share/eclipse \
53 -Dvim.files=/usr/share/vim/vimfiles \
57 ant -Declipse.home=$pkgdir/usr/share/eclipse \
58 -Dvim.files=$pkgdir/usr/share/vim/vimfiles \
62 ant -Declipse.home=/usr/share/eclipse -Dvim.files=$pkgdir/usr/share/vim/vimfiles docs vimdocs
65 mkdir -p $pkgdir/usr/share/doc/
66 cp -r build/doc/site $pkgdir/usr/share/doc/eclim
69 sed -i -e "s|$pkgdir||g" $pkgdir/usr/share/vim/vimfiles/eclim/plugin/eclim.vim
71 # delete Windows stuff
72 for i in $(find $pkgdir -regex ".*bat\|.*cmd\|.*exe"); do rm -f $i ; done