summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2a4830798a9b17da22ac2228664f540705809fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
#Contributor: Kristof Jozsa <kjozsa@fsdev.hu>

pkgname=eclipse-scala-ide
pkgver=4.6.1
pkgrel=1
pkgdesc="Scala IDE for Eclipse"
arch=('any')
url="http://www.scala-ide.org/"
license=('custom')
depends=('eclipse>=4.4')

source=($pkgname-$pkgver.zip::"http://download.scala-ide.org/sdk/lithium/e46/scala212/stable/update-site.zip"
        "LICENSE" "scala-ide.desktop" "product.png"
)
md5sums=('9bd71831a705223cfd29f9e21ae14a09'
         '58b225f304aaf42c8b8738894a10cb96'
         'faf8441d3576d87c227912b3491fdf29'
         'c95b1920928f10d2c982afd7f5827a2c')

package() {
  install -D -m0644 "${srcdir}"/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -D -m0644 "${srcdir}"/scala-ide.desktop "${pkgdir}/usr/share/applications/scala-ide.desktop"
  install -D -m0644 "${srcdir}"/product.png "${pkgdir}/usr/lib/eclipse/dropins/scala-ide/icon.png"

  _dest="${pkgdir}/usr/lib/eclipse/dropins/${pkgname/eclipse-}/eclipse"
  cd "${srcdir}/base"

  # Features
  find features -type f | while read -r _feature ; do
    if [[ "${_feature}" =~ (.*\.jar$) ]] ; then
      install -dm755 "${_dest}/${_feature%*.jar}"
      cd "${_dest}/${_feature/.jar}"
      # extract features (otherwise they are not visible in about dialog)
      jar xf "${srcdir}/base/${_feature}" || return 1
    else
      install -Dm644 "${_feature}" "${_dest}/${_feature}"
    fi
  done

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