Issue #2423 - Java 7 Revision 40 for Linux
Former-commit-id:3b1f089cbd
[formerly3b1f089cbd
[formerly 665399b4e10d7d001edc2533b29324da48b78aa9]] Former-commit-id:26f787ac83
Former-commit-id:429c534da0
This commit is contained in:
parent
baa1ddd596
commit
9f7222a1b3
11 changed files with 6 additions and 325 deletions
|
@ -1,272 +0,0 @@
|
|||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
|
||||
%define _java_major_version 1.6
|
||||
%define _java_version %{_java_major_version}.0_43
|
||||
%define _build_arch %(uname -i)
|
||||
|
||||
#
|
||||
# AWIPS II Java 1.6 Spec File
|
||||
#
|
||||
Name: awips2-java
|
||||
Summary: AWIPS II Java Distribution
|
||||
Version: %{_java_version}
|
||||
Release: 1
|
||||
Group: AWIPSII
|
||||
BuildRoot: %{_build_root}
|
||||
BuildArch: %{_build_arch}
|
||||
URL: N/A
|
||||
License: N/A
|
||||
Distribution: N/A
|
||||
Vendor: Raytheon
|
||||
Packager: Bryan Kowal
|
||||
|
||||
AutoReq: no
|
||||
provides: awips2-java
|
||||
|
||||
%description
|
||||
AWIPS II Java Distribution - Contains Java SE Development Kit (JDK) 1.6.0_43
|
||||
plus additional libraries used by AWIPS II.
|
||||
|
||||
%prep
|
||||
# Ensure that a "buildroot" has been specified.
|
||||
if [ "%{_build_root}" = "" ]; then
|
||||
echo "ERROR: A BuildRoot has not been specified."
|
||||
echo "FATAL: Unable to Continue ... Terminating."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d %{_build_root} ]; then
|
||||
rm -rf %{_build_root}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
mkdir -p %{_build_root}/build-java
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p %{_build_root}/awips2/java
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p %{_build_root}/etc/profile.d
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
build_arch=
|
||||
arch_directory=
|
||||
# determine the architecture based on the system architecture.
|
||||
if [ "%{_build_arch}" = "x86_64" ]; then
|
||||
build_arch="amd64"
|
||||
arch_directory="x86_64"
|
||||
jdk_arch="x64"
|
||||
else
|
||||
if [ "%{_build_arch}" = "i386" ]; then
|
||||
build_arch="i586"
|
||||
arch_directory="i386"
|
||||
jdk_arch=${build_arch}
|
||||
else
|
||||
echo "ERROR: Unrecognized architecture '%{_build_arch}."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
JDK_BIN_var_javahome="jdk%{_java_version}"
|
||||
jdk_bin="jdk-6u43-linux-${jdk_arch}.bin"
|
||||
jai_bin="jai-1_1_3-lib-linux-${build_arch}-jdk.bin"
|
||||
jai_imageio_bin="jai_imageio-1_1-lib-linux-${build_arch}-jdk.bin"
|
||||
jai_bin_patch="jai.patch1"
|
||||
jai_imageio_bin_patch="jai_imageio.patch1"
|
||||
pydev_cert="pydev_certificate.cer"
|
||||
|
||||
# locate the java src.
|
||||
CORE_PROJECT_DIR="%{_baseline_workspace}/rpms/awips2.core"
|
||||
INSTALLER_JAVA="${CORE_PROJECT_DIR}/Installer.java"
|
||||
JAVA_SRC_DIR="${INSTALLER_JAVA}/%{_java_major_version}/src"
|
||||
JAVA_COMMON_DIR="${INSTALLER_JAVA}/common"
|
||||
JAVA_SCRIPTS_DIR="${JAVA_COMMON_DIR}/scripts"
|
||||
JAVA_COMMON_SRC_DIR="${JAVA_COMMON_DIR}/src/${arch_directory}"
|
||||
JAVA_ARCH_SRC_DIR="${JAVA_SRC_DIR}/${arch_directory}"
|
||||
|
||||
pushd . > /dev/null
|
||||
cd ${JAVA_ARCH_SRC_DIR}
|
||||
/bin/cp -v ${jdk_bin} %{_build_root}/build-java
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
pushd . > /dev/null
|
||||
cd ${JAVA_COMMON_SRC_DIR}
|
||||
/usr/bin/patch -i ${jai_bin_patch} \
|
||||
-o %{_build_root}/build-java/${jai_bin}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
/usr/bin/patch -i ${jai_imageio_bin_patch} \
|
||||
-o %{_build_root}/build-java/${jai_imageio_bin}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
chmod a+x %{_build_root}/build-java/*.bin
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/awips2/java
|
||||
# Used to automatically agree to software licenses.
|
||||
touch yes.txt
|
||||
echo "yes" > yes.txt
|
||||
|
||||
%{_build_root}/build-java/${jdk_bin} -noregister
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/bin/mv ${JDK_BIN_var_javahome}/* .
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
rm -rfv ${JDK_BIN_var_javahome}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
%{_build_root}/build-java/${jai_bin} < yes.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
%{_build_root}/build-java/${jai_imageio_bin} < yes.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -fv yes.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
rm -rf %{_build_root}/build-java
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
# Our profile.d scripts.
|
||||
JAVA_PROFILED_DIR="${JAVA_SCRIPTS_DIR}/profile.d"
|
||||
cp -v ${JAVA_PROFILED_DIR}/* %{_build_root}/etc/profile.d
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The pydev certificate.
|
||||
cp -v ${JAVA_COMMON_DIR}/src/${pydev_cert} \
|
||||
%{_build_root}/awips2/java/jre/lib/security
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
touch changeit.txt
|
||||
echo "changeit" > changeit.txt
|
||||
chmod 666 %{_build_root}/awips2/java/jre/lib/security/cacerts
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
%{_build_root}/awips2/java/bin/keytool -import \
|
||||
-file %{_build_root}/awips2/java/jre/lib/security/pydev_certificate.cer \
|
||||
-keystore %{_build_root}/awips2/java/jre/lib/security/cacerts \
|
||||
-noprompt < changeit.txt
|
||||
rm -fv changeit.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The licenses
|
||||
mkdir -p %{_build_root}/awips2/java/licenses
|
||||
LEGAL_DIR="%{_baseline_workspace}/rpms/legal"
|
||||
cp -v ${LEGAL_DIR}/*.txt ${LEGAL_DIR}/*.pdf \
|
||||
%{_build_root}/awips2/java/licenses
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%pre
|
||||
if [ "${1}" = "2" ]; then
|
||||
# Upgrade. Removing the existing /awips2/java/man
|
||||
# directory to prevent conflicts.
|
||||
if [ -d /awips2/java/man ]; then
|
||||
rm -rf /awips2/java/man
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: The awips2-java upgrade has FAILED."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%attr(755,root,root) /etc/profile.d/awips2Java.csh
|
||||
%attr(755,root,root) /etc/profile.d/awips2Java.sh
|
||||
%dir /awips2/java
|
||||
%dir /awips2/java/bin
|
||||
|
||||
%doc /awips2/java/COPYRIGHT
|
||||
%doc /awips2/java/COPYRIGHT-jai_imageio.txt
|
||||
%doc /awips2/java/COPYRIGHT-jai.txt
|
||||
%doc /awips2/java/DISTRIBUTIONREADME-jai_imageio.txt
|
||||
%doc /awips2/java/DISTRIBUTIONREADME-jai.txt
|
||||
%doc /awips2/java/ENTITLEMENT-jai_imageio.txt
|
||||
%doc /awips2/java/jre/README
|
||||
%doc /awips2/java/jre/THIRDPARTYLICENSEREADME.txt
|
||||
%doc /awips2/java/jre/Welcome.html
|
||||
%doc /awips2/java/jre/LICENSE
|
||||
%doc /awips2/java/LICENSE
|
||||
%doc /awips2/java/LICENSE-jai_imageio.txt
|
||||
%doc /awips2/java/LICENSE-jai.txt
|
||||
%docdir /awips2/java/licenses
|
||||
%dir /awips2/java/licenses
|
||||
/awips2/java/licenses/*
|
||||
%docdir /awips2/java/man
|
||||
%dir /awips2/java/man
|
||||
/awips2/java/man/*
|
||||
%doc /awips2/java/README.html
|
||||
%doc /awips2/java/register.html
|
||||
%doc /awips2/java/register_ja.html
|
||||
%doc /awips2/java/register_zh_CN.html
|
||||
%doc /awips2/java/THIRDPARTYLICENSEREADME-jai_imageio.txt
|
||||
%doc /awips2/java/THIRDPARTYLICENSEREADME-jai.txt
|
||||
%doc /awips2/java/THIRDPARTYLICENSEREADME.txt
|
||||
%doc /awips2/java/UNINSTALL-jai
|
||||
%doc /awips2/java/UNINSTALL-jai_imageio
|
||||
%doc /awips2/java/jre/COPYRIGHT
|
||||
|
||||
%dir /awips2/java/db
|
||||
/awips2/java/db/*
|
||||
%dir /awips2/java/include
|
||||
/awips2/java/include/*
|
||||
%dir /awips2/java/jre
|
||||
%dir /awips2/java/jre/.systemPrefs
|
||||
/awips2/java/jre/.systemPrefs/.*
|
||||
#/awips2/java/jre/.systemPrefs/.systemRootModFile
|
||||
%dir /awips2/java/jre/bin
|
||||
|
||||
/awips2/java/jre/javaws
|
||||
%dir /awips2/java/jre/lib
|
||||
|
||||
%dir /awips2/java/jre/plugin
|
||||
/awips2/java/jre/plugin/*
|
||||
%dir /awips2/java/lib
|
||||
|
||||
/awips2/java/src.zip
|
||||
|
||||
%defattr(755,awips,fxalpha,755)
|
||||
/awips2/java/bin/*
|
||||
/awips2/java/lib/*
|
||||
/awips2/java/jre/bin/*
|
||||
/awips2/java/jre/lib/*
|
|
@ -1 +0,0 @@
|
|||
fd11ae34189de6e92d48efa61338ac07de73945b
|
|
@ -1,19 +0,0 @@
|
|||
*** jdk-6u27-linux-i586.bin 2011-09-15 16:16:27.000000000 -0500
|
||||
--- jdk-6u27-linux-i586.bin.update 2011-09-15 16:19:56.000000000 -0500
|
||||
***************
|
||||
*** 61,67 ****
|
||||
return 0
|
||||
}
|
||||
|
||||
! javahome=jdk1.6.0_27
|
||||
platform=linux
|
||||
PACKED_JARS="jre/lib/rt.jar jre/lib/jsse.jar jre/lib/charsets.jar lib/tools.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar jre/lib/javaws.jar jre/lib/deploy.jar"
|
||||
ARCH=32
|
||||
--- 61,67 ----
|
||||
return 0
|
||||
}
|
||||
|
||||
! javahome=java
|
||||
platform=linux
|
||||
PACKED_JARS="jre/lib/rt.jar jre/lib/jsse.jar jre/lib/charsets.jar lib/tools.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar jre/lib/javaws.jar jre/lib/deploy.jar"
|
||||
ARCH=32
|
|
@ -1 +0,0 @@
|
|||
47f6712af338a115406a8965bc027c0e042fb8f7
|
|
@ -1,19 +0,0 @@
|
|||
*** jdk-6u17-linux-x64.bin 2011-07-05 12:02:18.000000000 -0500
|
||||
--- jdk-6u17-linux-x64.bin.new 2011-07-05 12:16:55.000000000 -0500
|
||||
***************
|
||||
*** 67,73 ****
|
||||
ARCH=64
|
||||
BINARY_NAME=jdk-6u17-fcs-bin-b04-linux-amd64-11_oct_2009.bin
|
||||
diskSpaceRequired=255193
|
||||
! more <<"EOF"
|
||||
Sun Microsystems, Inc. Binary Code License Agreement
|
||||
|
||||
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
|
||||
--- 67,73 ----
|
||||
ARCH=64
|
||||
BINARY_NAME=jdk-6u17-fcs-bin-b04-linux-amd64-11_oct_2009.bin
|
||||
diskSpaceRequired=255193
|
||||
! cat <<"EOF"
|
||||
Sun Microsystems, Inc. Binary Code License Agreement
|
||||
|
||||
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
|
|
@ -1,6 +1,7 @@
|
|||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
|
||||
%define _java_major_version 1.7
|
||||
%define _java_version %{_java_major_version}.0_21
|
||||
%define _java_revision 40
|
||||
%define _java_version %{_java_major_version}.0_%{_java_revision}
|
||||
%define _build_arch %(uname -i)
|
||||
|
||||
#
|
||||
|
@ -23,7 +24,7 @@ AutoReq: no
|
|||
provides: awips2-java
|
||||
|
||||
%description
|
||||
AWIPS II Java Distribution - Contains Java SE Development Kit (JDK) 1.7.0_21
|
||||
AWIPS II Java Distribution - Contains Java SE Development Kit (JDK) 1.7.0_40
|
||||
plus additional libraries used by AWIPS II.
|
||||
|
||||
%prep
|
||||
|
@ -73,7 +74,7 @@ else
|
|||
fi
|
||||
|
||||
JDK_BIN_var_javahome="jdk%{_java_version}"
|
||||
jdk_tar="jdk-7u21-linux-${jdk_arch}.tar.gz"
|
||||
jdk_tar="jdk-7u%{_java_revision}-linux-${jdk_arch}.tar.gz"
|
||||
jai_bin="jai-1_1_3-lib-linux-${build_arch}-jdk.bin"
|
||||
jai_imageio_bin="jai_imageio-1_1-lib-linux-${build_arch}-jdk.bin"
|
||||
jai_bin_patch="jai.patch1"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
477152cd94fb4504db57eb5fbc368d89e0b937b5
|
|
@ -0,0 +1 @@
|
|||
2961b357f749183351efc8e7d25182a518dddb38
|
|
@ -1 +0,0 @@
|
|||
c05e925e3c2e541e5ebf596d165d56a979d511a9
|
|
@ -0,0 +1 @@
|
|||
39ec774ef9d87d849337cb5acbafe2d00f1e87b8
|
|
@ -28,14 +28,6 @@ function buildRPM()
|
|||
fi
|
||||
}
|
||||
|
||||
# build java 1.6
|
||||
SPECS=1.6/component.spec
|
||||
buildRPM ${SPECS}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
|
||||
# build java 1.7
|
||||
SPECS=1.7/component.spec
|
||||
buildRPM ${SPECS}
|
||||
|
|
Loading…
Add table
Reference in a new issue