summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d0c5cf331166c33e7d7bc7e8b79ab9eb002b4986 (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
# Maintainer: johnnybash <georgpfahler@wachenzell.org>
# Contributor: r20d20 <r20d20@web.de>
pkgname=jameica-nightly
pkgver=2.7.0
pkgrel=1
pkgdesc="Jameica Plattform"
arch=(armv6h i686 x86_64)
url="http://www.willuhn.de/products/jameica/"
license=('GPL')
depends=('java-runtime>=1.6')
makedepends=('unzip')
conflicts=(jameica)
source=("http://www.willuhn.de/products/jameica/releases/nightly/jameica-$pkgver-nightly-linux64.zip" "jameica.desktop")
md5sums=('SKIP'
         'c5915975edcf2ef695f57e93983ebbe6')

if [ "$CARCH" = "armv6h" ]; then
depends+=(swt)
fi

package() {
	mkdir -p ${pkgdir}/usr/share/{java/jameica,applications}
	cp -R "${srcdir}/jameica" "${pkgdir}/usr/share/java"
	
	if [ "$CARCH" = "armv6h" ]; then

		# remove local swt lib
		rm -rf ${pkgdir}/usr/share/java/jameica/lib/swt/linux64

		# adjust classpath in order to use system swt
		unzip ${pkgdir}/usr/share/java/jameica/jameica-linux64.jar -d ${pkgdir}/usr/share/java/jameica/unzipped
		sed -i 's|lib/swt/linux64/swt.jar|/usr/share/java/swt.jar|g' ${pkgdir}/usr/share/java/jameica/unzipped/META-INF/MANIFEST.MF

		pushd ${pkgdir}/usr/share/java/jameica/unzipped
		zip -r ../jameica-linux64.jar *
		popd

		# remove dead bodies
		rm -rf ${pkgdir}/usr/share/java/jameica/unzipped

		# link jameica-linux64.jar to jameica-linux64.jar 
		ln -s ${pkgdir}/usr/share/java/jameica/jameica-linux64.jar ${pkgdir}/usr/share/java/jameica/jameica-linux.jar

	fi
	
	install -m 644 ${srcdir}/jameica.desktop ${pkgdir}/usr/share/applications
}