Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 71 lines (53 sloc) 1.92 KB
#! /bin/bash
PKG=openjdk
VERSION=17.0.2.8
BUILD=0
PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi
set -xe
umask 022
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
exec </dev/null
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile
BUILDDIR=$PREFIX/build
mkdir -p $BUILDDIR
cd $BUILDDIR
# Install a bootstrap jdk first (16 is the minimum)
test -e openjdk-17.0.2_linux-x64_bin.tar.gz || wget \
https://beehive.molgen.mpg.de/0930efa680ac61e833699ccc36bfc739/openjdk-17.0.2_linux-x64_bin.tar.gz
## https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz
test -d bootjdk || (tar -xf openjdk-17.0.2_linux-x64_bin.tar.gz; mv jdk-17.0.2 bootjdk)
# And now the real thing
test -e jdk-17.0.2+8.tar.gz || wget \
https://beehive.molgen.mpg.de/5cec8574f9d2ac0593cc5ae2585259b7/jdk-17.0.2%2b8.tar.gz
## https://github.com/openjdk/jdk17u/archive/refs/tags/jdk-17.0.2+8.tar.gz
test -d jdk17u-jdk-17.0.2-8 || tar -xf jdk-17.0.2+8.tar.gz
cd jdk17u-jdk-17.0.2-8
mkdir -p jdkbuild
cd jdkbuild
bash ../configure \
--enable-unlimited-crypto=yes \
--disable-warnings-as-errors \
--disable-hotspot-gtest \
--with-native-debug-symbols=none \
--with-debug-level=release \
--with-stdc++lib=static \
--with-zlib=bundled \
--with-boot-jdk=$BUILDDIR/bootjdk \
--with-version-update=2 \
--with-version-build=8 \
--with-version-opt='' \
--with-log=info
make images
# install
cp -a $BUILDDIR/jdk17u-jdk-17.0.2-8/jdkbuild/images/jdk/* $PREFIX
exit