include ../misc/image/image.beg

select-dis java-common.*                 #commons
select-dis default-jdk-.*                #def jvm
select-dis default-jre-.*                #def jvm
select-dis openjdk-6-.*                  #old jvm
select-dis openjdk-7-.*                  #old jvm
select-dis openjdk-8-.*                  #old jvm
select-dis openjdk-9-.*                  #old jvm
select-dis openjdk-10-.*                 #old jvm
select-dis openjdk-11-.*                 #old jvm
select-dis openjdk-12-.*                 #old jvm
select-dis openjdk-13-.*                 #old jvm
select-dis openjdk-14-.*                 #old jvm
select-dis openjdk-15-.*                 #old jvm
select-dis openjdk-16-.*                 #old jvm
select-dis openjdk-17-.*                 #old jvm
select-dis openjdk-18-.*                 #old jvm
select-dis openjdk-19-.*                 #old jvm
select-one openjdk-20-jdk-headless       #new jvm

exec cp ../misc/image/init.jvm %tmp%/init
exec cp rtr.jar %tmp%/rtr/
exec cp rtr.ver %tmp%/rtr/

select-lst
select-sum
package-down
package-inst

find-file %tmp%/usr/lib/jvm/ java-[0-9]+-openjdk-%arch%
exec %tmp%/usr/lib/jvm/%find%/bin/jlink --output %tmp%/java --strip-debug --no-man-pages --no-header-files --add-modules java.base,java.management
exec ln -s /java/bin/java %tmp%/bin/java
del-alw %tmp%/usr/lib/jvm
del-alw %tmp%/etc/java-*
del-alw %tmp%/java/jmods
del-alw %tmp%/java/docs
del-alw %tmp%/java/demo
del-alw %tmp%/java/man
del-alw %tmp%/java/legal

include ../misc/image/image.end
