diff options
author | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2012-11-11 19:57:22 -0200 |
---|---|---|
committer | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2012-11-11 19:57:22 -0200 |
commit | 246bf186da93a3852240ac92428f54b41c58e1db (patch) | |
tree | 8f0e6a272bf36d3c00a15d60bb69d9b01c3e022b /java/java-rxtx/PKGBUILD | |
parent | 7ad962cb59151982416803f4c42bf114dbc9c4ee (diff) | |
parent | 57c4a12d7c00bb82275af154cbcdbb7ec871c57c (diff) | |
download | abslibre-246bf186da93a3852240ac92428f54b41c58e1db.tar.gz abslibre-246bf186da93a3852240ac92428f54b41c58e1db.tar.bz2 abslibre-246bf186da93a3852240ac92428f54b41c58e1db.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'java/java-rxtx/PKGBUILD')
-rw-r--r-- | java/java-rxtx/PKGBUILD | 83 |
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/" +} |