|
@@ -23,13 +23,22 @@
|
|
|
##
|
|
##
|
|
|
|
|
|
|
|
# package versions
|
|
# package versions
|
|
|
-%define V_sunjava 1_4_1_01
|
|
|
|
|
-%define V_filesys 1.4.1_01
|
|
|
|
|
-%define V_openpkg 1.4.1.01
|
|
|
|
|
|
|
+%define V_openpkg 1.3.1
|
|
|
|
|
+%define V_sol_dist 1_3_1_06
|
|
|
|
|
+%define V_sol_fsys 1.3.1_06
|
|
|
|
|
+%define V_lnx_dist 1_3_1_06
|
|
|
|
|
+%define V_lnx_fsys 1.3.1_06
|
|
|
|
|
+%define V_bsd_dist 1.3.1p7_1
|
|
|
|
|
+%define V_bsd_fsys 1.3.1
|
|
|
|
|
+
|
|
|
|
|
+# package options
|
|
|
|
|
+%ifndef with_native
|
|
|
|
|
+%define with_native yes
|
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
# package information
|
|
# package information
|
|
|
Name: j2se
|
|
Name: j2se
|
|
|
-Summary: Java 2 Platform, Standard Edition (J2SE)
|
|
|
|
|
|
|
+Summary: Java 2 Platform, Standard Edition (J2SE) 1.3
|
|
|
URL: http://java.sun.com/j2se/
|
|
URL: http://java.sun.com/j2se/
|
|
|
Vendor: Sun Microsystems, Inc.
|
|
Vendor: Sun Microsystems, Inc.
|
|
|
Packager: The OpenPKG Project
|
|
Packager: The OpenPKG Project
|
|
@@ -37,13 +46,14 @@ Distribution: OpenPKG [PRIV]
|
|
|
Group: Language
|
|
Group: Language
|
|
|
License: Commercial
|
|
License: Commercial
|
|
|
Version: %{V_openpkg}
|
|
Version: %{V_openpkg}
|
|
|
-Release: 20021105
|
|
|
|
|
|
|
+Release: 20021110
|
|
|
|
|
|
|
|
# list of sources
|
|
# list of sources
|
|
|
-Source0: j2sdk-%{V_sunjava}-linux-i586.bin
|
|
|
|
|
-Source1: j2sdk-%{V_sunjava}-solaris-sparc.sh
|
|
|
|
|
-Source2: j2sdk-%{V_sunjava}-solaris-sparcv9.sh
|
|
|
|
|
-Source3: rc.j2se
|
|
|
|
|
|
|
+Source0: j2sdk-%{V_sol_dist}-solaris-sparc.sh
|
|
|
|
|
+Source1: j2sdk-%{V_lnx_dist}-linux-i586.bin
|
|
|
|
|
+Source2: j2sdk-%{V_bsd_dist}-freebsd-ix86.tar.bz2
|
|
|
|
|
+Source3: rc.%{name}
|
|
|
|
|
+Source4: %{name}.patch
|
|
|
|
|
|
|
|
# build information
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
Prefix: %{l_prefix}
|
|
@@ -52,122 +62,90 @@ BuildPreReq: OpenPKG, openpkg >= 20020714
|
|
|
PreReq: OpenPKG, openpkg >= 20020714
|
|
PreReq: OpenPKG, openpkg >= 20020714
|
|
|
AutoReq: no
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
AutoReqProv: no
|
|
|
-Provides: JRE
|
|
|
|
|
|
|
+Provides: JDK, JRE
|
|
|
|
|
|
|
|
%description
|
|
%description
|
|
|
- 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.
|
|
|
|
|
|
|
+ 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
|
|
%prep
|
|
|
- %setup -q -c j2se -T
|
|
|
|
|
|
|
+ %setup -q -c %{name} -T
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
|
|
|
+ # no-op
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
- # select vendor source
|
|
|
|
|
- pkgfile=""
|
|
|
|
|
- suppfile=""
|
|
|
|
|
- pkgdir=%{V_filesys}
|
|
|
|
|
- case "%{l_target}" in
|
|
|
|
|
- ix86-linux2.[2-5]* | ix86-freebsd4* )
|
|
|
|
|
- pkgfile="j2sdk-%{V_sunjava}-linux-i586.bin"
|
|
|
|
|
- pkgdir="j2sdk%{V_filesys}"
|
|
|
|
|
- ;;
|
|
|
|
|
- sparc64-solaris2.[6-9]*)
|
|
|
|
|
- pkgfile="j2sdk-%{V_sunjava}-solaris-sparc.sh"
|
|
|
|
|
- suppfile="j2sdk-%{V_sunjava}-solaris-sparcv9.sh"
|
|
|
|
|
- pkgdir="j2sdk%{V_filesys}"
|
|
|
|
|
- ;;
|
|
|
|
|
- esac
|
|
|
|
|
- if [ ".$pkgfile" = . ]; then
|
|
|
|
|
- echo "Sorry, unsupported architecture '%{l_target}'" 1>&2
|
|
|
|
|
- exit 1
|
|
|
|
|
- fi
|
|
|
|
|
-
|
|
|
|
|
# create installation tree
|
|
# create installation tree
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec \
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
|
|
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/j2se/doc
|
|
|
|
|
-
|
|
|
|
|
- # unpack vendor distribution
|
|
|
|
|
- ( umask 022
|
|
|
|
|
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec
|
|
|
|
|
- case "%{l_target}" in
|
|
|
|
|
- ix86-linux2.[2-5]* | ix86-freebsd4* )
|
|
|
|
|
- echo "yes" | sh $RPM_SOURCE_DIR/$pkgfile \
|
|
|
|
|
- >$RPM_BUILD_ROOT%{l_prefix}/share/j2se/doc/COPYING.32
|
|
|
|
|
- ;;
|
|
|
|
|
- sparc64-solaris2.[6-9]*)
|
|
|
|
|
- echo "yes" | sh $RPM_SOURCE_DIR/$pkgfile \
|
|
|
|
|
- >$RPM_BUILD_ROOT%{l_prefix}/share/j2se/doc/COPYING.32
|
|
|
|
|
- echo "yes" | sh $RPM_SOURCE_DIR/$suppfile \
|
|
|
|
|
- >$RPM_BUILD_ROOT%{l_prefix}/share/j2se/doc/COPYING.64
|
|
|
|
|
- ;;
|
|
|
|
|
- esac
|
|
|
|
|
- mv $pkgdir j2se
|
|
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/man/man1
|
|
|
|
|
+
|
|
|
|
|
+ # unpack source distribution
|
|
|
|
|
+ ( umask 022
|
|
|
|
|
+ cd $RPM_BUILD_ROOT%{l_prefix}/libexec
|
|
|
|
|
+ case "%{l_target}" in
|
|
|
|
|
+ ix86-freebsd4* )
|
|
|
|
|
+%if "%{with_native}" == "yes"
|
|
|
|
|
+ %{l_bzip2} -d -c %{SOURCE j2sdk-%{V_bsd_dist}-freebsd-ix86.tar.bz2} |\
|
|
|
|
|
+ %{l_tar} xf -
|
|
|
|
|
+ mv j2sdk-%{V_bsd_fsys} %{name}
|
|
|
|
|
+%else
|
|
|
|
|
+ echo "yes" | sh %{SOURCE j2sdk-%{V_lnx_dist}-linux-i586.bin} >/dev/null
|
|
|
|
|
+ mv jdk%{V_lnx_fsys} %{name}
|
|
|
|
|
+ find %{name}/bin -type f -print | xargs chmod u+w
|
|
|
|
|
+ ( cd %{name}; %{l_patch} -p0 <%{SOURCE %{name}.patch} )
|
|
|
|
|
+ brandelf -t Linux \
|
|
|
|
|
+ `find %{name}/bin/ -type f -print` \
|
|
|
|
|
+ >/dev/null 2>&1 || true
|
|
|
|
|
+%endif
|
|
|
|
|
+ ;;
|
|
|
|
|
+ ix86-linux2.[2-6]* )
|
|
|
|
|
+ echo "yes" | sh $RPM_SOURCE_DIR/j2sdk-%{V_lnx_dist}-linux-i586.bin >/dev/null
|
|
|
|
|
+ mv jdk%{V_lnx_fsys} %{name}
|
|
|
|
|
+ ;;
|
|
|
|
|
+ sparc64-solaris2.[6-9]* )
|
|
|
|
|
+ echo "yes" | sh $RPM_SOURCE_DIR/j2sdk-%{V_sol_dist}-solaris-sparc.sh >/dev/null
|
|
|
|
|
+ mv j2sdk%{V_sol_fsys} %{name}
|
|
|
|
|
+ ;;
|
|
|
|
|
+ * )
|
|
|
|
|
+ echo "Sorry, unsupported architecture '%{l_target}'" 1>&2
|
|
|
|
|
+ exit 1
|
|
|
|
|
+ ;;
|
|
|
|
|
+ esac
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- # fix vendor distribution
|
|
|
|
|
- ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/bin
|
|
|
|
|
- find . -type f -print | xargs chmod u+w
|
|
|
|
|
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/jre/bin
|
|
|
|
|
- find . -type f -print | xargs chmod u+w
|
|
|
|
|
- case "%{l_target}" in
|
|
|
|
|
- sparc64-solaris2.[6-9]*)
|
|
|
|
|
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/bin/sparcv9
|
|
|
|
|
- find . -type f -print | xargs chmod u+w
|
|
|
|
|
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/jre/bin/sparcv9
|
|
|
|
|
- find . -type f -print | xargs chmod u+w
|
|
|
|
|
- ;;
|
|
|
|
|
- esac
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ # post-adjustments to installation area
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/%{name}/demo 2>/dev/null || true
|
|
|
|
|
+ cp $RPM_BUILD_ROOT%{l_prefix}/libexec/%{name}/man/man1/* \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/man/man1/
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/%{name}/man 2>/dev/null || true
|
|
|
|
|
|
|
|
- # optionally brand ELF binaries (FreeBSD only)
|
|
|
|
|
- case "%{l_target}" in
|
|
|
|
|
- ix86-freebsd4* )
|
|
|
|
|
- brandelf -t Linux \
|
|
|
|
|
- `find $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/bin/ -type f -print` \
|
|
|
|
|
- >/dev/null 2>&1 || true
|
|
|
|
|
- brandelf -t Linux \
|
|
|
|
|
- `find $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/jre/bin/ -type f -print` \
|
|
|
|
|
- >/dev/null 2>&1 || true
|
|
|
|
|
- ;;
|
|
|
|
|
- esac
|
|
|
|
|
-
|
|
|
|
|
- # clean out installation area
|
|
|
|
|
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/demo 2>/dev/null || true
|
|
|
|
|
-
|
|
|
|
|
- # reduce man pages to essential ones and move them to final location
|
|
|
|
|
- if [ -d $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man/man1 ]; then
|
|
|
|
|
- cp $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man/man1/* \
|
|
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man1
|
|
|
|
|
- elif [ -d $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man/sman1 ]; then
|
|
|
|
|
- cp $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man/sman1/* \
|
|
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man1
|
|
|
|
|
- fi
|
|
|
|
|
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se/man 2>/dev/null || true
|
|
|
|
|
-
|
|
|
|
|
- # link developer binaries
|
|
|
|
|
|
|
+ # activate binaries
|
|
|
( cd $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
( cd $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
- for bin in appletviewer extcheck idlj jar jarsigner java \
|
|
|
|
|
- java-rmi.cgi javac javadoc javah javap jdb keytool native2ascii \
|
|
|
|
|
- orbd policytool rmic rmid rmiregistry serialver servertool \
|
|
|
|
|
- tnameserv; do
|
|
|
|
|
- ln -s ../libexec/j2se/bin/$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/%{name}/bin/$bin .
|
|
|
done
|
|
done
|
|
|
|
|
+ ( echo "#!/bin/sh"
|
|
|
|
|
+ echo "exec %{l_prefix}/libexec/%{name}/bin/realpath \${1+\"\$@\"}"
|
|
|
|
|
+ ) >realpath
|
|
|
|
|
+ chmod 755 realpath
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
# install run-command script
|
|
# install run-command script
|
|
|
%{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
|
|
%{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- %{SOURCE rc.j2se} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
|
+ %{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|