sun-java7: fix x86_64 mozilla plugin symlinks; integrate download code in version (7u67_b01)

This commit is contained in:
Silvan Calarco 2014-10-11 12:52:48 +02:00
parent a12fa36414
commit 01e4a4b94b
3 changed files with 31 additions and 26 deletions

View File

@ -1,7 +1,8 @@
%define JRE_NSVER 7
%define MAJOR %(echo %version | cut -du -f1)
%define MINOR %(echo %version | cut -du -f2)
%define pkgver %(echo %version | tr _ -)
%define realver %(echo %version | cut -d_ -f1)
%define MAJOR %(echo %realver | cut -du -f1)
%define MINOR %(echo %realver | cut -du -f2)
%define major 1.%{MAJOR}
%define minor 0
%define origin sun
@ -9,7 +10,7 @@
%define jppname java-%{javaver}-%{origin}
%define javaws_ver %{javaver}
%define toplevel_dir jdk%{javaver}_%{MINOR}
%define distversion %{version}
%define distversion %{realver}
%define label -%{name}
%define jdklnk jdk7-%{origin}
%define jrelnk jre7-%{origin}
@ -32,14 +33,9 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.oracle.com/technetwork/java/javase/overview/index.html
Source: LICENSE
#Source0: http://download.oracle.com/otn-pub/java/jdk/7u6-b24/jdk-%{version}-linux-i586.tar.gz
#Source1: http://download.oracle.com/otn-pub/java/jdk/7u6-b24/jdk-%{version}-linux-x64.tar.gz
#Source2: http://download.oracle.com/otn-pub/java/jdk/7u6-b24/jdk-%{version}-linux-arm-sfp.tar.gz
#Source3: sun-java7-jdk-profile
#Source4: sun-java7-jre-profile
BuildRequires: jpackage-utils
Provides: jdk = %{version}
Provides: jdk2 = %{version}
Provides: jdk = %{realver}
Provides: jdk2 = %{realver}
License: Oracle Binary Code License
Requires: shared-mime-info
Requires: desktop-file-utils
@ -54,8 +50,8 @@ Sun Java Developer's Kit.
Summary: Sun Java Platform Runtime Environment
Group: System/Libraries/Java
#Obsoletes: j2re
Provides: j2re = %{version}
Provides: jre = %{version}
Provides: j2re = %{realver}
Provides: jre = %{realver}
%description runtime
Sun Java Platform Runtime Environment.
@ -69,20 +65,20 @@ Sun Java Platform Runtime Environment.
%ifarch %{ix86}
wget -nv --tries=2 --no-cookies --header \
"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/%{version}-b13/jdk-%{version}-linux-i586.tar.gz
tar xf jdk-%{version}-linux-i586.tar.gz
http://download.oracle.com/otn-pub/java/jdk/%{pkgver}/jdk-%{realver}-linux-i586.tar.gz
tar xf jdk-%{realver}-linux-i586.tar.gz
%endif
%ifarch x86_64
wget -nv --tries=2 --no-cookies --header \
"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/%{version}-b13/jdk-%{version}-linux-x64.tar.gz
tar xf jdk-%{version}-linux-x64.tar.gz
http://download.oracle.com/otn-pub/java/jdk/%{pkgver}/jdk-%{realver}-linux-x64.tar.gz
tar xf jdk-%{realver}-linux-x64.tar.gz
%endif
%ifarch arm
wget -nv --tries=2 --no-cookies --header \
"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/%{version}-b13/jdk-%{version}-linux-arm-vfp-sflt.tar.gz
tar xf jdk-%{version}-linux-arm-sfp.tar.gz
http://download.oracle.com/otn-pub/java/jdk/%{pkgver}/jdk-%{realver}-linux-arm-vfp-sflt.tar.gz
tar xf jdk-%{realver}-linux-arm-sfp.tar.gz
%endif
cd %{toplevel_dir}
@ -126,8 +122,8 @@ pushd %{buildroot}%{jvmjardir}
ln -s %{_jvmdir}/%{jredir}/lib/rt.jar sasl-%{javaver}.jar
# ln -s %{_jvmdir}/%{jredir}/lib/rt.jar xml-commons-apis.jar
for jar in *-%{javaver}.jar ; do
#if [ %{version} != %{javaver} ]; then
#ln -fs ${jar} $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
#if [ %{realver} != %{javaver} ]; then
#ln -fs ${jar} $(echo $jar | sed "s|-%{realver}.jar|-%{javaver}.jar|g")
#fi
ln -fs ${jar} $(echo $jar | sed "s|-%{javaver}.jar|.jar|g")
done
@ -148,9 +144,9 @@ mkdir -p %{buildroot}%{_datadir}/icons/mini
install -m 644 jre/plugin/desktop/%{origin}_java.png \
%{buildroot}%{_datadir}/pixmaps/%{name}.png
ln -s %{_datadir}/pixmaps/%{name}.png %{buildroot}%{_datadir}/icons/mini/%{name}.png
install -d %{buildroot}%{_libdir}/mozilla/plugins
pushd %{buildroot}%{_jvmdir}/%{jredir}
%endif
%ifarch %{ix86}
ln -s %{_jvmdir}/%{jredir}/plugin/i386/ns%{JRE_NSVER}/libjavaplugin_oji.so \
%{buildroot}%{_libdir}/mozilla/plugins/libjava7plugin_oji.so
ln -s %{_jvmdir}/%{jredir}/plugin/i386/ns%{JRE_NSVER}/libjavaplugin_oji.so \
@ -161,7 +157,12 @@ ln -s %{_jvmdir}/%{jredir}/lib/i386/libjavaplugin_nscp.so \
%{buildroot}%{_libdir}/mozilla/plugins/libjava7plugin_nscp.so
ln -s %{_jvmdir}/%{jredir}/lib/i386/libnpjp2.so \
%{buildroot}%{_libdir}/mozilla/plugins/libnpjp2-7.so
popd
%endif
%ifarch x86_64
ln -s %{_jvmdir}/%{jredir}/lib/amd64/libjavaplugin_jni.so \
%{buildroot}%{_libdir}/mozilla/plugins/libjava7plugin_jni.so
ln -s %{_jvmdir}/%{jredir}/lib/amd64/libnpjp2.so \
%{buildroot}%{_libdir}/mozilla/plugins/libnpjp2-7.so
%endif
install -d -m 755 %{buildroot}%{_jvmprivdir}/%{name}/jce/vanilla
@ -600,6 +601,10 @@ fi
# %{toplevel_dir}/jre/README %{toplevel_dir}/jre/Welcome.html
%changelog
* Sat Oct 11 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 7u67_b01-1mamba
- fix x86_64 mozulla plugin symlinks
- support for pkg download code (b01) in version
* Fri Mar 26 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 7u51-2mamba
- update wget download string (see https://ivan-site.com/2012/05/download-oracle-java-jre-jdk-using-a-script/)
- dont' install fxavcodecplugin-52.so to remove dependencies on old libav library; fxavcodecplugin-53.so is provided requiring ffmpeg0

View File

@ -14,7 +14,7 @@ SRPMRELEASE["skype"]=2mamba
SRPMVERSION["spotify"]=20140117
SRPMRELEASE["spotify"]=1mamba
# sun-java7
SRPMVERSION["sun-java7"]=7u67
SRPMVERSION["sun-java7"]=7u67_b01
SRPMRELEASE["sun-java7"]=1mamba
# virtualbox-extension-pack
SRPMVERSION["virtualbox-extension-pack"]=4.3.16

View File

@ -1,2 +1,2 @@
SRPMVERSION["sun-java7"]=7u60
SRPMVERSION["sun-java7"]=7u60_b19
SRPMRELEASE["sun-java7"]=1mamba