# NOTE: this is a Linux-specific package, don't use the embedded # viewer on non-Linux platforms. %define name nspluginwrapper %define version 0.9.91.5 #define svndate 20061227 %define rel 1 %define release %mkrel %{?svndate:0.%{svndate}.}%{rel} # 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} Source0: %{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2 License: GPL Group: Networking/WWW Url: http://gwenole.beauchesne.info/projects/nspluginwrapper/ 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 %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 %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} ln -s %{pkglibdir}/%{_arch}/%{_os}/npwrapper.so $RPM_BUILD_ROOT%{plugindir}/npwrapper.so %clean rm -rf $RPM_BUILD_ROOT %post if [ $1 = 1 ]; then %{_bindir}/%{name} -v -a -i else %{_bindir}/%{name} -v -a -u fi %preun if [ $1 = 0 ]; then %{_bindir}/%{name} -v -a -r fi # Flash Player 7 %triggerin -- FlashPlayer 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 if [ ! -f /usr/lib/mozilla/plugins/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 COPYING NEWS %{_bindir}/%{name} %{plugindir}/npwrapper.so %dir %{pkglibdir} %dir %{pkglibdir}/noarch %{pkglibdir}/noarch/npviewer %{pkglibdir}/noarch/mkruntime %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 %endif %{pkglibdir}/%{_arch}/%{_os}/npwrapper.so %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 %endif %changelog * 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