File nspluginwrapper.spec of Package nspluginwrapper

#
# spec file for package nspluginwrapper (Version 1.2.2)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           nspluginwrapper
Version:        1.2.2
Release:        2.<RELEASE1>
Group:          Productivity/Networking/Web/Utilities
Summary:        Compatibility Layer for Netscape 4 Plug-Ins
License:        GPL v2 or later
Url:            http://gwenole.beauchesne.info/projects/nspluginwrapper/
Source:         %{name}-%{version}.tar.bz2
# Suppress error messages when trying to wrap native plugin (bnc#400194):
# (Now it's done differently, but still only a work-around.)
Patch:          nspluginwrapper-silence.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  curl-devel glib2-devel gtk2-devel
BuildRequires:  gcc-c++
%ifarch x86_64
BuildRequires:  gcc-32bit libstdc++43-devel-32bit
%endif
ExcludeArch:    s390 s390x
# Name of platform split package, never used in openSUSE:
Provides:       %{name}-%{_arch} = %{version}-%{release}
# Name of platform split package, used in openSUSE BS before 11.0:
Provides:       %{name}-i386 = %{version}-%{release}
Obsoletes:      %{name}-i386

%description
nspluginwrapper is an Open Source compatibility plugin for Netscape 4
(NPAPI) plugins. It enables you to use plugins on platforms they were
not built for. For example, you can use the plugins compiled for i386
in Mozilla on Linux/x86_64 or other architectures. This package
consists of:

* npviewer: the plug-in viewer

* npwrapper.so: the browser-side plug-in

* nspluginwrapper: a tool to manage plug-ins installation and update



Authors:
--------
    Gwenole Beauchesne <gb.public@free.fr>

%prep
%setup -q
#%patch

%build
#
# TODO:
# There are three ways to compile 32 bit stuff. Decide, what is better:
# 1) As is: Use stub libraries from stub_libs.
# 2) Create gtk2-devel-32bit and all needed stuff and cross compile
#    using cross-compilation-headers.
# 3) Let 32-bit platform compile it, then use -32bit package.
#
%ifarch x86_64
# FIXME: more undefined references to `__stack_chk_fail' follow
# More correct would be probably adding stack checking code to
# lsb-build/stub_libs/libc_main.c
export CFLAGS_32="-m32 ${RPM_OPT_FLAGS/-fstack-protector}"
%endif
%configure\
	--with-viewer\
%ifarch x86_64
	--with-biarch
%else
	--without-biarch
%endif
make %{?jobs:-j%jobs}

%install
%makeinstall DONT_STRIP=yes
mkdir -p $RPM_BUILD_ROOT%{_libdir}/browser-plugins
ln -s %{_prefix}/lib/%{name}/%{_arch}/%{_os}/npwrapper.so $RPM_BUILD_ROOT%{_libdir}/browser-plugins/npwrapper.so

%clean
rm -rf $RPM_BUILD_ROOT
# Trigger on packages that don't have x86_64 equivalent or its
# equivalent has less features.
# mplayerplug-in is a common name of third party package that may be
# affected, too.

%triggerin -- RealPlayer acroread acroread_ja flash-player mplayerplug-in
# suppress "wrong ELF class" messages
%{_bindir}/%{name} -a -i 2>&1 | grep -v "wrong ELF class" >&2 || :

%triggerpostun -- RealPlayer acroread acroread_ja flash-player mplayerplug-in
# suppress "wrong ELF class" messages
%{_bindir}/%{name} -a -i 2>&1 | grep -v "wrong ELF class" >&2 || :

%post
# suppress "wrong ELF class" messages
%{_bindir}/%{name} -a -i 2>&1 | grep -v "wrong ELF class" >&2 || :

%preun
if [ $1 = 0 ]; then
# suppress "wrong ELF class" messages
  %{_bindir}/%{name} -a -r 2>&1 | grep -v "wrong ELF class" >&2 || :
fi

%files
%defattr(-,root,root)
%doc ChangeLog COPYING NEWS README TODO
%{_bindir}/nspluginplayer
%{_bindir}/%{name}
%{_libdir}/browser-plugins/npwrapper.so
%{_prefix}/lib/%{name}

%changelog
* Tue Jan 06 2009 sbrabec@suse.cz
- Updated to version 1.2.2:
  * Fix support for the VLC plug-in
  * Fix memory deallocation in NPN_GetStringIdentifiers()
  * Fix return value if stream creation failed in standalone player
  * Drop obsolete mkruntime scripts
  * Use valgrind if NPW_USE_VALGRIND=yes
  * Add support for SunStudio compilers
  * Add support for Flash Player 10 on OpenSolaris 2008.11
  * Fix build on non-Linux platforms
  * Fix NPP_Destroy() to keep NPP instances longer, but destroy
  window immediately
* Mon Dec 15 2008 sbrabec@suse.cz
- Correct fixes for ordered comparisons of pointer with zero
  (bnc#432616#c2).
* Fri Dec 12 2008 sbrabec@suse.cz
- Updated to version 1.1.10 (bnc#447434):
  * Fix XEMBED (rework for lost events/focus regressions,
  workaround Gtk2 and Firefox bugs)
  * Fix various bugs in RPC code
  * Close npviewer.bin sockets and all open files when stating
  a plugin
  * Make `which` failures silent for soundwrappers
  * Allow wrapping and direct execution of native plugins
  * Enable glib memory hooks by default
  * Fixes of problems that could make some plugins crash
  * Fixed memory leaks
  * Fix "javascript:" streams requests in standalone player
  * Fix DiamondX plugin with Konqueror4
  * Fix NPAPI version that is exposed to the plugin
  * Add support for windowless plugins (Flash Player 10)
  * Add standalone plugins player
  * Restart plugins viewer on error
  * Other code fixes
- Fixed ordered comparison of pointer with zero (bnc#432616).
* Tue Nov 25 2008 sbrabec@suse.cz
- Prevent ugly "which" error messages in console output.
* Wed Nov 05 2008 mls@suse.de
- remove glibc triggers, no longer needed [bnc#304963]
* Wed Aug 06 2008 wr@opensuse.org
- Update to version 1.0.0
  * Don't wrap root plugins to system locations, keep them private
  * Fix support for Acrobat Reader 8 (focus problems)
  * Fix support for mozplugger (in full-debug mode)
  * Fix support for WebKit
  * Fix crashes with Flash Player 9 Update 3 (9.0.115)
  * Improve error handling during RPC initialization
  (possible memory leak on error)
  * Improve error handling in NPP_WriteReady() and NPP_Write()
* Mon Jun 23 2008 sbrabec@suse.cz
- Fixed focus in Adobe Reader 8 (bnc#353503).
- Original noshm patch replaced by the backport of the upstream
  implementation plus strict-aliasing fix.
* Mon Jun 16 2008 sbrabec@suse.cz
- Suppress error messages when trying to wrap native plugin
  (bnc#400194).
* Thu Jun 12 2008 sbrabec@suse.cz
- Never wrap plugins in home into system dirs (bnc#384367).
* Tue Jun 03 2008 crrodriguez@suse.de
- noshm.c needs to be built using fno-strict-aliasing
* Mon Apr 07 2008 ro@suse.de
- force adding of libgthread to cflags/ldflags
* Fri Apr 04 2008 sbrabec@suse.cz
- Provide and obsolete nspluginwrapper-i386 from Build Service.
- Call full plugin cache rebuild in trigger.
- Trigger plugin cache rebuild on glibc update to attempt to fix
  glibc post-crash brokenness (bnc304963#c22).
* Wed Apr 02 2008 sbrabec@suse.cz
- Update to 0.9.91.6 pre snapshot from 20071225:
  * Initialize glib for multithreading
  * Nuke the window border, it's quite disturbing
  * Improve NPP_WriteReady() and NPP_Write() error handling
- Call full plugin update after any package installation.
* Thu Jan 24 2008 thoenig@suse.de
- Update to version 0.9.91.5:
  * Fix a memory leak in NPP_Destroy()
  * Fix DiamondX XEmbed example plugin
  * Fix focus problems (Debian bug #435912)
  * Add support for 64-bit plugins (Martin Stransky)
  * Add support for newer NPAPI 0.17 functions and variables
  * Add support for broken 64-bit Konqueror versions
  (run-time detect)
  * Regression: Focus in nppdf does not work.
- Add patch nspluginwrapper-initialize-gthread.patch: Initialize
  gthreads, adjust LDFLAGS.
* Wed Nov 21 2007 ro@suse.de
- buildreq: gcc-42 -> gcc43
* Fri Sep 14 2007 sbrabec@suse.cz
- Ignore scriptlet errors to work-around glibc bug (#304963).
* Mon Aug 27 2007 schwab@suse.de
- Don't strip binaries.
* Tue Jul 17 2007 agraf@suse.de
- Fix compilation issues with new shared library
- Fix build on x86_64
- Exclude s390 from build (unsupported)
* Wed Jul 11 2007 agraf@suse.de
- Include shared lib to suppress the MIT-SHM extension if
  qemu is used in which case endianness issues appear with
  shared memory.
* Wed Jun 20 2007 rguenther@suse.de
- Fix BuildRequires.
* Tue Apr 17 2007 sbrabec@suse.cz
- Updated to version 0.9.91.4:
  * Don’t try to wrap native plugins
  * Fix build on Linux systems with SSP enabled by default
- Removed self-requires.
* Tue Apr 03 2007 lrupp@suse.de
- fix typo => _arch instead of target_arch
* Mon Mar 26 2007 sbrabec@suse.cz
- New SuSE package, version 0.9.91.3.
openSUSE Build Service is sponsored by