aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-24 00:34:14 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-24 00:34:57 +0200
commitca7ca73ce2d7b86ae17feb6949d77963be3dfdfc (patch)
treec327b082fac9297fccb905e83eb0d78597234c36
parent14253acf7b54115c4b49ae406a2495ef0481542d (diff)
downloadaports-ca7ca73ce2d7b86ae17feb6949d77963be3dfdfc.tar.bz2
aports-ca7ca73ce2d7b86ae17feb6949d77963be3dfdfc.tar.xz
community/jruby: add simple check and modernize abuild
-rw-r--r--community/jruby/APKBUILD32
1 files changed, 20 insertions, 12 deletions
diff --git a/community/jruby/APKBUILD b/community/jruby/APKBUILD
index 27dfc610ab..53e2151db5 100644
--- a/community/jruby/APKBUILD
+++ b/community/jruby/APKBUILD
@@ -41,28 +41,36 @@ prepare() {
rm -r win32 Win32API.rb
# Remove useless native binaries from JARs.
- zip -qd jline/jline/*/jline-*.jar META-INF/native/* || return 1
+ zip -qd jline/jline/*/jline-*.jar META-INF/native/*
zip -qd "$builddir"/lib/jruby.jar jni/*
}
+check() (
+ cd "$srcdir"
+
+ export JRUBY_HOME="$builddir"
+ sh jruby --version
+ sh jruby -e 'puts "Hello, world!"'
+)
+
package() {
cd "$builddir"
install -m644 -D "$builddir"/lib/jruby.jar \
- "$pkgdir"$_destdir/lib/jruby.jar || return 1
+ "$pkgdir"$_destdir/lib/jruby.jar
- install -m755 -D "$srcdir"/jruby "$pkgdir"$_bindir/jruby || return 1
+ install -m755 -D "$srcdir"/jruby "$pkgdir"$_bindir/jruby
# Some of the below copied files will be moved to subpackages by split functions.
install -dm755 "$pkgdir"$_rubydir
- cp -r lib/ruby/gems lib/ruby/stdlib "$pkgdir"$_destdir/lib/ruby/ || return 1
+ cp -r lib/ruby/gems lib/ruby/stdlib "$pkgdir"$_destdir/lib/ruby/
- cp bin/* "$pkgdir"$_bindir/ || return 1
+ cp bin/* "$pkgdir"$_bindir/
install -dm755 "$pkgdir"/usr/bin
local file; for file in jgem jirb jruby jrubyc; do
- ln -sf $_bindir/$file "$pkgdir"/usr/bin/$file || return 1
+ ln -sf $_bindir/$file "$pkgdir"/usr/bin/$file
done
install -m644 -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
@@ -108,7 +116,7 @@ rake() {
pkgdesc="Ruby based make-like utility."
depends="$pkgname"
- _mvgem rake || return 1
+ _mvgem rake
_mv $_bindir/rake
}
@@ -116,7 +124,7 @@ rdoc() {
pkgdesc="Ruby documentation tool"
depends="$pkgname $pkgname-irb"
- _mvgem rdoc || return 1
+ _mvgem rdoc
_mv $_bindir/rdoc $_bindir/ri
}
@@ -124,7 +132,7 @@ readline() {
pkgdesc="Readline support for JRuby"
depends="$pkgname java-jansi-native"
- _mv $_stdlibdir/jline || return 1
+ _mv $_stdlibdir/jline
mv "$pkgdir"$_stdlibdir/readline* "$subpkgdir"$_stdlibdir/
}
@@ -132,7 +140,7 @@ test_unit() {
pkgdesc="Legacy xUnit family unit testing framework for JRuby"
depends="$pkgname $pkgname-power_assert"
- _mvgem test-unit || return 1
+ _mvgem test-unit
_mv $_stdlibdir/test $_bindir/testrb
}
@@ -147,7 +155,7 @@ libs() {
_mv() {
local path; for path in "$@"; do
mkdir -p "$subpkgdir"/${path%/*}
- mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ || return 1
+ mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/
done
}
@@ -161,7 +169,7 @@ _mvgem() {
./$_gemdir/gems/$name-* \
./$_gemdir/specifications/default/$name-*; do
[ -e "$pkgdir"/$file ] || continue
- _mv "$file" || return 1
+ _mv "$file"
done
}