summaryrefslogtreecommitdiff
path: root/java/java-rxtx/PKGBUILD
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-10-30 23:44:24 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-10-30 23:44:24 -0400
commit88e5cb576d37f9ecc536c68eb1614fbd1f08e538 (patch)
tree112b6bd8982e073fedd858f65619b3d9c4845770 /java/java-rxtx/PKGBUILD
parent8e02260d1918e5d84225854fb071bb03808eafc5 (diff)
downloadabslibre-88e5cb576d37f9ecc536c68eb1614fbd1f08e538.tar.gz
abslibre-88e5cb576d37f9ecc536c68eb1614fbd1f08e538.tar.bz2
abslibre-88e5cb576d37f9ecc536c68eb1614fbd1f08e538.zip
improve java/java-rxtx
Diffstat (limited to 'java/java-rxtx/PKGBUILD')
-rw-r--r--java/java-rxtx/PKGBUILD83
1 files changed, 61 insertions, 22 deletions
diff --git a/java/java-rxtx/PKGBUILD b/java/java-rxtx/PKGBUILD
index 30ed25967..8d609f5ae 100644
--- a/java/java-rxtx/PKGBUILD
+++ b/java/java-rxtx/PKGBUILD
@@ -1,54 +1,93 @@
# 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
+####
+
+pkgname=java-rxtx
+pkgver=${_pkgver//-/.}
pkgdesc="A native library providing serial and parallel communication for Java"
+license=(LGPL2.1)
+
+pkgrel=2
arch=('i686' 'x86_64')
-depends=('java-environment')
+depends=('java-runtime')
+makedepends=('java-environment' 'pacman>4.0.3')
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
+ source=("git://github.com/arduino/RXTX.git#${_gitver}")
+ md5sums=('SKIP')
_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')
+ 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'
+ '19b19c2514bce563be2a812888e1d9b4'
+ '9dc461eab358e3b78c4b688977997116')
+
+_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 -i "$srcdir/java7-configure.patch"
- patch -i "$srcdir/destdir.patch"
+ 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
+ make "${_MAKEFLAGS[@]}" all docs
}
package() {
cd "$srcdir/$_dirname"
. /etc/profile.d/jdk.sh
- make DESTDIR="$pkgdir" install
-}
+ make "${_MAKEFLAGS[@]}" DESTDIR="$pkgdir" install
-md5sums=('SKIP'
- 'f07bc244660852dd9b016c190e38e1c9'
- '90be9bdf1d8cbe5304739df066559a13')
+ 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/"
+}