updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / eclim / PKGBUILD
blob2a3f8c5a0d31b3cc0f0142c808aa5c83ba367689
1 # Maintainer: Andrea Fagiani <andfagiani_at_gmail_dot_com>
3 pkgname=eclim
4 pkgver=1.7.2
5 pkgrel=1
6 pkgdesc="Brings Eclipse functionality to Vim"
7 url="http://eclim.org/"
8 license=('GPL3')
9 arch=(i686 x86_64)
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"
20         resources.patch)
21 md5sums=('35882a173e8d340ceee527165cf359f8'
22          '82ad75037bef68979aedc4f08a121a10')
23 build() {
24     cd $srcdir/${pkgname}_$pkgver
25     
26     patch -Np1 -i $srcdir/resources.patch
28     # Manage plugins
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
47     cd src/nailgun
48     ./configure
49     make
50     cd ../..
52     ant -Declipse.home=/usr/share/eclipse \
53         -Dvim.files=/usr/share/vim/vimfiles \
54         -Dplugins=$_plugins \
55         build
57     ant -Declipse.home=$pkgdir/usr/share/eclipse \
58         -Dvim.files=$pkgdir/usr/share/vim/vimfiles \
59         -Dplugins=$_plugins \
60         deploy
62     ant -Declipse.home=/usr/share/eclipse -Dvim.files=$pkgdir/usr/share/vim/vimfiles docs vimdocs
64     # copy eclim docs
65     mkdir -p $pkgdir/usr/share/doc/
66     cp -r build/doc/site $pkgdir/usr/share/doc/eclim
68     # fix eclim paths
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