Added 'Zulu JDK' as overlay bundle.

This commit is contained in:
Ivan Davidov 2018-06-15 22:24:17 +03:00
parent 125ae40711
commit 4e1ddcb741
7 changed files with 90 additions and 0 deletions

View File

@ -156,6 +156,8 @@ OVERLAY_TYPE=folder
# util_linux - executable utilities distributed by the Linux Kernel org.
# vim - advanced text editor.
# zlib - DEFLATE compression/decompression library.
# zulujdk - Zulu is certified build of OpenJDK with better support.
#
# Refer to the README file for more information.
#

View File

@ -133,6 +133,11 @@ Currently available overlay bundles:
ZLIB - software library used for data compression.
Zulu JDK - Zulu is an enterprise quality, certified build of OpenJDK
that can be deployed on multiple platforms. Zulu is free to
download, use and redistribute. This overlay bundle requires
GLIBC and ZLIB.
The overlay bundles can be found in this directory:
minimal_overlay/bundles

View File

@ -0,0 +1,5 @@
# You can find the latest Open JDK archives here:
#
# http://jdk.java.net/9
#
ZULUJDK_URL=http://cdn.azul.com/zulu/bin/zulu10.2+3-jdk10.0.1-linux_x64.tar.gz

View File

@ -0,0 +1,38 @@
#!/bin/sh
set -e
. ../../common.sh
# Read the common configuration properties.
DOWNLOAD_URL=`read_property ZULUJDK_URL`
USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE`
# Grab everything after the last '/' character.
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
echo "Bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
USE_LOCAL_SOURCE="false"
fi
cd $MAIN_SRC_DIR/source/overlay
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
# Downloading Zulu JDK bundle file. The '-c' option allows the download to resume.
echo "Downloading Zulu JDK bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local Zulu JDK bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted Felix.
echo "Removing Zulu JDK work area. This may take a while."
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract Zulu JDK to folder 'work/overlay/zulujdk'.
# Full path will be something like 'work/overlay/zulujdk/jdk-9'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR

View File

@ -0,0 +1,28 @@
#!/bin/sh
set -e
. ../../common.sh
cd $WORK_DIR/overlay/$BUNDLE_NAME
mv `ls -d *` $BUNDLE_NAME
mkdir opt
mv zulujdk opt
mkdir $WORK_DIR/overlay/$BUNDLE_NAME/bin
cd $WORK_DIR/overlay/$BUNDLE_NAME/bin
for FILE in $(ls ../opt/$BUNDLE_NAME/bin)
do
ln -s ../opt/$BUNDLE_NAME/bin/$FILE $FILE
done
# With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $WORK_DIR/overlay/$BUNDLE_NAME/* \
$OVERLAY_ROOTFS
echo "Zulu JDK has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
. ../../common.sh
./01_get.sh
./02_install.sh
cd $SRC_DIR

View File

@ -0,0 +1,2 @@
glibc_full
zlib