diff options
Diffstat (limited to 'development/amazon-corretto')
-rw-r--r-- | development/amazon-corretto/README | 7 | ||||
-rw-r--r-- | development/amazon-corretto/amazon-corretto.SlackBuild | 94 | ||||
-rw-r--r-- | development/amazon-corretto/amazon-corretto.info | 10 | ||||
-rw-r--r-- | development/amazon-corretto/profile.d/jdk.csh | 4 | ||||
-rw-r--r-- | development/amazon-corretto/profile.d/jdk.sh | 4 | ||||
-rw-r--r-- | development/amazon-corretto/slack-desc | 19 |
6 files changed, 138 insertions, 0 deletions
diff --git a/development/amazon-corretto/README b/development/amazon-corretto/README new file mode 100644 index 0000000000..fd774df217 --- /dev/null +++ b/development/amazon-corretto/README @@ -0,0 +1,7 @@ +Amazon Corretto is a no-cost, multiplatform, production-ready +distribution of the Open Java Development Kit (OpenJDK). +Corretto is used internally at Amazon for production services. +With Corretto, you can develop and run Java applications on +operating systems such as Linux, Windows, and macOS. + +This will also package the JRE. diff --git a/development/amazon-corretto/amazon-corretto.SlackBuild b/development/amazon-corretto/amazon-corretto.SlackBuild new file mode 100644 index 0000000000..02c5f1d5bd --- /dev/null +++ b/development/amazon-corretto/amazon-corretto.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/bash + +# Copyright 2022 Yousha Aleayoub, Iran +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=amazon-corretto +VERSION=${VERSION:-17.0.4.8.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +ARCH=$( uname -m ) + +if [ "$ARCH" != "x86_64" ]; then + echo "Corretto supports only 64-bit architecture" + exit 1 +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +LIB_ARCH=amd64 +LIBDIRSUFFIX="64" +SRC_ARCH="x64" + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $PKG +mkdir -p usr/lib${LIBDIRSUFFIX} +cd usr/lib${LIBDIRSUFFIX} +tar xvf $CWD/$PRGNAM-$VERSION-linux-$SRC_ARCH.tar.gz +chown -R root.root $PKG +find $PKG \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +mkdir -p $PKG/etc/profile.d +for file in $(ls $CWD/profile.d/*) ; do + cat $file > $PKG/etc/profile.d/$(basename $file) +done +chmod 755 $PKG/etc/profile.d/* + + +( cd $PKG/usr/lib${LIBDIRSUFFIX} + mv $PRGNAM-$VERSION-linux-$SRC_ARCH java +) + + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat << EOF > $PKG/install/doinst.sh + +EOF + + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + $PKG/usr/lib${LIBDIRSUFFIX}/java/LICENSE \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/amazon-corretto/amazon-corretto.info b/development/amazon-corretto/amazon-corretto.info new file mode 100644 index 0000000000..c81a8e77ae --- /dev/null +++ b/development/amazon-corretto/amazon-corretto.info @@ -0,0 +1,10 @@ +PRGNAM="amazon-corretto" +VERSION="17.0.4.8.1" +HOMEPAGE="https://github.com/corretto/corretto-17/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://corretto.aws/downloads/resources/17.0.4.8.1/amazon-corretto-17.0.4.8.1-linux-x64.tar.gz" +MD5SUM_x86_64="4e8762a6e46000dd64ce51f2980ee30b" +REQUIRES="" +MAINTAINER="Yousha Aleayoub" +EMAIL="yousha.a@hotmail.com" diff --git a/development/amazon-corretto/profile.d/jdk.csh b/development/amazon-corretto/profile.d/jdk.csh new file mode 100644 index 0000000000..a81d61a89e --- /dev/null +++ b/development/amazon-corretto/profile.d/jdk.csh @@ -0,0 +1,4 @@ +#!/bin/csh +setenv JAVA_HOME /usr/lib64/java +setenv MANPATH ${MANPATH}:${JAVA_HOME}/man +setenv PATH ${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin diff --git a/development/amazon-corretto/profile.d/jdk.sh b/development/amazon-corretto/profile.d/jdk.sh new file mode 100644 index 0000000000..b12a5a00be --- /dev/null +++ b/development/amazon-corretto/profile.d/jdk.sh @@ -0,0 +1,4 @@ +#!/bin/sh +export JAVA_HOME=/usr/lib64/java +export MANPATH="${MANPATH}:${JAVA_HOME}/man" +export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" diff --git a/development/amazon-corretto/slack-desc b/development/amazon-corretto/slack-desc new file mode 100644 index 0000000000..c6d17eb4d5 --- /dev/null +++ b/development/amazon-corretto/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +amazon-corretto: amazon-corretto (JDK Distribution) +amazon-corretto: +amazon-corretto: Amazon Corretto is a no-cost, multiplatform, production-ready +amazon-corretto: distribution of the Open Java Development Kit (OpenJDK). Corretto +amazon-corretto: comes with long-term support that will include performance +amazon-corretto: enhancements and security fixes. Amazon runs Corretto internally on +amazon-corretto: thousands of production services and Corretto is certified as +amazon-corretto: compatible with the Java SE standard. With Corretto you can develop +amazon-corretto: and run Java applications on popular operating systems. +amazon-corretto: +amazon-corretto: For more information see: https://docs.aws.amazon.com/corretto |