# Maintainer: Andrea Fagiani pkgname=eclim pkgver=1.7.2 pkgrel=1 pkgdesc="Brings Eclipse functionality to Vim" url="http://eclim.org/" license=('GPL3') arch=(i686 x86_64) depends=('vim' 'eclipse') makedepends=('apache-ant' 'python-sphinx') optdepends=('eclipse-pdt: Eclipse PHP Development Tools support' 'eclipse-cdt: Eclipse C/C++ Plugin support' 'eclipse-dltk-core: Eclipse Dynamic Languagues Toolkit support' 'eclipse-dltk-ruby: Eclipse Ruby support' 'eclipse-wtp-wst: Eclipse Web Developer Tools support') conflicts=('eclim-git') install=$pkgname.install source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/${pkgname}_$pkgver.tar.gz" resources.patch) md5sums=('35882a173e8d340ceee527165cf359f8' '82ad75037bef68979aedc4f08a121a10') build() { cd $srcdir/${pkgname}_$pkgver patch -Np1 -i $srcdir/resources.patch # Manage plugins # jdt, ant and maven only require eclipse so they can be enabled without worries # might want to edit the _plugins array with those that suit your needs # options are : jdt, ant, maven, pdt, cdt, wst, dltk, dltkruby _plugins='jdt,ant,maven' # Eventually enabling additional plugins, be sure to comment this if you're defining your own _plugins=$(pacman -Qs eclipse- | sed -n 's/.*\(pdt\|cdt\|wst\|dltk\(-ruby\)*\).*/\1/p' | tr '\n-' ',\0')$_plugins # Get the ANT_HOME environment variable source /etc/profile.d/apache-ant.sh # Build (necessary, we need to build with the correct environment variables mkdir -p $pkgdir/usr/share/eclipse mkdir -p $pkgdir/usr/share/vim/vimfiles chmod +x src/nailgun/configure bin/sphinx # recompiling nailgun to make sure the executable is compliant with our architecture cd src/nailgun ./configure make cd ../.. ant -Declipse.home=/usr/share/eclipse \ -Dvim.files=/usr/share/vim/vimfiles \ -Dplugins=$_plugins \ build ant -Declipse.home=$pkgdir/usr/share/eclipse \ -Dvim.files=$pkgdir/usr/share/vim/vimfiles \ -Dplugins=$_plugins \ deploy # fix eclim paths sed -i -e "s|$pkgdir||g" $pkgdir/usr/share/vim/vimfiles/eclim/plugin/eclim.vim # delete Windows stuff for i in $(find $pkgdir -regex ".*bat\|.*cmd\|.*exe"); do rm -f $i ; done }