From 24968a5cdc081f289c77d4995b31c551428f2727 Mon Sep 17 00:00:00 2001 From: Maja Reberc Date: Thu, 25 Aug 2022 08:38:39 +0200 Subject: [PATCH] New package: jruby-9.3.8.0 --- srcpkgs/jruby/template | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 srcpkgs/jruby/template diff --git a/srcpkgs/jruby/template b/srcpkgs/jruby/template new file mode 100644 index 000000000000..191ea019363b --- /dev/null +++ b/srcpkgs/jruby/template @@ -0,0 +1,50 @@ +# Template file for 'jruby' +pkgname=jruby +version=9.3.8.0 +revision=1 +hostmakedepends="apache-ant>=1.8 apache-maven>=3.3.0" +depends="virtual?java-runtime" +short_desc="Implementation of the Ruby language using the JVM" +maintainer="Chloris " +license="EPL-2.0, GPL-2.0-only, LGPL-2.1-only" +homepage="https://www.jruby.org/" +distfiles="https://repo1.maven.org/maven2/org/jruby/jruby-dist/${version}/${pkgname}-dist-${version}-src.zip" +checksum=c2ee3b79c29afd86c538e347ba48d935703d0d1ee665010f9ae52adc358429e5 +conflicts="ruby ruby-ri" + +do_build() { + ./mvnw +} + +post_build() { + cd bin + # Remove Windows scripts, binaries and libraries + rm -f *.bat *.exe *.dll +} + +do_install() { + for file in bin/* + do + # Copy symlinks + if [ -L "$file" ] + then + vcopy "$file" usr/bin + # Install binaries with correct permissions + elif [ -f "$file" ] + then + vbin "$file" + fi + done + + vmkdir usr/lib + vinstall lib/jruby.jar 644 usr/lib/ + vcopy lib/ruby usr/lib/ + + vdoc README.md + + # Fix file permissions on musl architectures + if [ $XBPS_LIBC == 'musl' ] + then + find "$DESTDIR/usr/lib" -perm /022 -exec chmod go-w {} \; + fi +}