You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
155 lines
5.4 KiB
155 lines
5.4 KiB
## |
|
## j2se.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/> |
|
## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com> |
|
## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package versions |
|
%define V_openpkg 1.3.1 |
|
%define V_sol_dist 1_3_1_08 |
|
%define V_sol_fsys 1_3_1_08 |
|
%define V_lnx_dist 1_3_1_08 |
|
%define V_lnx_fsys 1.3.1_08 |
|
%define V_bsd_dist 1.3.1p8_2 |
|
%define V_bsd_fsys 1.3.1 |
|
|
|
# package information |
|
Name: j2se |
|
Summary: Java 2 Platform, Standard Edition (J2SE) 1.3 |
|
URL: http://java.sun.com/j2se/ |
|
Vendor: Sun Microsystems, Inc. |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG [EVAL] |
|
Group: Language |
|
License: Commercial |
|
Version: %{V_openpkg} |
|
Release: 20031117 |
|
|
|
# package options |
|
%option with_native yes |
|
|
|
# list of sources |
|
Source0: http://java.sun.com/j2se/::/j2sdk-%{V_sol_dist}-solaris-sparc.sh |
|
Source1: http://java.sun.com/j2se/::/j2sdk-%{V_lnx_dist}-linux-i586.bin |
|
Source2: http://java.sun.com/j2se/::/jdk-%{V_bsd_dist}.tgz |
|
Source3: rc.j2se |
|
Source4: j2se.patch |
|
%NoSource 0 |
|
%NoSource 1 |
|
%NoSource 2 |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20031117 |
|
PreReq: OpenPKG, openpkg >= 20031117 |
|
AutoReq: no |
|
AutoReqProv: no |
|
Provides: JDK, JRE |
|
Conflicts: j2se14 |
|
|
|
%description |
|
This is the Sun Java 2 Platform, Standard Edition (J2SE) 1.3. |
|
It contains the Java Development Kit (JDK) and the Java Runtime |
|
Environment (JRE). The premier solution for rapidly developing |
|
and deploying mission-critical, enterprise applications, J2SE |
|
provides the essential compiler, tools, runtimes, and APIs for |
|
writing, deploying, and running applets and applications in the |
|
Java programming language. |
|
|
|
%prep |
|
%setup -q -c j2se -T |
|
|
|
%build |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
# create installation tree |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec \ |
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1 |
|
|
|
# unpack source distribution |
|
( umask 022 |
|
cd $RPM_BUILD_ROOT%{l_prefix}/libexec |
|
case "%{l_platform -t}" in |
|
i?86-freebsd[45]* ) |
|
%if "%{with_native}" == "yes" |
|
%{l_gzip} -d -c %{SOURCE jdk-%{V_bsd_dist}.tgz} | %{l_tar} xf - |
|
mv jdk%{V_bsd_fsys} j2se |
|
rm -f +[A-Z]* |
|
%else |
|
echo "yes" | sh %{SOURCE j2sdk-%{V_lnx_dist}-linux-i586.bin} >/dev/null |
|
mv jdk%{V_lnx_fsys} j2se |
|
find j2se/bin -type f -print | xargs chmod u+w |
|
( cd j2se; %{l_patch} -p0 <%{SOURCE j2se.patch} ) || exit $? |
|
brandelf -t Linux \ |
|
`find j2se/bin/ -type f -print` \ |
|
>/dev/null 2>&1 || true |
|
%endif |
|
;; |
|
i?86-linux2.[2-6]* ) |
|
echo "yes" | sh $RPM_SOURCE_DIR/j2sdk-%{V_lnx_dist}-linux-i586.bin >/dev/null |
|
mv jdk%{V_lnx_fsys} j2se |
|
;; |
|
sun4u-sunos5.[6-9]* ) |
|
echo "yes" | sh $RPM_SOURCE_DIR/j2sdk-%{V_sol_dist}-solaris-sparc.sh >/dev/null |
|
mv j2sdk%{V_sol_fsys} j2se |
|
;; |
|
* ) |
|
echo "Sorry, unsupported architecture '%{l_platform -t}'" |\ |
|
%{l_rpmtool} msg -b -t error 1>&2 |
|
exit 1 |
|
;; |
|
esac |
|
) || exit $? |
|
|
|
# post-adjustments to installation area |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/demo 2>/dev/null || true |
|
cp $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man/man1/* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/ |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man 2>/dev/null || true |
|
|
|
# activate binaries |
|
( cd $RPM_BUILD_ROOT%{l_prefix}/bin |
|
for bin in appletviewer awt_robot extcheck idlj jar jarsigner java \ |
|
javac javadoc javah javap jdb keytool native2ascii \ |
|
oldjava oldjavac oldjdb policytool rmic rmid rmiregistry \ |
|
serialver tnameserv; do |
|
ln -s ../libexec/j2se/bin/$bin . |
|
done |
|
) || exit $? |
|
|
|
# install run-command script |
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
%{SOURCE rc.j2se} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|