Magellan Linux

Contents of /trunk/extras/sun-jdk5/sun-jdk5-1.5.0.15-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (16 years ago) by niro
File size: 2583 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/sun-jdk/sun-jdk-1.6.0.05-r1.smage2,v 1.1 2008/04/09 19:41:05 niro Exp $
2
3 PNAME="sun-jdk5"
4 PVER="1.5.0.15"
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/5/"
12
13 DEPEND="== dev-java/sun-jre5-${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:3}u${PVER##*.}-dlj-linux-i586.bin"
22 SRCFILE_x86_64="jdk-${PVER:2:3}u${PVER##*.}-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 SRC_URI=(
34 http://dlc.sun.com/dlj/binaries/${SRCFILE_x86}
35 http://dlc.sun.com/dlj/binaries/${SRCFILE_x86_64}
36 http://download.java.net/dlj/binaries/${SRCFILE_x86}
37 http://download.java.net/dlj/binaries/${SRCFILE_x86_64}
38 mirror://sun-jdk/${SRCFILE_x86}
39 mirror://sun-jdk/${SRCFILE_x86_64}
40 mirror://sun-jdk/${CONSTRUCTSH}
41 mirror://sun-jdk/construct-magellan-fix.patch
42 )
43
44 src_prepare()
45 {
46 install -d ${SRCDIR} || die
47 cd ${SRCDIR}
48 cp ${SOURCEDIR}/${PNAME}/${CONSTRUCTSH} ${SRCDIR} || die
49
50 # fix some issues with construct
51 mpatch construct-magellan-fix.patch || die
52
53 install -d ${SRCDIR}/unbundle-jdk || die
54 cd ${SRCDIR}/unbundle-jdk
55 sh ${SOURCEDIR}/${PNAME}/${SRCFILE} --accept-license || die
56 }
57
58 src_install()
59 {
60 cd ${SRCDIR}
61
62 # needed directories
63 minstalldir /etc/env.d || die
64 minstalldir /opt || die
65
66 sh ${CONSTRUCTSH} unbundle-jdk linux-jdk linux-jre || die
67
68 # remove the sources, they are to big
69 rm -f ${SRCDIR}/linux-jdk/src.zip || die
70
71 # same for the demos
72 rm -rf ${SRCDIR}/linux-jdk/demos || die
73
74 # jre is provided by sun-jre
75 rm -rf ${SRCDIR}/linux-jdk/jre || die
76
77 # now install this baby
78 mv linux-jdk ${BINDIR}/opt/sun-java-${PVER} || die
79
80 local PLATFORM="${ARCH}"
81 [[ ${ARCH} = i*86 ]] && export PLATFORM="i386"
82 [[ ${ARCH} = x86_64 ]] && export PLATFORM="amd64"
83
84 # installs java environment into /etc/env.d
85 echo "JDK_HOME=\"/opt/sun-java-${PVER}\"
86 JAVAC=\"/opt/sun-java-${PVER}/bin/javac\"
87 PATH=\"/opt/sun-java-${PVER}/bin\"
88 ROOTPATH=\"/opt/sun-java-${PVER}/bin\"
89 MANPATH=\"/opt/sun-java-${PVER}/man\"" > ${BINDIR}/etc/env.d/20java-jdk || die
90 }
91
92 preinstall()
93 {
94 # force java env update
95 [ -f ${MROOT}/etc/env.d/20java-jdk ] && rm ${MROOT}/etc/env.d/20java-jdk
96 }

Properties

Name Value
svn:keywords Id