summaryrefslogtreecommitdiff
path: root/java/java-rxtx/PKGBUILD
blob: 30ed259677ea6873c5ce1279e45d9850de109b94 (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
# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
# Maintainer (AUR): PyroPeter <googlemail.com@abi1789>

pkgname=java-rxtx
_pkgver=2.1-7r2-arduino4
_gitver='commit=a8cd90f8505d7c472b57550b1192fe67885dd638'
pkgver=${_pkgver//-/.}

pkgrel=1
pkgdesc="A native library providing serial and parallel communication for Java"
arch=('i686' 'x86_64')
depends=('java-environment')

case "$_pkgver" in
    *arduino*)
	url="https://github.com/arduino/RXTX"
	source=("git://github.com/arduino/RXTX.git#${_gitver}"
	    java7-configure.patch
	    destdir.patch)
	license=(LGPL)
	changelog=ChangeLog.txt
	_dirname=RXTX
	;;
    *)
	url="http://rxtx.qbang.org/"
	source=("http://rxtx.qbang.org/pub/rxtx/rxtx-${_pkgver}.zip"
	    destdir.patch)
	# Todo: patch for Java 6 AND Java 7
	license=('custom:LGPL-with-java-exception')
	_dirname=rxtx-{$_pkgver}
	;;
esac

build() {
  cd "$srcdir/$_dirname"
  . /etc/profile.d/jdk.sh

  patch -i "$srcdir/java7-configure.patch"
  patch -i "$srcdir/destdir.patch"

  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$_dirname"
  . /etc/profile.d/jdk.sh

  make DESTDIR="$pkgdir" install
}

md5sums=('SKIP'
         'f07bc244660852dd9b016c190e38e1c9'
         '90be9bdf1d8cbe5304739df066559a13')