1 # Maintainer: Balló György <ballogyor+arch at gmail dot com>
2 # Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
8 pkgdesc="Java library for serial IO"
10 url="http://rxtx.qbang.org/"
12 depends=('glibc' 'java-runtime' 'systemd')
13 makedepends=('java-environment')
14 provides=("$_pkgname=$pkgver")
15 replaces=("$_pkgname")
16 install=$pkgname.install
17 source=(http://rxtx.qbang.org/pub/$_pkgname/$_pkgname-$pkgver.zip
20 rxtx-2.2-fhs_lock.patch
21 rxtx-2.2-format-security.patch
25 rxtx-2.2-undefined_symbol.patch)
26 md5sums=('7eedb18e3f33a427e2b0e9be8ce3f94c'
27 '2f21ec5eb108f871815242698b6150f1'
28 '1f7c43d582bfe9daea22d7f7057436da'
29 'f4d22d263f45cd1d4db6242dd0ac78ae'
30 '32094214422b717a31841146ca78400d'
31 '903a3fe0067d0682dd5f64483c741df6'
32 '683dd95e6e419b2b63851c08ede7ca86'
33 '1db5c64e239c80294d00c932237889dd'
34 '4695fe9bb28a7c9b21447f998fb46b02')
35 sha256sums=('3c30373e760f444def3650c76c5a00ae12fb1d860ec008750d084f4880495b03'
36 '307ddf4bdcd5ba8d71a10d54253d9b6c3b531f5c6e2619b6895701d2cb81325a'
37 '93d76b9747e3cf9a7d2e8767a4e3e977afa0ff83277e17d85727a423f68faa18'
38 'c77d2e0a85dd3eb6edbe16fb7fd58a07d55356ce6b4e77b26cf1f38a72aa13c1'
39 '6c00f319f64b490e99b2bfca93f6b353dfc2a99f5915fd48af3a46d76b08ab0f'
40 'f67db773131805d5344972e32f79cc9272b4dde6a44733ba4edb298107d36c55'
41 '21108e0dd258b4b7d4d0abf22207a3bf34e9df8d78bd9909d1810df00ea5a359'
42 '3d9729cbdb2de9e41869bb355b2e6d6f7b4f32386219ef1a8694c72dc856cbf0'
43 'bb289c83b66cc314a3b3c9ddc20c342577d76accdd49d2e2b24921a02689725d')
49 patch -Np1 -i ../utsrelease.patch
52 patch -Np1 -i ../rxtx-2.2-lock.patch
55 patch -Np1 -i ../rxtx-2.2-fhs_lock.patch
58 patch -Np1 -i ../ttyACM_port.patch
60 # Fix build with openjdk10
61 patch -Np1 -i ../java10.patch
63 # Fix build with openjdk11
64 patch -Np1 -i ../java11.patch
66 # Fix undefined symbol
67 patch -Np1 -i ../rxtx-2.2-undefined_symbol.patch
69 # Fix format-security errors
70 patch -p1 -i ../rxtx-2.2-format-security.patch
78 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
84 mkdir -p "$pkgdir"/usr/{lib,share/java/rxtx}
85 make JHOME="$pkgdir/usr/share/java/rxtx" RXTX_PATH="$pkgdir/usr/lib" install
87 # Setup lock directory
88 install -dm755 "$pkgdir"/usr/lib/tmpfiles.d
89 echo 'd /run/lock/lockdev 0775 root lock -' > "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"