File nspluginwrapper.spec of Package nspluginwrapper
#
# spec file for package nspluginwrapper
#
# Copyright (c) 2012 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/
#
Name: nspluginwrapper
Version: 1.4.4
Release: 0
Summary: Compatibility Layer for Netscape 4 Plug-Ins
License: GPL-2.0+
Group: Productivity/Networking/Web/Utilities
Url: http://nspluginwrapper.davidben.net/
Source: %{name}-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0: fix-link.patch
# nspluginwrapper-1.4.4-glib.patch from SVN, remove in next version
Patch1: nspluginwrapper-1.4.4-glib.patch
BuildRequires: curl-devel
BuildRequires: gcc-c++
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xt)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifarch x86_64
BuildRequires: gcc-c++-32bit
%endif
Supplements: acroread
# Name of platform split package, never used in openSUSE:
Provides: %{name}-%{_arch} = %{version}
# Name of platform split package, used in openSUSE BS before 11.0:
Provides: %{name}-i386 = %{version}
Obsoletes: %{name}-i386 < %{version}
ExcludeArch: s390 s390x %ix86
%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
%prep
%setup -q
%patch0 -p1
%patch1
%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
#
# 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
export CFLAGS="${CFLAGS:-%{optflags}}"
./configure\
--prefix=%{_prefix}
#sed -i "s/CC=.*/& %{optflags}/" config-host.mak
make %{?_smp_mflags}
%install
%makeinstall DONT_STRIP=yes
mkdir -p %{buildroot}%{_libdir}/browser-plugins
ln -s %{_prefix}/lib/%{name}/%{_arch}/%{_os}/npwrapper.so %{buildroot}%{_libdir}/browser-plugins/npwrapper.so
# 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 mplayerplug-in
# suppress "wrong ELF class" messages
%{_bindir}/%{name} -a -i 2>&1 | grep -v "wrong ELF class" >&2 || :
%triggerpostun -- RealPlayer acroread acroread_ja mplayerplug-in
# suppress "wrong ELF class" messages
%{_bindir}/%{name} -a -u 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 COPYING NEWS README TODO
%{_bindir}/nspluginplayer
%{_bindir}/%{name}
%{_libdir}/browser-plugins/npwrapper.so
%{_prefix}/lib/%{name}
%changelog