diff options
author | Sukma Wardana <sukma.wardana@mail.com> | 2018-10-27 02:01:52 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2018-10-27 02:17:03 +0100 |
commit | e9757d81ade3794fc355361e4b7558243f82a385 (patch) | |
tree | b7b0b6b2bdc328cb713fa4892cb8605581191ea5 /development/adoptopenjdk | |
parent | defaf59a36456e6b64d7dacc2f1eac10d72a117f (diff) | |
download | slackbuilds-e9757d81ade3794fc355361e4b7558243f82a385.tar.gz |
development/adoptopenjdk: Added (Open Implementation of JDK).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/adoptopenjdk')
-rw-r--r-- | development/adoptopenjdk/README | 9 | ||||
-rw-r--r-- | development/adoptopenjdk/adoptopenjdk.SlackBuild | 81 | ||||
-rw-r--r-- | development/adoptopenjdk/adoptopenjdk.csh | 4 | ||||
-rw-r--r-- | development/adoptopenjdk/adoptopenjdk.info | 10 | ||||
-rw-r--r-- | development/adoptopenjdk/adoptopenjdk.sh | 4 | ||||
-rw-r--r-- | development/adoptopenjdk/slack-desc | 19 |
6 files changed, 127 insertions, 0 deletions
diff --git a/development/adoptopenjdk/README b/development/adoptopenjdk/README new file mode 100644 index 0000000000..30dcaf123c --- /dev/null +++ b/development/adoptopenjdk/README @@ -0,0 +1,9 @@ +This is a SlackBuild to repackage OpenJDK 11 binary from the AdoptOpenJDK +community. + +Before installing this package please consider any other jdk's / jre's that +you have already installed as they may cause conflicts with the PATH, JAVA_HOME +and MANPATH variables. + +After installing the package you will need to logout / reboot your machine +as it will add files to the /etc/profile.d folder. diff --git a/development/adoptopenjdk/adoptopenjdk.SlackBuild b/development/adoptopenjdk/adoptopenjdk.SlackBuild new file mode 100644 index 0000000000..8858c182ec --- /dev/null +++ b/development/adoptopenjdk/adoptopenjdk.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/sh + +# Slackware build script for adoptopenjdk + +# Copyright 2018 Sukma Wardana <sukma.wardana> +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software +# and associated documentation files (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, publish, distribute, +# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or +# substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +PRGNAM=adoptopenjdk +VERSION=${VERSION:-11+28} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "${ARCH:-$(uname -m)}" != "x86_64" ]; then + echo "Architecture ${ARCH} is not supported." + exit 1 +fi +LIBDIRSUFFIX="64" + +set -e + +MAJORVER=${VERSION%+*} +MINORVER=${VERSION#*+} + +TARNAM=OpenJDK${MAJORVER}-jdk_x64_linux_hotspot_${MAJORVER}_${MINORVER} + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT + +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}${MAJORVER} +cd $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}${MAJORVER} +tar xvf $CWD/$TARNAM.tar.gz --strip-components=2 +chown -R root:root . +find -L . \ + \( -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 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find ./man -type f -exec gzip -9 {} \; +for i in $( find ./man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/etc/profile.d +for SCRIPT in $PRGNAM.sh $PRGNAM.csh ; do + sed -e "s;@MAJORVER@;$MAJORVER;" \ + < $CWD/${SCRIPT} \ + > $PKG/etc/profile.d/${SCRIPT} + chmod 755 $PKG/etc/profile.d/${SCRIPT} +done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a release $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/adoptopenjdk/adoptopenjdk.csh b/development/adoptopenjdk/adoptopenjdk.csh new file mode 100644 index 0000000000..6eff47174f --- /dev/null +++ b/development/adoptopenjdk/adoptopenjdk.csh @@ -0,0 +1,4 @@ +#!/bin/csh +setenv JAVA_HOME /usr/lib64/adoptopenjdk@MAJORVER@ +setenv MANPATH ${MANPATH}:${JAVA_HOME}/man +setenv PATH ${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin diff --git a/development/adoptopenjdk/adoptopenjdk.info b/development/adoptopenjdk/adoptopenjdk.info new file mode 100644 index 0000000000..381318e654 --- /dev/null +++ b/development/adoptopenjdk/adoptopenjdk.info @@ -0,0 +1,10 @@ +PRGNAM="adoptopenjdk" +VERSION="11+28" +HOMEPAGE="https://adoptopenjdk.net" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11+28/OpenJDK11-jdk_x64_linux_hotspot_11_28.tar.gz" +MD5SUM_x86_64="001584fa7c4dee54ef7834668ca3e4e3" +REQUIRES="" +MAINTAINER="Sukma Wardana" +EMAIL="sukma.wardana@mail.com" diff --git a/development/adoptopenjdk/adoptopenjdk.sh b/development/adoptopenjdk/adoptopenjdk.sh new file mode 100644 index 0000000000..fce9d71069 --- /dev/null +++ b/development/adoptopenjdk/adoptopenjdk.sh @@ -0,0 +1,4 @@ +#!/bin/sh +export JAVA_HOME=/usr/lib64/adoptopenjdk@MAJORVER@ +export MANPATH="${MANPATH}:${JAVA_HOME}/man" +export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" diff --git a/development/adoptopenjdk/slack-desc b/development/adoptopenjdk/slack-desc new file mode 100644 index 0000000000..b63b871a2d --- /dev/null +++ b/development/adoptopenjdk/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------------------------------------------------------| +adoptopenjdk: adoptopenjdk (Open Implementation of JDK) +adoptopenjdk: +adoptopenjdk: OpenJDK 11 is an open source implementation of version 11 of the Java +adoptopenjdk: Development Kit, Standard Edition. It includes tools for developing +adoptopenjdk: testing, and running programs written in java. +adoptopenjdk: +adoptopenjdk: OpenJDK 11 binary provided by AdoptOpenJDK, a community of Java user +adoptopenjdk: group members who are advocates of OpenJDK. Part of the group's +adoptopenjdk: activities occur at the Adoption Group on the OpenJDK project. +adoptopenjdk: +adoptopenjdk: Homepage: https://adoptopenjdk.net |