mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: rhino-1.7.15
This commit is contained in:
parent
806cdc2f04
commit
4b343e9739
1 changed files with 56 additions and 0 deletions
56
srcpkgs/rhino/template
Normal file
56
srcpkgs/rhino/template
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
# Template file for 'rhino'
|
||||||
|
pkgname=rhino
|
||||||
|
version=1.7.15
|
||||||
|
revision=1
|
||||||
|
hostmakedepends="openjdk17 gradle"
|
||||||
|
depends="virtual?java-runtime"
|
||||||
|
short_desc="Mozilla's JavaScript written entirely in Java"
|
||||||
|
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
||||||
|
license="MPL-2.0"
|
||||||
|
homepage="https://rhino.github.io/"
|
||||||
|
distfiles="https://github.com/mozilla/rhino/releases/download/Rhino${version//./_}_Release/rhino-${version}.zip"
|
||||||
|
checksum=42fce6baf1bf789b62bf938b8e8ec18a1ac92c989dd6e7221e9531454cbd97fa
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
local _tool
|
||||||
|
. /etc/profile.d/jdk.sh
|
||||||
|
gradle --no-daemon jar
|
||||||
|
cat <<-'EOF' >rhino
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
_jar=/usr/share/java/rhino.jar
|
||||||
|
if [ -f /usr/share/java/jline.jar ]; then
|
||||||
|
_jar="$_jar:/usr/share/java/jline.jar"
|
||||||
|
elif ${RHINO_NO_LINE_EDITING:+false} : ; then
|
||||||
|
echo "jline.jar not found, line editing is not supported" >&2
|
||||||
|
fi
|
||||||
|
exec java -classpath "$_jar" \
|
||||||
|
org.mozilla.javascript.tools.shell.Main \
|
||||||
|
"$@"
|
||||||
|
EOF
|
||||||
|
for _tool in debugger jsc; do
|
||||||
|
cat >"rhino-${_tool}" <<-EOF
|
||||||
|
#!/bin/sh
|
||||||
|
exec java -classpath /usr/share/java/rhino.jar \\
|
||||||
|
org.mozilla.javascript.tools.${_tool}.Main \\
|
||||||
|
"\$@"
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
do_check() {
|
||||||
|
. /etc/profile.d/jdk.sh
|
||||||
|
gradle --no-daemon test
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
vmkdir usr/share/java
|
||||||
|
vinstall buildGradle/libs/rhino-${version}-${version}.jar \
|
||||||
|
644 usr/share/java rhino-${version}.jar
|
||||||
|
ln -sf rhino-${version}.jar ${DESTDIR}/usr/share/java/rhino.jar
|
||||||
|
ln -sf rhino-${version}.jar ${DESTDIR}/usr/share/java/js.jar
|
||||||
|
vbin rhino
|
||||||
|
vbin rhino-debugger
|
||||||
|
vbin rhino-jsc
|
||||||
|
vman man/rhino.1
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue