updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / eclim / PKGBUILD
blob4d31ba2efdd71f2cf25dfc43f988bb031a46724d
1 # Maintainer: Andrea Fagiani <andfagiani_at_gmail_dot_com>
3 pkgname=eclim
4 pkgver=1.7.2
5 pkgrel=2
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' 'python2-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         sphinx.patch
21         resources.patch)
22 md5sums=('35882a173e8d340ceee527165cf359f8'
23          '4b409b255947af738652f9db20a437ae'
24          '82ad75037bef68979aedc4f08a121a10')
25 build() {
26     cd $srcdir/${pkgname}_$pkgver
27     
28     patch -Np1 -i $srcdir/resources.patch
29     patch -Np1 -i $srcdir/sphinx.patch
31     # Manage plugins
32     # jdt, ant and maven only require eclipse so they can be enabled without worries
33     # might want to edit the _plugins array with those that suit your needs
34     # options are : jdt, ant, maven, pdt, cdt, wst, dltk, dltkruby
35     _plugins='jdt,ant,maven'
37     # Eventually enabling additional plugins, be sure to comment this if you're defining your own
38     _plugins=$(pacman -Qs eclipse- | sed -n 's/.*\(pdt\|cdt\|wst\|dltk\(-ruby\)*\).*/\1/p' | tr '\n-' ',\0')$_plugins
40     # Get the ANT_HOME environment variable
41     source /etc/profile.d/apache-ant.sh
43     # Build (necessary, we need to build with the correct environment variables
44     mkdir -p $pkgdir/usr/share/eclipse
45     mkdir -p $pkgdir/usr/share/vim/vimfiles
47     chmod +x src/nailgun/configure bin/sphinx
49     # recompiling nailgun to make sure the executable is compliant with our architecture
50     cd src/nailgun
51     ./configure
52     make
53     cd ../..
55     ant -Declipse.home=/usr/share/eclipse \
56         -Dvim.files=/usr/share/vim/vimfiles \
57         -Dplugins=$_plugins \
58         build
60     ant -Declipse.home=$pkgdir/usr/share/eclipse \
61         -Dvim.files=$pkgdir/usr/share/vim/vimfiles \
62         -Dplugins=$_plugins \
63         deploy
65     ant -Declipse.home=/usr/share/eclipse -Dvim.files=$pkgdir/usr/share/vim/vimfiles docs vimdocs
67     # copy eclim docs
68     mkdir -p $pkgdir/usr/share/doc/
69     cp -r build/doc/site $pkgdir/usr/share/doc/eclim
71     # fix eclim paths
72     sed -i -e "s|$pkgdir||g" $pkgdir/usr/share/vim/vimfiles/eclim/plugin/eclim.vim
74     # delete Windows stuff
75     for i in $(find $pkgdir -regex ".*bat\|.*cmd\|.*exe"); do  rm -f $i ; done