# NOTE: this is a Linux-specific package, don't use the embedded # viewer on non-Linux platforms. %define name nspluginwrapper %define version 1.2.2 #define svndate 20061227 %define rel 1 %define release %mkrel %{?svndate:0.%{svndate}.}%{rel} %define _provides_exceptions xpcom # list of plugins to be wrapped by default ex: libflashplayer,nppdf %define nspw_plugins flashplayer,nppdf,rpnp,nphelix # define 32-bit arch of multiarch platforms %define arch_32 %{nil} %ifarch x86_64 %define arch_32 i386 %endif %ifarch ppc64 %define arch_32 ppc %endif %ifarch sparc64 %define arch_32 sparc %endif # define to build a biarch package %define build_biarch 0 %if "%{_arch}:%{arch_32}" == "x86_64:i386" %define build_biarch 1 %endif %if "%{_arch}:%{arch_32}" == "ppc64:ppc" %define build_biarch 1 %endif %{expand: %{?_with_biarch: %%global build_biarch 1}} %{expand: %{?_without_biarch: %%global build_biarch 0}} # define target architecture of plugins we want to support %define target_arch i386 %ifarch ppc64 %define target_arch ppc %endif # define target operating system of plugins we want to support %define target_os linux # define nspluginswrapper libdir (invariant, including libdir) %define pkglibdir %{_prefix}/lib/%{name} # define mozilla plugin dir %define plugindir %{_libdir}/mozilla/plugins Summary: A compatibility layer for Netscape 4 plugins Name: %{name} Version: %{version} Release: %{release} License: GPLv2+ Group: Networking/WWW URL: http://gwenole.beauchesne.info/projects/nspluginwrapper/ Source0: %{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2 Source1: nspluginwrapper.filter Source2: nspluginwrapper.script Source3: update-nspluginwrapper Patch7: nspluginwrapper-enable-v4l1compat.patch # From Fedora Patch10: nspluginwrapper-1.1.2-event.patch BuildRequires: curl-devel BuildRequires: gtk+2-devel BuildRequires: libxt-devel Provides: %{name}-%{_arch} = %{version} Requires(post): %{name}-%{target_arch} = %{version}-%{release} Requires(preun): %{name}-%{target_arch} = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description nspluginwrapper makes it possible to use Netscape 4 compatible plugins compiled for %{target_os}/%{target_arch} into Mozilla for another architecture, e.g. x86_64. This package consists in: * npviewer: the plugin viewer * npwrapper.so: the browser-side plugin * nspluginwrapper: a tool to manage plugins installation and update %if %{build_biarch} %package %{target_arch} Summary: A viewer for %{target_os}/%{target_arch} compiled Netscape 4 plugins Group: Networking/WWW %if "%{target_arch}" == "i386" Requires: linux32 # Flash 10 now requires 32 bit libcurl, libnss3.so # but Adobe's RPM package does not require them... # http://blogs.adobe.com/penguin.swf/2008/08/curl_tradeoffs.html Suggests: libcurl.so.4 Suggests: libnss3.so %endif %description %{target_arch} nspluginwrapper makes it possible to use Netscape 4 compatible plugins compiled for %{target_os}/%{target_arch} into Mozilla for another architecture, e.g. x86_64. This package consists in: * npviewer: the plugin viewer * npwrapper.so: the browser-side plugin * nspluginwrapper: a tool to manage plugins installation and update This package provides the npviewer program for %{target_os}/%{target_arch}. %endif %prep %setup -q %patch7 -p1 -b .enable-v4l1compat %patch10 -p1 -b .event %build export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" %if %{build_biarch} biarch="--with-biarch" %else biarch="--without-biarch" %endif mkdir objs pushd objs ../configure --prefix=%{_prefix} --target-cpu=%{target_arch} --with-viewer $biarch --linux-only # XXX configure option echo "DONT_STRIP = yes" >> config-host.mak %make popd %install rm -rf $RPM_BUILD_ROOT make -C objs install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{plugindir} mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/nspluginwrapper touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/nspluginwrapper ln -s %{pkglibdir}/%{_arch}/%{_os}/npwrapper.so $RPM_BUILD_ROOT%{plugindir}/npwrapper.so install -d -m 0755 %buildroot%{_var}/lib/rpm/filetriggers install -m 0644 %{SOURCE1} %buildroot%{_var}/lib/rpm/filetriggers install -m 0755 %{SOURCE2} %buildroot%{_var}/lib/rpm/filetriggers install -m 0755 %{SOURCE3} %buildroot%{_sbindir} %clean rm -rf $RPM_BUILD_ROOT %post if [ $1 = 1 ]; then %{_bindir}/%{name} -v -a -i else %{_bindir}/%{name} -v -a -u %if %{mdkversion} >= 200810 if [ -f /usr/lib/mozilla/plugins/libflashplayer.so ] && [ ! -f %{plugindir}/npwrapper.libflashplayer.so ]; then %{_bindir}/%{name} -v -i /usr/lib/mozilla/plugins/libflashplayer.so else if [ -f /usr/lib/flash-plugin/libflashplayer.so ] && [ ! -f %{plugindir}/npwrapper.libflashplayer.so ]; then %{_bindir}/%{name} -v -i /usr/lib/flash-plugin/libflashplayer.so fi fi %endif fi if [ ! -f %{_sysconfdir}/sysconfig/nspluginwrapper ]; then cat > %{_sysconfdir}/sysconfig/nspluginwrapper <<EOF USE_NSPLUGINWRAPPER=yes MDV_PLUGINS="%{nspw_plugins}" USER_PLUGINS="" EOF else sed -i "s/MDV_PLUGINS=.*/MDV_PLUGINS=\"%{nspw_plugins}\"/" \ %{_sysconfdir}/sysconfig/nspluginwrapper fi %preun if [ $1 = 0 ]; then %{_bindir}/%{name} -v -a -r fi # Flash Player %triggerin -- FlashPlayer < 9.0.115.0 if [ -f %{plugindir}/npwrapper.libflashplayer.so ]; then %{_bindir}/%{name} -v -u %{plugindir}/npwrapper.libflashplayer.so else %{_bindir}/%{name} -v -i /usr/lib/mozilla/plugins/libflashplayer.so fi %triggerpostun -- FlashPlayer < 9.0.115.0 if [ ! -f /usr/lib/mozilla/plugins/libflashplayer.so ]; then %{_bindir}/%{name} -v -r %{plugindir}/npwrapper.libflashplayer.so fi %triggerin -- FlashPlayer-plugin if [ -f %{plugindir}/npwrapper.libflashplayer.so ]; then %{_bindir}/%{name} -v -u %{plugindir}/npwrapper.libflashplayer.so else %{_bindir}/%{name} -v -i /usr/lib/mozilla/plugins/libflashplayer.so fi %triggerpostun -- FlashPlayer-plugin if [ ! -f /usr/lib/mozilla/plugins/libflashplayer.so ]; then %{_bindir}/%{name} -v -r %{plugindir}/npwrapper.libflashplayer.so fi %triggerin -- flash-plugin if [ -f %{plugindir}/npwrapper.libflashplayer.so ]; then %{_bindir}/%{name} -v -u %{plugindir}/npwrapper.libflashplayer.so else %{_bindir}/%{name} -v -i /usr/lib/flash-plugin/libflashplayer.so fi %triggerpostun -- flash-plugin if [ ! -f /usr/lib/flash-plugin/libflashplayer.so ]; then %{_bindir}/%{name} -v -r %{plugindir}/npwrapper.libflashplayer.so fi # Acrobat Reader %triggerin -- acroread5-nppdf, acroread-nppdf if [ -f %{plugindir}/npwrapper.nppdf.so ]; then %{_bindir}/%{name} -v -u %{plugindir}/npwrapper.nppdf.so else %{_bindir}/%{name} -v -i /usr/lib/mozilla/plugins/nppdf.so fi %triggerpostun -- acroread5-nppdf, acroread-nppdf if [ ! -f /usr/lib/mozilla/plugins/nppdf.so ]; then %{_bindir}/%{name} -v -r %{plugindir}/npwrapper.nppdf.so fi # Real Player 8 %triggerin -- RealPlayer-rpnp < 10 if [ -f %{plugindir}/npwrapper.rpnp.so ]; then %{_bindir}/%{name} -v -u %{plugindir}/npwrapper.rpnp.so else %{_bindir}/%{name} -v -i /usr/lib/mozilla/plugins/rpnp.so fi %triggerpostun -- RealPlayer-rpnp < 10 if [ ! -f /usr/lib/mozilla/plugins/rpnp.so ]; then %{_bindir}/%{name} -v -r %{plugindir}/npwrapper.rpnp.so fi # Real Player 10 %triggerin -- RealPlayer-rpnp >= 10 if [ -f %{plugindir}/npwrapper.nphelix.so ]; then %{_bindir}/%{name} -v -u %{plugindir}/npwrapper.nphelix.so else %{_bindir}/%{name} -v -i /usr/lib/mozilla/plugins/nphelix.so fi %triggerpostun -- RealPlayer-rpnp >= 10 if [ ! -f /usr/lib/mozilla/plugins/nphelix.so ]; then %{_bindir}/%{name} -v -r %{plugindir}/npwrapper.nphelix.so fi %files %defattr(-,root,root) %doc README NEWS %{_bindir}/%{name} %{_bindir}/nspluginplayer %{_sbindir}/update-nspluginwrapper %ghost %{_sysconfdir}/sysconfig/nspluginwrapper %{plugindir}/npwrapper.so %dir %{pkglibdir} %dir %{pkglibdir}/noarch %{pkglibdir}/noarch/npviewer %dir %{pkglibdir}/%{_arch} %dir %{pkglibdir}/%{_arch}/%{_os} %{pkglibdir}/%{_arch}/%{_os}/npconfig %if ! %{build_biarch} %{pkglibdir}/%{_arch}/%{_os}/npviewer %{pkglibdir}/%{_arch}/%{_os}/npviewer.bin %{pkglibdir}/%{_arch}/%{_os}/libxpcom.so %{pkglibdir}/%{_arch}/%{_os}/libnoxshm.so %endif %{pkglibdir}/%{_arch}/%{_os}/npplayer %{pkglibdir}/%{_arch}/%{_os}/npwrapper.so %{_var}/lib/rpm/filetriggers/nspluginwrapper.* %if %{build_biarch} %files %{target_arch} %defattr(-,root,root) %dir %{pkglibdir}/%{target_arch} %dir %{pkglibdir}/%{target_arch}/%{target_os} %{pkglibdir}/%{target_arch}/%{target_os}/npviewer %{pkglibdir}/%{target_arch}/%{target_os}/npviewer.bin %{pkglibdir}/%{target_arch}/%{target_os}/libxpcom.so %{pkglibdir}/%{target_arch}/%{target_os}/libnoxshm.so %endif %changelog * Fri Jan 02 2009 Frederik Himpe <fhimpe@mandriva.org> 1.2.2-1mdv2009.0 + Revision: 323359 - Update to new version 1.2.2 * Sun Dec 28 2008 Frederic Crozat <fcrozat@mandriva.com> 1.2.0-1mdv2009.1 + Revision: 320703 - Release 1.2.0 - Remove patch11 (merged upstream) * Thu Dec 18 2008 Frederic Crozat <fcrozat@mandriva.com> 1.1.10-1mdv2009.1 + Revision: 315498 - Release 1.1.10 - Remove patch11 (merged upstream) - Patch11 (SVN): mimic FF3 behaviour in plugin release * Wed Dec 03 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.8-1mdv2009.1 + Revision: 309816 - Update to new version 1.1.8 - Resync Fedora patches * Tue Oct 28 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.2-3mdv2009.1 + Revision: 298056 - Add fix for assertion with Flash 10 * Sun Oct 26 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.2-2mdv2009.1 + Revision: 297494 - Use event patch instead of sleep patch, like Fedora is doing. It should improve stability with Flash 10 - Suggest libnss3.so for Flash 10 (bug #45322) * Thu Oct 16 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.2-1mdv2009.1 + Revision: 294449 - Update to new version 1.1.2 - Remove 2 patches integrated upstream - Add suggests: libcurl.so.4 on nspluginwrapper-i386, because Flash 10 now requires this * Wed Oct 15 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.0-8mdv2009.1 + Revision: 294083 - Sync with Fedora patches: * Updated visual id fix for windowless crash with Flash 10 and Firefox 3 (use the patch which is integrated in upstream svn now) * Concurrent rpc_method_invoke() patch (fixes some Flash crashes) * Wed Sep 17 2008 Tiago Salem <salem@mandriva.com.br> 1.1.0-7mdv2009.0 + Revision: 285564 - add LD_PRELOAD to v4l1compat.so.0 - bump release * Thu Sep 04 2008 Tiago Salem <salem@mandriva.com.br> 1.1.0-6mdv2009.0 + Revision: 280849 - add rpm filetrigger to handle new plugins - add file to configure nspluginwrapper behavior - add update-nspluginwrapper script to manage nspluginwrapper - bump release * Sat Aug 16 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.0-5mdv2009.0 + Revision: 272764 - Extend postin script and triggers to deal with flash-plugin RPM downloaded from the Adobe site * Thu Aug 14 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.0-4mdv2009.0 + Revision: 272194 - Don't provide libxpcom.so (bug #42790) * Wed Aug 06 2008 Frederik Himpe <fhimpe@mandriva.org> 1.1.0-3mdv2009.0 + Revision: 264846 - Add Fedora patch fixing RH crasher bug #456432 * Mon Jul 21 2008 Olivier Blin <oblin@mandriva.com> 1.1.0-2mdv2009.0 + Revision: 239260 - fix filelist for x86_64 - buildrequire curl-devel (for the standalone player) - add selected fixes from the Fedora package - package nspluginplayer - package new npplayer and libnoxshm plugins - 1.1.0 * Mon Jun 30 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-1mdv2009.0 + Revision: 230202 - 1.0.0 - drop upstream implemented patches * Thu Jun 26 2008 Oden Eriksson <oeriksson@mandriva.com> 0.9.91.5-4mdv2009.0 + Revision: 229267 - add triggers for FlashPlayer-plugin (#39969) (Luc Menut) - modify triggers for FlashPlayer consequently (FlashPlayer < 9.0.115.0) (Luc Menut) * Tue Jun 24 2008 Tiago Salem <salem@mandriva.com.br> 0.9.91.5-3mdv2009.0 + Revision: 228762 - fix focus issue in Adobe Acrobat 8 * Sun Feb 03 2008 Frederik Himpe <fhimpe@mandriva.org> 0.9.91.5-2mdv2008.1 + Revision: 161581 - Add part of Debian's patch to patch0 in order to make it compile on x86_64 - Add patch0 from Fedora (and also included in Debian, Ubuntu and upstream) which fixes Flash 9.0.115 on SMP systems (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458584 and https://bugzilla.redhat.com/show_bug.cgi?id=360891) + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Mon Aug 27 2007 Funda Wang <fundawang@mandriva.org> 0.9.91.5-1mdv2008.0 + Revision: 71706 - New version 0.9.91.5 * Fri Jun 29 2007 Funda Wang <fundawang@mandriva.org> 0.9.91.4-1mdv2008.0 + Revision: 45625 - New verison Patch 0,1 merged upstream * Wed Mar 28 2007 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91.3-2mdv2007.1 + Revision: 149180 - don't error out when host plugins are tried, simply ignore them - requires linux32 for nspluginwrapper-i386 * Sun Mar 04 2007 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91.3-1mdv2007.1 + Revision: 132209 - 0.9.91.3 * fix printing with EMBED plugins * use sound wrappers whenever possible on Linux (Flash Player 9) * don't wait for dying processes (i.e. avoid hangs on NP_Shutdown) * Fri Dec 29 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91.2-1mdv - 0.9.91.2 * improve error handling with non-blocking I/O * fix hangs when the plugin exits unexpectedly (e.g. a crash) * Wed Dec 27 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91.2-0.20061227.1mdv - update from SVN head (2006/12/27): * fix some rare RPC synchronisation issues (flashearth.com with flashplayer 9) * Tue Dec 26 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91.1-1mdv - 9.9.91.1 * fix NPRuntime bridge (VLC plugin) * fix potential buffer overflow in RPC marshalers * handle empty args for plugin creation (flasharcade.com) * Fri Dec 22 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91-1mdv - 0.9.91 * add npruntime scripting support * disable flashplayer 9 beta 1 plugin * Wed Dec 20 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91-0.20061220.1mdv - update from SVN head (2006/12/20): * really fix ppc64 host support * add NPN_RequestRead() support (acroread) * fix some rare hangs (add delayed requests) * fix libstdc++2 compat glue for broken plugins * improve marshaling of NPP instances (prepare integration of npruntime support) * Fri Dec 15 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91-0.20061215.1mdv - fix requires - update from SVN head (2006/12/15): * fix ppc64 / ppc32 support * create user mozilla plugins directory if it does not exist yet * Wed Dec 13 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91-0.20061213.1mdv - update from SVN head (2006/12/13): * fix focus problems with certain Flash sites * add XEMBED support (mplayer plug-in) * add dummy XPCOM library * Tue Nov 28 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91-0.20061127.2mdv - fix symlink to main wrapper plugin (cosmetics) * Mon Nov 27 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.91-0.20061127.1mdv - update from SVN head (2006/11/27): * cross-platform improvements * write wrapped plugin only when it is valid * embed LSB Desktop because other distros can't build biarch packages * Fri Nov 17 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.90.4-1mdv - 0.9.90.4 * fix a warning * use glib hash tables * Wed Nov 15 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.90.4-0.20061115.1mdv - update from SVN head (2006/11/15) for testing: * add printing support (NPP_Print) * add initial support for Konqueror * fix post data to a URL (NPN_PostURL, NPN_PostURLNotify) * reduce plugin load times * robustify error condition (Darryl L. Miles) * Wed Sep 20 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.90.3-1mdv - fix acrobat reader 7 plugin - fix triggers (for foreign package uninstallation this time) * Mon Sep 18 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.90.2-2mdv - fix triggers - add triggers for Real Player 8 * Sat Sep 16 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.9.90.2-1mdk - buildrequires: libxt-devel (neoclust) - use a bidirectional communication channel * Thu Jun 08 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.90.1-2mdk - ship with mkruntime - enable -debug packages - add possibility to build biarch packages at once - fix repackage.sh to stop generating deps on non x86 platforms * Wed Jun 07 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.90.1-1mdk - first Mandriva Linux release - don't use QEMU on IA-64 platforms