summaryrefslogtreecommitdiff
path: root/java/beanshell/PKGBUILD
blob: 95b14d379184fb77724a9d0ee26080bff86c350e (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: Luke Shumaker <lukeshu@sbcglobal.net>
# Maintainer (Arch): AndyRTR <andyrtr at archlinux.org>

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

provides=('bsh')

arch=('any')
depends=('java-runtime')
makedepends=('apache-ant' 'java-commons-bsf2' 'javacc' 'java-servlet3.0-tomcat')
source=("http://www.beanshell.org/bsh-${pkgver}-src.jar")

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/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
  install -d "${pkgdir}"/usr/share/java/
  for artifact in $(printf '%s\n' *.jar|sed 's/-[0-9b.]*\.jar$//'); do
    install -m644 $artifact-$pkgver.jar "${pkgdir}"/usr/share/java/$artifact.jar
  done
}

sha1sums=('69b36df249654a04e777ab899046c50b8cc844ac')