updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / jameica / PKGBUILD
blobe72fba5bd50b57a091dc23d5067659e297315398
1 # Maintainer: Jan Fader <jan.fader@web.de>
2 pkgname=jameica
3 pkgver=2.0.1
4 _pkgver=2.0
5 pkgrel=1
6 pkgdesc="Jameica is a JAVA GUI framework basing on SWT"
7 arch=('i686' 'x86_64')
8 url="http://www.willuhn.de/projects/jameica/"
9 license=("GPL")
10 depends=('java-runtime>=1.5' 'swt' 'java-environment')
11 makedepends=('unzip')
12 if [ "$CARCH" = "i686" ]; then
13   source=(http://www.willuhn.de/projects/jameica/releases/$_pkgver/jameica/$pkgname-linux.zip)
14   md5sums=('21cef2a341a9f7de7ffb2b3650c1fc95')
15 elif [ "$CARCH" = "x86_64" ]; then
16   source=(http://www.willuhn.de/projects/jameica/releases/$_pkgver/jameica/$pkgname-linux64.zip)
17   md5sums=('67889d39807bc692c55fe7829893892d')
20 build() {
21   mkdir -p $pkgdir/{usr/bin,opt}
22   cd $srcdir/jameica
23   sed -i '6c cd /opt/jameica' jameica.sh jameicaserver.sh
24   sed -i '10 s/lib\/swt\/linux/\/usr\/lib/' jameica.sh jameicaserver.sh
25   sed -i '10 s/$@/& \&> \/dev\/null \&/' jameica.sh jameicaserver.sh
26   sed -i '/^dir/d' jameica.sh jameicaserver.sh
27   sed -i '/^link/d' jameica.sh jameicaserver.sh
28   sed -i '/^cd "$dir"/d' jameica.sh jameicaserver.sh
29   install -m755 jameica.sh $pkgdir/usr/bin/jameica
30   install -m755 jameicaserver.sh $pkgdir/usr/bin/jameicaserver
31 # Refactoring swt dependency.
32   cd $srcdir/jameica/lib/swt
33   rm -rf linux && ln -s /usr/share/java linux
34   cd $srcdir
35   cp -r jameica $pkgdir/opt/
36   rm $pkgdir/opt/jameica/jameica{,server}.sh
37   rm $pkgdir/opt/jameica/rcjameica
38   find $pkgdir/opt/jameica -type f -exec chmod 644 {} +