File opera.spec of Package opera
#
# spec file for package opera (Version 10.00)
#
# 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
%if 0%{?suse_version} > 1110
%define ix86ver gcc4-qt4.i386
%define x86_64ver gcc4-qt4.x86_64
%else
%define ix86ver gcc4-shared-qt3.i386
%define x86_64ver gcc4-shared-qt3.x86_64
%endif
%define ppcver gcc4-shared-qt3.ppc
%define buildnum 4585
%define ppcbuildnum 4585
Name: opera
Url: http://www.opera.com/
Version: 10.00
Release: 7.<RELEASE1>
%ifarch ppc ppc64
Summary: The Opera Web Browser (%{version} build %{buildnum})
%else
Summary: The Opera Web Browser (%{version} build %{buildnum})
%endif
Group: Productivity/Networking/Web/Browsers
License: NON-OSI-COMPLIANT(royalties)
Source0: http://snapshot.opera.com/unix/snapshot-%{buildnum}/intel-linux/%{name}-%{version}-%{buildnum}.%{ix86ver}.tar.bz2
Source1: http://snapshot.opera.com/unix/snapshot-%{buildnum}/x86_64-linux/%{name}-%{version}-%{buildnum}.%{x86_64ver}.tar.bz2
Source2: http://snapshot.opera.com/unix/snapshot-%{ppcbuildnum}/ppc-linux/%{name}-%{version}-%{ppcbuildnum}.%{ppcver}.tar.bz2
Source10: download.sh
Source20: opera.desktop
NoSource: 0
NoSource: 1
NoSource: 2
# PATCH: wrong page layout if scim-qtimm is installed [bnc#208048]
Patch0: %{name}-scim-qtimm-problem.patch
# PATCH: add one click associations for YMP [bnc#300536]
Patch1: %{name}-ymp-file-type.patch
# PATCH: define default fonts for better integration into desktop
Patch2: %{name}-default-fonts.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %{ix86} x86_64 ppc ppc64
PreReq: coreutils
BuildRequires: fdupes unzip update-desktop-files
%description
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.
Authors:
--------
Opera Software A/S
%prep
%setup -q -T -c -n %{name}-%{version} -a 0 -a 1 -a 2
for i in %{buildnum}.%{ix86ver} %{buildnum}.%{x86_64ver} %{ppcbuildnum}.%{ppcver} ; do
pushd %{name}-%{version}-$i
%patch0
%patch1
%patch2
sed -i '/etc\/operaprefs_\(default\|fixed\)\.ini$/d' Manifest.md5
popd
done
%build
# check for supported architectures
%ifnarch %{ix86} ppc ppc64 x86_64
echo 'Architecture not supported'
exit 1
%endif
%install
# change into right directory
%ifarch %{ix86}
cd %{name}-%{version}-%{buildnum}.%{ix86ver}
%endif
%ifarch x86_64
cd %{name}-%{version}-%{buildnum}.%{x86_64ver}
%endif
%ifarch ppc ppc64
cd %{name}-%{version}-%{ppcbuildnum}.%{ppcver}
%endif
./install.sh \
--prefix=%{_prefix} \
--wrapperdir=%{_bindir} \
--docdir=%{_docdir}/%{name} \
--sharedir=%{_datadir}/%{name} \
--DESTDIR=$RPM_BUILD_ROOT
#create profile.d script
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
echo "export OPERADIR=%{_datadir}/%{name}" > $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/%{name}.sh
install -m 644 etc/operaprefs_default.ini $RPM_BUILD_ROOT%{_sysconfdir}
install -m 644 etc/operaprefs_fixed.ini $RPM_BUILD_ROOT%{_sysconfdir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons
cp -ar usr/share/icons/* $RPM_BUILD_ROOT%{_datadir}/icons
%suse_update_desktop_file -i %{name}
%fdupes $RPM_BUILD_ROOT%{_datadir}/opera
%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%doc %{_mandir}/man1/opera.1.gz
%{_bindir}/opera
%{_prefix}/lib/opera
%config %{_sysconfdir}/profile.d/%{name}.sh
%config %{_sysconfdir}/operaprefs_*.ini
%{_datadir}/%{name}
%{_datadir}/applications/opera.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%{_datadir}/icons/hicolor/*/apps/opera.png
%{_datadir}/icons/hicolor/scalable/apps/opera.svg
%changelog