blob: 1d247a8028f5096186a0360bd3f14d0ec686e094 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
_pkgver=2.1-7r2-arduino4
_gitver='commit=a8cd90f8505d7c472b57550b1192fe67885dd638'
####
pkgname=java-rxtx
pkgver=${_pkgver//-/.}
pkgdesc="A native library providing serial and parallel communication for Java"
license=(LGPL2.1)
pkgrel=4
arch=('i686' 'x86_64' 'mips64el')
depends=('java-runtime')
makedepends=('java-environment')
case "$_pkgver" in
*arduino*)
url="https://github.com/arduino/RXTX"
source=("libre://RXTX-$pkgver.tar.gz")
md5sums=('f083d5a17878ccf4a25347f23d43c17b')
mksource=("git://github.com/arduino/RXTX.git#${_gitver}")
mkmd5sums=('SKIP')
_dirname=RXTX
;;
*)
url="http://rxtx.qbang.org/"
source=("http://rxtx.qbang.org/pub/rxtx/rxtx-${_pkgver}.zip")
md5sums=('9290b4832d46199f8d798a531209640b')
_dirname=rxtx-{$_pkgver}
;;
esac
source+=(
0000-configure-java-version.patch
0001-makefile-destdir.patch
0002-makefile-javadoc-dir.patch
0003-lockdir-location.patch
GroupMembership.txt)
md5sums+=('a36caaca717018341d69605f962d1c2a'
'39c88043032de742c6b51d90a26eee2c'
'a910e0c75a9c687d2b2f782e3d9982e3'
'33ece2602aed350a449e922b5465ea22'
'1c888e587298bcaf2b562f95bc62a9ad')
_MAKEFLAGS=('JHOME=/usr/share/java' 'RXTX_PATH=/usr/lib')
_changelog() {
t="`echo -e '\t'`"
# Parabola changes
ls "$srcdir"/*.patch | sort -r | while read file; do
echo "${file##*/}"
sed "1s/./$t$t&/;1q" "$file"
done
# Arduino changes
if [[ -d "$srcdir/$_dirname/.git" ]]; then
pushd "$srcdir/$_dirname" > /dev/null
git log --pretty=format:"%h %ad%n$t$t%s" --date=short|head -n-2
popd > /dev/null
fi
# RXTX ChangeLog
grep "^[0-9 $t]" "$srcdir/$_dirname/ChangeLog"
}
build() {
_changelog > "$srcdir/ChangeLog.txt"
cd "$srcdir/$_dirname"
. /etc/profile.d/jdk.sh
patch -Np1 -i "$srcdir/0000-configure-java-version.patch" # requires autogen
patch -Np1 -i "$srcdir/0001-makefile-destdir.patch" # requires autogen
patch -Np1 -i "$srcdir/0002-makefile-javadoc-dir.patch" # requires autogen
patch -Np1 -i "$srcdir/0003-lockdir-location.patch"
rm *.m4 && ./autogen.sh
./configure --prefix=/usr
make "${_MAKEFLAGS[@]}" all docs
}
package() {
cd "$srcdir/$_dirname"
. /etc/profile.d/jdk.sh
make "${_MAKEFLAGS[@]}" DESTDIR="$pkgdir" install
install -d "$pkgdir/usr/share/doc/$pkgname/"
install -m644 "$srcdir/ChangeLog.txt" "$pkgdir/usr/share/doc/$pkgname/"
install -m644 "$srcdir/GroupMembership.txt" "$pkgdir/usr/share/doc/$pkgname/"
cp -r javadoc "$pkgdir/usr/share/doc/$pkgname/"
}
|