## PKGBUILD [plain_text]
# Contributor: Jesus Jerez <[email protected]>
# Maintainer: Ng Oon-Ee < n g o o n e e AT g m a i l DOT c o m>

pkgname=eclipse-linuxtools
pkgver=0.9.0
pkgrel=1
pkgdesc="Eclipse Linux Tools Project"
url="http://www.eclipse.org/linuxtools"
arch=('any')
license=('EPL')
depends=('eclipse')
makedepends=('unzip')
_mirror="http://www.eclipse.org/downloads/download.php?r=1&file="
source=("$_mirror/technology/linuxtools/linuxtools-${pkgver:0:3}-incubation.zip")
md5sums=('52e35041a0c55bac9d1c14c28635facd')

build() {

_dest=${pkgdir}/usr/share/eclipse/dropins/${pkgname/eclipse-}/eclipse

cd ${srcdir}/update-${pkgver}

# Features
find features -type f | while read _feature ; do
if [[ ${_feature} =~ (.*\.jar$) ]] ; then
install -dm755 ${_dest}/${_feature%*.jar}
cd ${_dest}/${_feature/.jar}
jar xf ${srcdir}/update-${pkgver}/${_feature} || return 1
cd ${srcdir}/update-${pkgver}
else
install -Dm644 ${_feature} ${_dest}/${_feature}
fi
done

# Plugins
find plugins -type f | while read _plugin ; do
install -Dm644 ${_plugin} ${_dest}/${_plugin}
done

}