diff options
author | Daniel Bermond | 2022-03-24 10:42:46 -0300 |
---|---|---|
committer | Daniel Bermond | 2022-03-24 10:42:46 -0300 |
commit | 25c31e4d42017b79167aed1cc0c26a6335a2598b (patch) | |
tree | 15ffc55f0aa673a8eda6786561cce7b24b9a3bd1 | |
download | aur-25c31e4d42017b79167aed1cc0c26a6335a2598b.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 77 | ||||
-rw-r--r-- | LICENSE | 128 | ||||
-rw-r--r-- | PKGBUILD | 168 | ||||
-rw-r--r-- | java.desktop | 10 | ||||
-rw-r--r-- | java_16.png | bin | 0 -> 383 bytes | |||
-rw-r--r-- | java_48.png | bin | 0 -> 1439 bytes | |||
-rw-r--r-- | jconsole.desktop | 9 | ||||
-rw-r--r-- | jdk.install | 50 | ||||
-rw-r--r-- | jre.install | 35 | ||||
-rw-r--r-- | jshell.desktop | 9 |
10 files changed, 486 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a6b24253ac88 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,77 @@ +pkgbase = jdk-lts + pkgdesc = Oracle Java + pkgver = 17.0.2 + pkgrel = 1 + url = https://www.oracle.com/java/ + arch = x86_64 + license = custom + makedepends = python-html2text + noextract = jdk-17.0.2_doc-all.zip + source = https://download.oracle.com/java/17/archive/jdk-17.0.2_linux-x64_bin.tar.gz + source = https://download.oracle.com/otn_software/java/jdk/17.0.2+8/dfd4a8d0985749f896bed50d7138ee7f/jdk-17.0.2_doc-all.zip + source = jdk-17_doc-license.html::https://download.oracle.com/otndocs/jcp/java_se-17-final-spec/license.html + source = java.desktop + source = jconsole.desktop + source = jshell.desktop + source = java_16.png + source = java_48.png + source = LICENSE + sha256sums = 342e76bb9ded80aa1edd566efbae42f8f1c2366e19b9189e5941b45893b9861f + sha256sums = d25b34eb17053bf23a7a4a82ac2ab7a85b5d53a1109d6561e302761e23f33895 + sha256sums = ab50940bda40a9e8935d1a8f002debda0fdd0b3e2bcc0319827ec19acd8b34f3 + sha256sums = f17fe6e3d1b7ffbe854364e127509144057878a344d74673393782b90b6f054a + sha256sums = 321dc88a1a0289c1f0a3113e75bd2f488829a0b82c11ac047272e464fb3f3ab3 + sha256sums = e7638e42cbe38f32cb7a1ec800c27408e8559f576d8dd7698fdd5856c4c9b842 + sha256sums = d27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed + sha256sums = 7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176 + sha256sums = 20becfcac0bdeaa29a76e6966d727f8cc79381354cbd5d530cdec823954df19f + +pkgname = jre-lts + pkgdesc = Oracle Java Runtime Environment (LTS release) + install = jre.install + depends = java-runtime-common + depends = ca-certificates-utils + depends = freetype2 + depends = libx11 + depends = libxext + depends = libxi + depends = libxtst + depends = libxrender + optdepends = alsa-lib: for basic sound support + optdepends = gtk2: for the Gtk+ 2 look and feel - desktop usage + optdepends = gtk3: for the Gtk+ 3 look and feel - desktop usage + provides = java-runtime=17 + provides = java-runtime-jdk17 + provides = jre17-jdk=17.0.2-1 + provides = java-runtime-headless=17 + provides = java-runtime-headless-jdk=17 + provides = jre17-jdk-headless=17.0.2-1 + backup = etc/java-jdk-lts/management/jmxremote.access + backup = etc/java-jdk-lts/management/jmxremote.password.template + backup = etc/java-jdk-lts/management/management.properties + backup = etc/java-jdk-lts/security/policy/limited/default_US_export.policy + backup = etc/java-jdk-lts/security/policy/limited/default_local.policy + backup = etc/java-jdk-lts/security/policy/limited/exempt_local.policy + backup = etc/java-jdk-lts/security/policy/unlimited/default_US_export.policy + backup = etc/java-jdk-lts/security/policy/unlimited/default_local.policy + backup = etc/java-jdk-lts/security/policy/README.txt + backup = etc/java-jdk-lts/security/java.policy + backup = etc/java-jdk-lts/security/java.security + backup = etc/java-jdk-lts/logging.properties + backup = etc/java-jdk-lts/net.properties + backup = etc/java-jdk-lts/sound.properties + +pkgname = jdk-lts + pkgdesc = Oracle Java Development Kit (LTS release) + install = jdk.install + depends = java-environment-common + depends = jre-lts=17.0.2-1 + depends = zlib + depends = hicolor-icon-theme + provides = java-environment=17 + provides = java-environment-jdk=17 + provides = jdk17-jdk=17.0.2-1 + +pkgname = jdk-lts-doc + pkgdesc = Oracle Java documentation (LTS release) + arch = any diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..573e5255afa4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,128 @@ +Oracle No-Fee Terms and Conditions (NFTC) + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) +a company or organization (each an "Entity") accessing the Programs, if +use of the Programs will be on behalf of such Entity; or (b) an +individual accessing the Programs, if use of the Programs will not be +on behalf of an Entity. "Program(s)" refers to Oracle software provided +by Oracle pursuant to the following terms and any updates, error +corrections, and/or Program Documentation provided by Oracle. "Program +Documentation" refers to Program user manuals and Program installation +manuals, if any. If available, Program Documentation may be delivered +with the Programs and/or may be accessed from +www.oracle.com/documentation. "Separate Terms" refers to separate +license terms that are specified in the Program Documentation, readmes +or notice files and that apply to Separately Licensed Technology. +"Separately Licensed Technology" refers to Oracle or third party +technology that is licensed under Separate Terms and not under the +terms of this license. + +Separately Licensed Technology + +Oracle may provide certain notices to You in Program Documentation, +readmes or notice files in connection with Oracle or third party +technology provided as or with the Programs. If specified in the +Program Documentation, readmes or notice files, such technology will be +licensed to You under Separate Terms. Your rights to use Separately +Licensed Technology under Separate Terms are not restricted in any way +by the terms herein. For clarity, notwithstanding the existence of a +notice, third party technology that is not Separately Licensed +Technology shall be deemed part of the Programs licensed to You under +the terms of this license. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is +licensed under an open source license that gives You the right to +receive the source code for that binary, You can obtain a copy of the +applicable source code from https://oss.oracle.com/sources/ or +http://www.oracle.com/goto/opensourcecode. If the source code for such +software was not provided to You with the binary, You can also receive +a copy of the source code on physical media by submitting a written +request pursuant to the instructions in the "Written Offer for Source +Code" section of the latter website. + +----------------------------------------------------------------------- +-------- + +The following license terms apply to those Programs that are not +provided to You under Separate Terms. + +License Rights and Restrictions + +Oracle grants to You, as a recipient of this Program, subject to the +conditions stated herein, a nonexclusive, nontransferable, limited +license to: + +(a) internally use the unmodified Programs for the purposes of +developing, testing, prototyping and demonstrating your applications, +and running the Program for Your own personal use or internal business +operations; and + +(b) redistribute the unmodified Program and Program Documentation, +under the terms of this License, provided that You do not charge Your +licensees any fees associated with such distribution or use of the +Program, including, without limitation, fees for products that include +or are bundled with a copy of the Program or for services that involve +the use of the distributed Program. + +You may make copies of the Programs to the extent reasonably necessary +for exercising the license rights granted herein and for backup +purposes. You are granted the right to use the Programs to provide +third party training in the use of the Programs and associated +Separately Licensed Technology only if there is express authorization +of such use by Oracle on the Program's download page or in the Program +Documentation. + +Your license is contingent on compliance with the following conditions: + +- You do not remove markings or notices of either Oracle's or a +licensor's proprietary rights from the Programs or Program +Documentation; + +- You comply with all U.S. and applicable export control and economic +sanctions laws and regulations that govern Your use of the Programs +(including technical data); + +- You do not cause or permit reverse engineering, disassembly or +decompilation of the Programs (except as allowed by law) by You nor +allow an associated party to do so. + +For clarity, any source code that may be included in the distribution +with the Programs is provided solely for reference purposes and may not +be modified, unless such source code is under Separate Terms permitting +modification. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property +rights to the Programs. + +Information Collection + +The Programs' installation and/or auto-update processes, if any, may +transmit a limited amount of data to Oracle or its service provider +about those processes to help Oracle understand and optimize them. +Oracle does not associate the data with personally identifiable +information. Refer to Oracle's Privacy Policy at +www.oracle.com/privacy. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE +FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING +WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO +YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +Last updated: 12 September 2021 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e99988542965 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,168 @@ +# Maintainer : Daniel Bermond <dbermond@archlinux.org> +# Contributor: Det <nimetonmaili g-mail> + +pkgbase=jdk-lts +pkgname=('jre-lts' 'jdk-lts' 'jdk-lts-doc') +pkgver=17.0.2 +_build=8 +_hash=dfd4a8d0985749f896bed50d7138ee7f +_majver="${pkgver%%.*}" +pkgrel=1 +pkgdesc='Oracle Java' +arch=('x86_64') +url='https://www.oracle.com/java/' +license=('custom') +makedepends=('python-html2text') +source=("https://download.oracle.com/java/${_majver}/archive/jdk-${pkgver}_linux-x64_bin.tar.gz" + "https://download.oracle.com/otn_software/java/jdk/${pkgver}+${_build}/${_hash}/jdk-${pkgver}_doc-all.zip" + "jdk-${_majver}_doc-license.html"::"https://download.oracle.com/otndocs/jcp/java_se-${_majver}-final-spec/license.html" + 'java.desktop' + 'jconsole.desktop' + 'jshell.desktop' + 'java_16.png' + 'java_48.png' + 'LICENSE') +noextract=("jdk-${pkgver}_doc-all.zip") +sha256sums=('342e76bb9ded80aa1edd566efbae42f8f1c2366e19b9189e5941b45893b9861f' + 'd25b34eb17053bf23a7a4a82ac2ab7a85b5d53a1109d6561e302761e23f33895' + 'ab50940bda40a9e8935d1a8f002debda0fdd0b3e2bcc0319827ec19acd8b34f3' + 'f17fe6e3d1b7ffbe854364e127509144057878a344d74673393782b90b6f054a' + '321dc88a1a0289c1f0a3113e75bd2f488829a0b82c11ac047272e464fb3f3ab3' + 'e7638e42cbe38f32cb7a1ec800c27408e8559f576d8dd7698fdd5856c4c9b842' + 'd27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed' + '7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176' + '20becfcac0bdeaa29a76e6966d727f8cc79381354cbd5d530cdec823954df19f') + +DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u') + +prepare() { + mkdir -p "jdk-doc-${pkgver}" + bsdtar -x -f "jdk-${pkgver}_doc-all.zip" -C "jdk-doc-${pkgver}" --strip-components='1' + html2text "jdk-${_majver}_doc-license.html" > LICENSE-doc +} + +package_jre-lts() { + pkgdesc+=' Runtime Environment (LTS release)' + depends=('java-runtime-common' 'ca-certificates-utils' 'freetype2' 'libx11' 'libxext' + 'libxi' 'libxtst' 'libxrender') + optdepends=('alsa-lib: for basic sound support' + 'gtk2: for the Gtk+ 2 look and feel - desktop usage' + 'gtk3: for the Gtk+ 3 look and feel - desktop usage') + provides=("java-runtime=${_majver}" "java-runtime-jdk${_majver}" + "jre${_majver}-jdk=${pkgver}-${pkgrel}" + "java-runtime-headless=${_majver}" "java-runtime-headless-jdk=${_majver}" + "jre${_majver}-jdk-headless="${pkgver}-${pkgrel}) + backup=("etc/java-${pkgbase}/management/jmxremote.access" + "etc/java-${pkgbase}/management/jmxremote.password.template" + "etc/java-${pkgbase}/management/management.properties" + "etc/java-${pkgbase}/security/policy/limited/default_US_export.policy" + "etc/java-${pkgbase}/security/policy/limited/default_local.policy" + "etc/java-${pkgbase}/security/policy/limited/exempt_local.policy" + "etc/java-${pkgbase}/security/policy/unlimited/default_US_export.policy" + "etc/java-${pkgbase}/security/policy/unlimited/default_local.policy" + "etc/java-${pkgbase}/security/policy/README.txt" + "etc/java-${pkgbase}/security/java.policy" + "etc/java-${pkgbase}/security/java.security" + "etc/java-${pkgbase}/logging.properties" + "etc/java-${pkgbase}/net.properties" + "etc/java-${pkgbase}/sound.properties") + install=jre.install + + cd "jdk-${pkgver}" + local _jvmdir="/usr/lib/jvm/java-${_majver}-jdk" + + install -d -m755 "${pkgdir}/etc" + install -d -m755 "${pkgdir}/${_jvmdir}" + install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" + + # conf + cp -a conf "${pkgdir}/etc/java-${pkgbase}" + ln -s "../../../../etc/java-${pkgbase}" "${pkgdir}/${_jvmdir}/conf" + + # bin + install -D -m755 bin/{java,jfr,jrunscript} -t "${pkgdir}/${_jvmdir}/bin" + install -D -m755 bin/{keytool,rmiregistry} -t "${pkgdir}/${_jvmdir}/bin" + + # libs + cp -a lib "${pkgdir}/${_jvmdir}" + rm "${pkgdir}/${_jvmdir}/lib/"{ct.sym,libattach.so,libsaproc.so,src.zip} + + # man pages + local _file + for _file in man/man1/{java,jfr,jrunscript,keytool,rmiregistry}.1 + do + install -D -m644 "$_file" "${pkgdir}/usr/share/${_file%.1}-jdk${_majver}.1" + done + + install -D -m644 release -t "${pkgdir}/${_jvmdir}" + + # link JKS keystore from ca-certificates-utils + rm "${pkgdir}${_jvmdir}/lib/security/cacerts" + ln -s /etc/ssl/certs/java/cacerts "${pkgdir}${_jvmdir}/lib/security/cacerts" + + # legal/licenses + cp -a legal/* "${pkgdir}/usr/share/licenses/${pkgname}" + ln -s "$pkgname" "${pkgdir}/usr/share/licenses/java-${pkgname}" + ln -s "../../../share/licenses/${pkgname}" "${pkgdir}/${_jvmdir}/legal" + install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}" +} + +package_jdk-lts() { + pkgdesc+=' Development Kit (LTS release)' + depends=('java-environment-common' "jre-lts=${pkgver}-${pkgrel}" 'zlib' + 'hicolor-icon-theme') + provides=("java-environment=${_majver}" "java-environment-jdk=${_majver}" + "jdk${_majver}-jdk=${pkgver}-${pkgrel}") + install=jdk.install + + cd "jdk-${pkgver}" + local _jvmdir="/usr/lib/jvm/java-${_majver}-${pkgname}" + + install -d -m755 "${pkgdir}/${_jvmdir}" + install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" + + # bin + cp -a bin "${pkgdir}/${_jvmdir}" + rm "${pkgdir}/${_jvmdir}/bin/"{java,jfr,jrunscript,keytool,rmiregistry} + + # libs + install -D -m644 lib/ct.sym -t "${pkgdir}/${_jvmdir}/lib" + install -D -m644 lib/libattach.so -t "${pkgdir}/${_jvmdir}/lib" + install -D -m644 lib/libsaproc.so -t "${pkgdir}/${_jvmdir}/lib" + + cp -a include "${pkgdir}/${_jvmdir}" + cp -a jmods "${pkgdir}/${_jvmdir}" + + install -D -m644 lib/src.zip -t "${pkgdir}/${_jvmdir}/lib" + + # desktop and icons + install -D -m644 "${srcdir}/java.desktop" "${pkgdir}/usr/share/applications/java-java-jdk.desktop" + install -D -m644 "${srcdir}/jconsole.desktop" "${pkgdir}/usr/share/applications/jconsole-java-jdk.desktop" + install -D -m644 "${srcdir}/jshell.desktop" "${pkgdir}/usr/share/applications/jshell-java-jdk.desktop" + install -D -m644 "${srcdir}/java_16.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/java-jdk.png" + install -D -m644 "${srcdir}/java_48.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/java-jdk.png" + + # man pages + local _file + while read -r -d '' _file + do + install -D -m644 "$_file" "${pkgdir}/usr/share/${_file%.1}-jdk${_majver}.1" + done < <(find man/man1 -type f -print0) + rm "${pkgdir}/usr/share/man/man1/"{java,jfr,jrunscript,keytool,rmiregistry}-jdk"${_majver}".1 + + # legal/licenses + cp -a legal/* "${pkgdir}/usr/share/licenses/${pkgname}" + ln -s "$pkgname" "${pkgdir}/usr/share/licenses/java-${pkgname}" + install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}" +} + +package_jdk-lts-doc() { + pkgdesc+=' documentation (LTS release)' + arch=('any') + + install -d -m755 "${pkgdir}/usr/share"/{doc,licenses} + cp -dr --no-preserve='ownership' "jdk-doc-${pkgver}" "${pkgdir}/usr/share/doc/java-jdk" + mv "${pkgdir}/usr/share/doc/java-jdk/legal" "${pkgdir}/usr/share/licenses/${pkgname}" + install -D -m644 LICENSE-doc "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + ln -s "../../licenses/${pkgname}" "${pkgdir}/usr/share/doc/java-jdk/legal" +} diff --git a/java.desktop b/java.desktop new file mode 100644 index 000000000000..da271be2da78 --- /dev/null +++ b/java.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Oracle Java 17 Runtime +Comment=Oracle Java 17 Runtime +Keywords=java;runtime +Exec=/usr/lib/jvm/java-17-jdk/bin/java -jar +Terminal=false +Type=Application +Icon=java-jdk +MimeType=application/x-java-archive;application/java-archive;application/x-jar; +NoDisplay=true diff --git a/java_16.png b/java_16.png Binary files differnew file mode 100644 index 000000000000..0456bab30431 --- /dev/null +++ b/java_16.png diff --git a/java_48.png b/java_48.png Binary files differnew file mode 100644 index 000000000000..9fa80e761a75 --- /dev/null +++ b/java_48.png diff --git a/jconsole.desktop b/jconsole.desktop new file mode 100644 index 000000000000..f73df6a198d4 --- /dev/null +++ b/jconsole.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Oracle Java 17 Console +Comment=Oracle Java 17 Monitoring and Management Console +Keywords=java;console;monitoring +Exec=/usr/lib/jvm/java-17-jdk/bin/jconsole +Terminal=false +Type=Application +Icon=java-jdk +Categories=Application;System; diff --git a/jdk.install b/jdk.install new file mode 100644 index 000000000000..c6e4e47ef7d3 --- /dev/null +++ b/jdk.install @@ -0,0 +1,50 @@ +THIS_JDK='java-17-jdk' + +fix_default() { + if [ ! -x /usr/bin/java ]; then + /usr/bin/archlinux-java unset + echo "" + else + /usr/bin/archlinux-java get + fi +} + +post_install() { + default=$(fix_default) + case ${default} in + "") + /usr/bin/archlinux-java set ${THIS_JDK} + ;; + ${THIS_JDK}) + # Nothing + ;; + *) + echo "Default Java environment is already set to '${default}'" + echo "See 'archlinux-java help' to change it" + ;; + esac + + if [ ! -f /etc/ssl/certs/java/cacerts ]; then + /usr/bin/update-ca-trust + fi +} + +post_upgrade() { + default=$(fix_default) + if [ -z "${default}" ]; then + /usr/bin/archlinux-java set ${THIS_JDK} + fi + + if [ ! -f /etc/ssl/certs/java/cacerts ]; then + /usr/bin/update-ca-trust + fi +} + +pre_remove() { + if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then + # Check JRE17 is still available + if [ -x /usr/lib/jvm/${THIS_JDK}/bin/java ]; then + /usr/bin/archlinux-java unset + fi + fi +} diff --git a/jre.install b/jre.install new file mode 100644 index 000000000000..b26706c05018 --- /dev/null +++ b/jre.install @@ -0,0 +1,35 @@ +THIS_JRE='java-17-jdk' + +fix_default() { + if [ ! -x /usr/bin/java ]; then + /usr/bin/archlinux-java unset + echo "" + else + /usr/bin/archlinux-java get + fi +} + +post_install() { + default=$(fix_default) + case ${default} in + "") + /usr/bin/archlinux-java set ${THIS_JRE} + ;; + ${THIS_JRE}) + # Nothing + ;; + *) + echo "Default Java environment is already set to '${default}'" + echo "See 'archlinux-java help' to change it." + ;; + esac + + echo "When you use a non-reparenting window manager," + echo "set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh" +} + +post_upgrade() { + if [ -z "$(fix_default)" ]; then + /usr/bin/archlinux-java set ${THIS_JRE} + fi +} diff --git a/jshell.desktop b/jshell.desktop new file mode 100644 index 000000000000..818ed8d66d6a --- /dev/null +++ b/jshell.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Oracle Java 17 Shell +Comment=Oracle Java 17 Shell +Keywords=java;shell +Exec=/usr/lib/jvm/java-17-jdk/bin/jshell +Terminal=true +Type=Application +Icon=java-jdk +Categories=Application;System; |