Contents of /branches/branch-xorg18/core/sun-jdk/sun-jdk-1.6.0.17-r1.smage2
Parent Directory | Revision Log
Revision 5192 -
(show annotations)
(download)
Tue Apr 6 21:54:10 2010 UTC (14 years, 5 months ago) by niro
File size: 2868 byte(s)
Tue Apr 6 21:54:10 2010 UTC (14 years, 5 months ago) by niro
File size: 2868 byte(s)
created branch 'branch-xorg18'
1 | # $Id$ |
2 | |
3 | PNAME="sun-jdk" |
4 | PVER="1.6.0.17" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="dev-java" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Sun Java Development Kit ${PVER}." |
11 | HOMEPAGE="http://java.sun.com/javase/6/" |
12 | |
13 | DEPEND="== dev-java/sun-jre-${PVER}" |
14 | |
15 | SDEPEND=">= app-arch/unzip-5 |
16 | >= sys-apps/sed-4" |
17 | |
18 | PROVIDE="virtual/java-jdk" |
19 | |
20 | # both files must be fetch or our md5-logic breaks |
21 | SRCFILE_x86="jdk-${PVER:2:1}u$(echo ${PVER:6} | sed 's/0\([0-9]\)/\1/')-dlj-linux-i586.bin" |
22 | SRCFILE_x86_64="jdk-${PVER:2:1}u$(echo ${PVER:6} | sed 's/0\([0-9]\)/\1/')-dlj-linux-amd64.bin" |
23 | # decide between x86 and x86_64 arch |
24 | SRCFILE="$(eval echo \$SRCFILE_${ARCH/i*86/x86})" |
25 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
26 | |
27 | # official script from sun; fetch it at |
28 | # https://jdk-distros.dev.java.net/source/browse/*checkout*/jdk-distros/trunk/utils/construct.sh |
29 | CONSTRUCTSH="construct-rev148.sh" |
30 | |
31 | sminclude mtools |
32 | |
33 | # commented backup sun uri; supports no resume -> downloads everything twice |
34 | SRC_URI=( |
35 | http://dlc.sun.com/dlj/binaries/${SRCFILE_x86} |
36 | http://dlc.sun.com/dlj/binaries/${SRCFILE_x86_64} |
37 | #http://download.java.net/dlj/binaries/${SRCFILE_x86} |
38 | #http://download.java.net/dlj/binaries/${SRCFILE_x86_64} |
39 | mirror://${PNAME}/${SRCFILE_x86} |
40 | mirror://${PNAME}/${SRCFILE_x86_64} |
41 | mirror://${PNAME}/${CONSTRUCTSH} |
42 | mirror://${PNAME}/construct-magellan-fix.patch |
43 | ) |
44 | |
45 | # upstream pver is something like 6u6 |
46 | UP2PVER="${PVER:2:1}u$(echo ${PVER:6} | sed 's/0\([0-9]\)/\1/')" |
47 | UP2DATE="updatecmd https://jdk-distros.dev.java.net/developer.html | grep 'jdk-[0-9].*bin$' | sed 's/.*jdk-\(.*\)-dlj-linux.*/\1/;q'" |
48 | |
49 | src_prepare() |
50 | { |
51 | install -d ${SRCDIR} || die |
52 | cd ${SRCDIR} |
53 | cp ${SOURCEDIR}/${PNAME}/${CONSTRUCTSH} ${SRCDIR} || die |
54 | |
55 | # fix some issues with construct |
56 | mpatch construct-magellan-fix.patch || die |
57 | |
58 | install -d ${SRCDIR}/unbundle-jdk || die |
59 | cd ${SRCDIR}/unbundle-jdk |
60 | sh ${SOURCEDIR}/${PNAME}/${SRCFILE} --accept-license || die |
61 | } |
62 | |
63 | src_install() |
64 | { |
65 | cd ${SRCDIR} |
66 | |
67 | # needed directories |
68 | minstalldir /etc/env.d || die |
69 | minstalldir /opt || die |
70 | |
71 | sh ${CONSTRUCTSH} unbundle-jdk linux-jdk linux-jre || die |
72 | |
73 | # remove the sources, they are to big |
74 | rm -f ${SRCDIR}/linux-jdk/src.zip || die |
75 | |
76 | # same for the demos |
77 | rm -rf ${SRCDIR}/linux-jdk/demos || die |
78 | |
79 | # jre is provided by sun-jre |
80 | rm -rf ${SRCDIR}/linux-jdk/jre || die |
81 | |
82 | # now install this baby |
83 | mv linux-jdk ${BINDIR}/opt/sun-java-${PVER} || die |
84 | |
85 | local PLATFORM="${ARCH}" |
86 | [[ ${ARCH} = i*86 ]] && export PLATFORM="i386" |
87 | [[ ${ARCH} = x86_64 ]] && export PLATFORM="amd64" |
88 | |
89 | # installs java environment into /etc/env.d |
90 | echo "JDK_HOME=\"/opt/sun-java-${PVER}\" |
91 | JAVAC=\"/opt/sun-java-${PVER}/bin/javac\" |
92 | PATH=\"/opt/sun-java-${PVER}/bin\" |
93 | ROOTPATH=\"/opt/sun-java-${PVER}/bin\" |
94 | MANPATH=\"/opt/sun-java-${PVER}/man\"" > ${BINDIR}/etc/env.d/20java-jdk || die |
95 | } |
96 | |
97 | preinstall() |
98 | { |
99 | # force java env update |
100 | [ -f ${MROOT}/etc/env.d/20java-jdk ] && rm ${MROOT}/etc/env.d/20java-jdk |
101 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |