From 4309c3414574d7b2d691c6d02e3c7be4d4e68207 Mon Sep 17 00:00:00 2001 From: 4ur3l13n Date: Sat, 7 Nov 2015 16:44:57 +0100 Subject: eclim vim eclipse functionality --- pcr/eclim/PKGBUILD | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ pcr/eclim/eclim.install | 18 +++++++++++ 2 files changed, 102 insertions(+) create mode 100644 pcr/eclim/PKGBUILD create mode 100644 pcr/eclim/eclim.install diff --git a/pcr/eclim/PKGBUILD b/pcr/eclim/PKGBUILD new file mode 100644 index 000000000..4c4e7d10f --- /dev/null +++ b/pcr/eclim/PKGBUILD @@ -0,0 +1,84 @@ +# Maintainer: Aurélien DESBRIÈRES +# Contributor: Andrea Fagiani + +pkgname=eclim +pkgver=2.5.0 +pkgrel=1 +pkgdesc="Brings Eclipse functionality to Vim" +url="http://eclim.org/" +license=('GPL3') +arch=(i686 x86_64) +depends=('vim' 'eclipse') +makedepends=('apache-ant' 'python2-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: Eclipse Web Developer Tools support') +conflicts=('eclim-git') +install=$pkgname.install +source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/${pkgname}_$pkgver.tar.gz") + +prepare() { + cd $srcdir/${pkgname}_$pkgver + + # fix build, thanks to mikezackles + sed -e "s/'sphinx-build'/'sphinx-build2'/g" \ + -e 's|${user.home}/\.|${vim.files}/|g' \ + -e "s|File(getVariable('eclipse')|File('/usr/lib/eclipse/'|g" \ + -e '68,88d' \ + -i ant/build.gant + + # Get the ANT_HOME environment variable + source /etc/profile.d/apache-ant.sh + + chmod +x org.eclim/nailgun/configure bin/sphinx +} + +build() { + cd $srcdir/${pkgname}_$pkgver + + # recompiling nailgun to make sure the executable is compliant with our architecture + cd org.eclim/nailgun + ./configure + make + + cd ../.. + + ant -Declipse.home=/usr/lib/eclipse \ + -Dvim.files=/usr/share/vim/vimfiles \ + build +} + +package() { + cd $srcdir/${pkgname}_$pkgver + + mkdir -p $pkgdir/usr/lib/eclipse + mkdir -p $pkgdir/usr/share/vim/vimfiles + + ant -Declipse.home=/usr/lib/eclipse \ + -Dvim.files=$pkgdir/usr/share/vim/vimfiles \ + docs vimdocs + + ant -Declipse.home=$pkgdir/usr/lib/eclipse \ + -Dvim.files=$pkgdir/usr/share/vim/vimfiles \ + deploy + + # copy eclim docs + mkdir -p $pkgdir/usr/share/doc/ + cp -r build/doc/site $pkgdir/usr/share/doc/eclim + + # fix eclim paths + sed -e "s|$pkgdir||g" \ + -i $pkgdir/usr/share/vim/vimfiles/eclim/plugin/eclim.vim \ + -i $pkgdir/usr/lib/eclipse/plugins/org.eclim_$pkgver/bin/eclimd \ + -i $pkgdir/usr/lib/eclipse/plugins/org.eclim_$pkgver/plugin.properties + + # delete doctrees + rm -fr $pkgdir/usr/share/doc/eclim/.doctrees + + # delete Windows stuff + for i in $(find $pkgdir -regex ".*bat\|.*cmd\|.*exe"); do rm -f $i ; done + + rm $pkgdir/usr/lib/eclipse/plugins/org.eclim_${pkgver}/nailgun/config.status +} diff --git a/pcr/eclim/eclim.install b/pcr/eclim/eclim.install new file mode 100644 index 000000000..72dc02205 --- /dev/null +++ b/pcr/eclim/eclim.install @@ -0,0 +1,18 @@ +post_install() { + echo " + >>> Copy the /usr/share/vim/vimfiles/eclim/resources + >>> directory to ~/.eclim/resources + " + + # rebuild the vim documentation tags + vim -e -u NONE --cmd "helptags /usr/share/vim/vimfiles/eclim/doc/" --cmd quit +} +post_upgrade() { + echo " + >>> Copy the /usr/share/vim/vimfiles/eclim/resources + >>> directory to ~/.eclim/resources + " +} +post_remove() { + /bin/true +} -- cgit v1.2.3-54-g00ecf