File opera.spec of Package opera

# spec file for package opera
# 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

%define tag32b   i386.linux
%define tag64b   x86_64.linux
%define buildnum 1860
%define relnum   1216

Name:           opera
Version:        12.16
Release:        0
Summary:        Opera Web Browser (%{version} build %{buildnum})
License:        SUSE-NonFree
Group:          Productivity/Networking/Web/Browsers
Source2:        operaprefs_fixed.ini
Source3:        README.openSUSE
NoSource:       0
NoSource:       1
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
BuildRequires:  xz
Recommends:     %{name}-gtk = %{version}
Recommends:     %{name}-kde4 = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %{ix86} x86_64
Provides:       browser(npapi)

Opera is user-friendly, secure, and exceptionally fast. The browser is
small, yet full-featured and functions well on systems with limited
resources. Opera supports all common Web standards and implements them
according to the official recommendations.

%package gtk
Summary:        Opera GTK engine
Group:          Productivity/Networking/Web/Browsers
Requires:       opera = %{version}

%description gtk
Opera engine for GTK integration.

%package kde4
Summary:        Opera KDE4 engine
Group:          Productivity/Networking/Web/Browsers
Requires:       opera = %{version}

%description kde4
Opera engine for KDE4 integration.

%setup -q -T -c -n %{name}-%{version} -a 0 -a 1

# check for supported architectures
%ifnarch %{ix86} x86_64
echo 'Only x86 and x86_64 architectures are supported'
exit 1

# change into right directory
%ifarch %{ix86}
cd %{name}-%{version}-%{buildnum}.%{tag32b}
%ifarch x86_64
cd %{name}-%{version}-%{buildnum}.%{tag64b}

./install --repackage %{buildroot}/%{_prefix} --prefix %{_prefix}
mkdir %{buildroot}/etc
cp %{SOURCE2} %{buildroot}/etc
cp %{SOURCE3} %{buildroot}/%{_datadir}/doc/%{name}

# Remove auto-update application
rm %{buildroot}/%{_prefix}/lib/opera/opera_autoupdatechecker

%suse_update_desktop_file opera-browser
%fdupes %{buildroot}%{_datadir}

%doc %{_mandir}/man1/opera*
%config /etc/operaprefs_fixed.ini
%dir %{_datadir}/doc/opera
%doc %{_datadir}/doc/opera/*
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%dir %{_datadir}/icons/hicolor/*/mimetypes
%exclude %{_prefix}/lib/opera/
%exclude %{_prefix}/lib/opera/

%files gtk
%if 0%{?suse_version} > 1120

%files kde4

openSUSE Build Service is sponsored by