summaryrefslogtreecommitdiff
path: root/libre/beanshell/PKGBUILD
blob: 80c947a9696a5cb35c438c9f0cabb1265e68a1c6 (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
46
47
48
49
50
51
52
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
# Maintainer (Arch:beanshell2): AndyRTR <andyrtr at archlinux.org>

pkgname=beanshell
pkgver=2.0b4
pkgrel=3
pkgdesc="Lightweight scripting for Java"
url="http://www.beanshell.org/"
license=('LGPL')

arch=('any')
depends=('java-runtime')
makedepends=('apache-ant' 'java-commons-bsf2' 'javacc' 'tomcat7')
source=("http://www.beanshell.org/bsh-${pkgver}-src.jar"
        'bsh.sh'
        'bsh-desktop.sh'
        'bsh-window.sh')
sha1sums=('69b36df249654a04e777ab899046c50b8cc844ac'
          'dcf00fb8f445de72da1e77c42cc2d759291af5f1'
          '4188603afd4834d73b91e5006ef2476a83954a04'
          '5a125e0eb68d825d437f6c0c6a5d17afa2d76b93')

prepare() {
  cd "$srcdir"/BeanShell-$pkgver

  rm lib/*.jar
  ln -s /usr/share/java/bsf2.jar lib/
  ln -s /usr/share/java/javacc.jar lib/
  ln -s /usr/share/java/tomcat7/servlet-api.jar lib/servlet.jar
}

build() {
  cd "$srcdir"/BeanShell-$pkgver
  ant dist
}

check() {
  cd "$srcdir"/BeanShell-$pkgver
  ant test
}

package() {
  cd "$srcdir"/BeanShell-$pkgver/dist
  local artifact
  for artifact in $(printf '%s\n' *.jar|sed 's/-[0-9b.]*\.jar$//'); do
    install -Dm644 $artifact-$pkgver.jar "${pkgdir}"/usr/share/java/$artifact.jar
  done
  local exe
  for exe in bsh bsh-desktop bsh-window; do
    install -Dm755 "${srcdir}"/$exe.sh "${pkgdir}"/usr/bin/$exe
  done
}