blob: 5361675cb2b45ce87d70c4f66d445fe5033db28d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: Muflone http://www.muflone.com/contacts/english/
# Contributor: D. Can Celasun <dcelasun[at]dcc[dot]im>
# Contributor: Daniel Bermond <dbermond@archlinux.org>
# Contributor: Det <nimetonmaili g-mail>
pkgname=jre17
pkgver=17.0.11
_majver="${pkgver%%.*}"
pkgrel=1
pkgdesc='Oracle Java 17 Runtime Environment'
arch=('x86_64')
url='https://www.oracle.com/java/'
license=('LicenseRef-custom')
depends=('java-runtime-common' 'ca-certificates-utils' 'freetype2' 'libxtst'
'libxrender' 'libnet')
optdepends=('alsa-lib: for basic sound support')
provides=("java-runtime=${_majver}" "java-runtime-headless=${_majver}"
"java-runtime-jre=${_majver}" "java-runtime-headless-jre=${_majver}")
backup=("etc/java${_majver}-${pkgname}/management/jmxremote.access"
"etc/java${_majver}-${pkgname}/management/jmxremote.password.template"
"etc/java${_majver}-${pkgname}/management/management.properties"
"etc/java${_majver}-${pkgname}/security/policy/limited/default_US_export.policy"
"etc/java${_majver}-${pkgname}/security/policy/limited/default_local.policy"
"etc/java${_majver}-${pkgname}/security/policy/limited/exempt_local.policy"
"etc/java${_majver}-${pkgname}/security/policy/unlimited/default_US_export.policy"
"etc/java${_majver}-${pkgname}/security/policy/unlimited/default_local.policy"
"etc/java${_majver}-${pkgname}/security/policy/README.txt"
"etc/java${_majver}-${pkgname}/security/java.policy"
"etc/java${_majver}-${pkgname}/security/java.security"
"etc/java${_majver}-${pkgname}/logging.properties"
"etc/java${_majver}-${pkgname}/net.properties"
"etc/java${_majver}-${pkgname}/sound.properties")
install="${pkgname}.install"
source=("jdk-${pkgver}.tar.gz"::"https://download.oracle.com/java/${_majver}/latest/jdk-${_majver}_linux-x64_bin.tar.gz")
sha256sums=('62f12f52306217ec80bdc6ad0bdc627824b584d4d96c56976215f0167d92a322')
package() {
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${_majver}-${pkgname}"
ln -s "../../../../etc/java${_majver}-${pkgname}" "${pkgdir}/${_jvmdir}/conf"
# bin
install -D -m755 bin/{java,jpackage,jrunscript} -t "${pkgdir}/${_jvmdir}/bin"
install -D -m755 bin/{keytool,rmiregistry} -t "${pkgdir}/${_jvmdir}/bin"
# libs
cp -a lib "${pkgdir}/${_jvmdir}"
rm -r "${pkgdir}/${_jvmdir}/lib/jfr"
rm "${pkgdir}/${_jvmdir}/lib/"{ct.sym,libattach.so,libsaproc.so,src.zip}
# man pages
local _file
for _file in man/man1/{java,jpackage,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}"
# replace JKS keystore with 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${_majver}-${pkgname}"
ln -s "../../../share/licenses/${pkgname}" "${pkgdir}/${_jvmdir}/legal"
}
|