blob: c07f48cae8183fc0eafeac2752d4073bb3b5710d (
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
77
78
|
# Maintainer: Sefa Eyeoglu <contact@scrumplex.net>
# Contributor: Daniel Bermond < gmail-com: danielbermond >
# Contributor: Det <nimetonmaili g-mail>
pkgname=jdk12
pkgver=12.0.2
_build=10
_hash=e482c34c86bd4bf8b56c0b35558996b9
_majver="${pkgver%%.*}"
_next="$((_majver + 1))"
pkgrel=1
pkgdesc='Oracle Java Development Kit'
arch=('x86_64')
url='https://www.oracle.com/java/'
license=('custom')
depends=('java-environment-common' "jre12" 'zlib' 'hicolor-icon-theme')
provides=("java-environment=${_majver}" "java-environment-jdk=${_majver}")
install="${pkgname}.install"
source=("https://download.oracle.com/otn-pub/java/jdk/${pkgver}+${_build}/${_hash}/jdk-${pkgver}_linux-x64_bin.tar.gz"
'java.desktop'
'jconsole.desktop'
'jshell.desktop'
'java_16.png'
'java_48.png')
sha256sums=('2dde6fda89a4ec6e6560ed464e917861c9e40bf576e7a64856dafc55abaaff51'
'7b348c5f6b6ce7df7f849a90f0bdbbdb5a2d6236ec05e96e0b160755cf87fd69'
'74d52ebc46e1d6b104130c04209a9cf318163de022034239042a1981a6ffd60f'
'd207bb3f4a55e329546d084d8b82b6c217177ff11ebcc85e6420b14b011b3cd1'
'd27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed'
'7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176')
DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u')
package() {
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,jjs,jrunscript,keytool,pack200}
rm "${pkgdir}/${_jvmdir}/bin/"{rmid,rmiregistry,unpack200}
# 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 lib/jfr "${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${_majver}-jdk.desktop"
install -D -m644 "${srcdir}/jconsole.desktop" "${pkgdir}/usr/share/applications/jconsole-java${_majver}-jdk.desktop"
install -D -m644 "${srcdir}/jshell.desktop" "${pkgdir}/usr/share/applications/jshell-java${_majver}-jdk.desktop"
install -D -m644 "${srcdir}/java_16.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/java${_majver}-jdk.png"
install -D -m644 "${srcdir}/java_48.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/java${_majver}-jdk.png"
# man pages
local _file
for _file in man/man1/*
do
install -D -m644 "$_file" "${pkgdir}/usr/share/${_file%.1}-jdk${_majver}.1"
done
rm "${pkgdir}/usr/share/man/man1/"{java,jjs,jrunscript,keytool,pack200}-jdk"${_majver}".1
rm "${pkgdir}/usr/share/man/man1/"{rmid,rmiregistry,unpack200}-jdk"${_majver}".1
# legal/licenses
cp -a legal/* "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s "$pkgname" "${pkgdir}/usr/share/licenses/java${_majver}-${pkgname}"
}
|