From b9b8b590ccbe9abbe22c2a2b3e76911d632e1f43 Mon Sep 17 00:00:00 2001 From: pcpa Date: Mon, 13 Feb 2012 19:47:35 +0000 Subject: [PATCH] - Update to pre 1.1.5 icedtea-web package that works with java-1.7.0-openjdk. SILENT: Actually, 1.1.4 did work with chromium-browser, but required some SILENT: patches, but only using icedtea-web tip plus a patch makes it work SILENT: correctly in my test cases with firefox 10 and chromium-browser. SILENT: svn-revision: 773885 --- icedtea-web.spec | 142 ++++++++++++++++++++++++++++++----------------- 1 file changed, 90 insertions(+), 52 deletions(-) diff --git a/icedtea-web.spec b/icedtea-web.spec index 76f67ef..ab20d29 100644 --- a/icedtea-web.spec +++ b/icedtea-web.spec @@ -1,16 +1,15 @@ -%if %mandriva_branch == Cooker -%define release %mkrel 2 +# actually, plugin should advertise itself as 1.2pre +%define custom .1 +%define snapshot 89eb20442421 + +%ifarch %{ix86} x86_64 + %define javaver 1.7.0 + %define priority 17000 %else -%define subrel 1 -%define release %mkrel 0 + %define javaver 1.6.0 + %define priority 16000 %endif -# Version of java -%define javaver 1.6.0 - -# Alternatives priority -%define priority 16000 - %ifarch %{ix86} %define archinstall i386 %endif @@ -28,27 +27,37 @@ %define javaplugin libjavaplugin.so %endif +%define binsuffix .itweb + Name: icedtea-web -Version: 1.0.6 -Release: %{release} +Version: 1.1.4%{custom} +Release: 1 Summary: Additional Java components for OpenJDK Group: Networking/WWW License: LGPLv2+ and GPLv2 with exceptions URL: http://icedtea.classpath.org/wiki/IcedTea-Web +%if !%{defined snapshot} Source0: http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz +%else +# http://icedtea.classpath.org/hg/icedtea-web/archive/%{snapshot}.tar.gz +Source0: icedtea-web-%{snapshot}.tar.gz +%endif BuildRequires: desktop-file-utils BuildRequires: glib2-devel BuildRequires: gtk2-devel -# Need java-1.6.0-openjdk with IcedTea6 1.10 or newer -BuildRequires: java-1.6.0-openjdk-devel >= 1.6.0.0-18.b22 +%ifarch %{ix86} x86_64 +BuildRequires: java-%{javaver}-openjdk-devel +%else +BuildRequires: java-%{javaver}-openjdk-devel >= 1.6.0.0-18.b22 +%endif BuildRequires: xulrunner-devel BuildRequires: zip BuildRequires: zlib-devel -Requires: java-1.6.0-openjdk +Requires: java-%{javaver}-openjdk Requires(post): update-alternatives Requires(postun): update-alternatives @@ -58,7 +67,14 @@ Provides: java-plugin = %{javaver} Provides: java-1.6.0-openjdk-plugin = 1.6.0.0-18.b22 Obsoletes: java-1.6.0-openjdk-plugin +# IcedTea is only built on these archs for now +ExclusiveArch: x86_64 i586 + Patch0: icedtea-web-1.0.2-mutex_and_leak.patch +# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=866 +# http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-February/017132.html +# http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-February/017134.html +Patch1: icedtea-web-1.1-single-thread-JSRuntime.patch %description The IcedTea-Web project provides a Java web browser plugin, an implementation @@ -78,67 +94,89 @@ BuildArch: noarch This package contains Javadocs for the IcedTea-Web project. %prep -%setup -q -%patch0 -p1 +%if %{defined snapshot} + %setup -q -n %{name}-%{snapshot} +%else + %setup -q +%endif -%if %mdkversion < 201000 -# ugly hack to make it work on 2009.0/mes5 (pcpa) -perl -pi -e 's|AC_CANONICAL_HOST||;' configure.* -autoreconf -fi +%patch0 -p1 +%patch1 -p1 + +%if !%{defined snapshot} + %if %mdkversion < 201000 + # ugly hack to make it work on 2009.0/mes5 (pcpa) + perl -pi -e 's|AC_CANONICAL_HOST||;' configure.* + autoreconf -fi + %endif +%else + sh autogen.sh %endif %build %configure2_5x \ --with-pkgversion=mandriva-%{release}-%{_arch} \ --docdir=%{_javadocdir}/%{name} \ - --prefix=%{jredir}/ + --with-jdk-home=%{javadir} \ + --with-jre-home=%{jredir} \ + --libdir=%{_libdir} \ + --program-suffix=%{binsuffix} \ + --prefix=%{_prefix} make CXXFLAGS="%{optflags}" %install %makeinstall_std - -# FIXME -rm -f %{buildroot}%{_prefix}/bin - -# Remove pluginappletviewer ... it is unused and will be removed in 1.1 -rm -f %{buildroot}%{jredir}/bin/pluginappletviewer +# Move javaws man page to a more specific name +mv %{buildroot}/%{_mandir}/man1/javaws.1 %{buildroot}/%{_mandir}/man1/javaws-itweb.1 # Install desktop files. install -d -m 755 %{buildroot}%{_datadir}/{applications,pixmaps} cp javaws.png %{buildroot}%{_datadir}/pixmaps -desktop-file-install --vendor '' \ - --dir %{buildroot}%{_datadir}/applications javaws.desktop -desktop-file-install --vendor '' \ - --dir %{buildroot}%{_datadir}/applications itweb-settings.desktop +desktop-file-install --vendor ''\ + --dir %{buildroot}%{_datadir}/applications javaws.desktop +desktop-file-install --vendor ''\ + --dir %{buildroot}%{_datadir}/applications itweb-settings.desktop + +%post +if [ $1 -gt 1 ] +then +update-alternatives --remove %{javaplugin} \ + %{jre6dir}/lib/%{archinstall}/IcedTeaPlugin.so 2>/dev/null || : +fi %posttrans -update-alternatives --remove %{javaplugin} \ - %{javadir}/jre/lib/%{archinstall}/gcjwebplugin.so 2>/dev/null -update-alternatives --remove %{javaplugin} \ - %{jredir}/lib/%{archinstall}/IcedTeaNPPlugin.so 2>/dev/null -update-alternatives \ - --install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} \ - %{jredir}/lib/%{archinstall}/IcedTeaPlugin.so %{priority} \ - --slave %{_bindir}/javaws javaws %{jredir}/bin/javaws \ - --slave %{_mandir}/man1/javaws.1 javaws.1 \ - %{jredir}/man/man1/javaws.1 +update-desktop-database &> /dev/null || : +update-alternatives \ + --install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} \ + %{_libdir}/IcedTeaPlugin.so %{priority} \ + --slave %{_bindir}/javaws javaws %{_prefix}/bin/javaws%{binsuffix} \ + --slave %{_mandir}/man1/javaws.1.gz javaws.1.gz \ + %{_mandir}/man1/javaws-itweb.1.gz + exit 0 %postun -if [ $1 -eq 0 ]; then - alternatives --remove %{javaplugin} \ - %{jredir}/lib/%{archinstall}/IcedTeaPlugin.so +update-desktop-database &> /dev/null || : +if [ $1 -eq 0 ] +then + update-alternatives --remove %{javaplugin} \ + %{_libdir}/IcedTeaPlugin.so fi + exit 0 %files %defattr(-,root,root,-) -%{jredir}/bin/* -%{jredir}/lib/* -%{jredir}/man/man1/* -%{_datadir}/pixmaps/javaws.png -%{_datadir}/applications/javaws.desktop -%{_datadir}/applications/itweb-settings.desktop -%doc %{_javadocdir}/%{name} +%{_prefix}/bin/* +%{_libdir}/IcedTeaPlugin.so +%{_datadir}/applications/* +%{_datadir}/icedtea-web +%{_datadir}/man/man1/* +%{_datadir}/pixmaps/* %doc NEWS README COPYING + +%files javadoc +%defattr(-,root,root,-) +%{_datadir}/javadoc/%{name} +%doc COPYING