summaryrefslogtreecommitdiff
path: root/community/java-rxtx/PKGBUILD
blob: 9dded2e80a4c1a43c08517d9ba4f7d3331735f51 (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
# $Id: PKGBUILD 99816 2013-10-31 01:53:02Z allan $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua

pkgname=java-rxtx
_pkgname=rxtx
pkgver=2.2pre2
pkgrel=2
pkgdesc="Java library for serial IO"
arch=('i686' 'x86_64')
url="http://rxtx.qbang.org/"
license=('LGPL')
depends=('glibc' 'java-runtime')
makedepends=('java-environment')
provides=("$_pkgname=$pkgver")
replaces=("$_pkgname")
install=$_pkgname.install
source=(http://rxtx.qbang.org/pub/$_pkgname/$_pkgname-$pkgver.zip
        utsrelease.patch
        rxtx-2.2-lock.patch
        rxtx-2.2-fhs_lock.patch
        ttyACM_port.patch)
md5sums=('7eedb18e3f33a427e2b0e9be8ce3f94c'
         '2f21ec5eb108f871815242698b6150f1'
         '1f7c43d582bfe9daea22d7f7057436da'
         'f4d22d263f45cd1d4db6242dd0ac78ae'
         '903a3fe0067d0682dd5f64483c741df6')

prepare() {
  cd "$srcdir/$_pkgname-$pkgver"

  # Fix build
  patch -Np1 -i "$srcdir/utsrelease.patch"

  # Fix lockdir patch
  patch -Np1 -i "$srcdir/rxtx-2.2-lock.patch"

  # Fix buffer overflow
  patch -Np1 -i "$srcdir/rxtx-2.2-fhs_lock.patch"

  # Enable more ports
  patch -Np1 -i "$srcdir/ttyACM_port.patch"
}

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
              --disable-static
  make -j1
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  mkdir -p "$pkgdir"/usr/{lib,share/java/rxtx}
  make JHOME="$pkgdir/usr/share/java/rxtx" RXTX_PATH="$pkgdir/usr/lib" install
}