summaryrefslogtreecommitdiff
path: root/extra/swt/PKGBUILD
blob: 13cc00f198a261fff763c90ad7d5f2d4482eb1f1 (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
53
54
55
56
57
# $Id: PKGBUILD 192094 2013-08-05 19:35:39Z guillaume $
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
pkgname=swt
pkgver=4.3
pkgrel=1
_date=201306052000
pkgdesc='An open source widget toolkit for Java'
arch=('i686' 'x86_64')
url='http://www.eclipse.org/swt/'
license=('EPL')
depends=('java-runtime>=6' 'gtk2>=2.20.1' 'libxtst')
optdepends=('libgnomeui' 'mesa' 'glu' 'webkitgtk2')
makedepends=('java-environment' 'libxtst' 'mesa' 'glu' 'libgnomeui' 'unzip' 'pkgconfig' 'webkitgtk2' 'apache-ant')
if [ "${CARCH}" = "i686" ]; then
  _carch=x86
  sha256sums=('d15fd80dd1d73f915879e08d53b535c781d589195eba0d011c307912514aa965'
              '6bb48007a95e3d8c6b577cc9cc4b61a51ce928b04f4fcd393cf72f8f727fe923')
fi
if [ "${CARCH}" = "x86_64" ]; then
  _carch=x86_64
  sha256sums=('0da9ce9fc30de90a45054df6d28c7092705707abcde9cc923a2601d1dd237707'
              '6bb48007a95e3d8c6b577cc9cc4b61a51ce928b04f4fcd393cf72f8f727fe923')
fi
source=(http://download.eclipse.org/eclipse/downloads/drops4/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-${_carch}.zip
        build-swt.xml)
# To test this pkg:
# http://www.eclipse.org/swt/examples.php#standaloneOutsideEclipse
# http://download.eclipse.org/eclipse/downloads/

build() {
  cd ${srcdir}
  unzip -oq src.zip -d src

  . /etc/profile.d/jdk.sh
  . /etc/profile.d/apache-ant.sh

  # Shared objects
  cd src
  ./build.sh

  # SWT jar
  ant -f ../build-swt.xml compile
}

package() {
  cd ${srcdir}/src

  # Shared objects
  export OUTPUT_DIR=${pkgdir}/usr/lib
  install -dm755 ${OUTPUT_DIR} 
  make -f make_linux.mak install

  # SWT jar
  ant -f ../build-swt.xml jar
  install -Dm755 ../swt.jar ${pkgdir}/usr/share/java/swt-${pkgver}.jar
  ln -s swt-${pkgver}.jar ${pkgdir}/usr/share/java/swt.jar
}