From f12116ccb05800657dc9ed13648de38b0d22ba50 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.7.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..d4bec7115b39 --- /dev/null +++ b/srcpkgs/jruby/template @@ -0,0 +1,50 @@ +# Template file for 'jruby' +pkgname=jruby +version=9.3.7.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=8001b09ceccb94b79868bc0f3382d2514ef9f1706a53a5bf6b62c272a3a49f63 +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 +}