File opera.spec of Package opera
#
# spec file for package opera
#
# Copyright (c) 2015 SUSE LINUX 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: opera
Version: 32.0.1948.69
Release: 0
Summary: Proprietary web browser
License: SUSE-NonFree
Group: Productivity/Networking/Web/Browsers
Url: https://opera.com/
Source: http://get.geo.opera.com/pub/%{name}/desktop/%{version}/linux/%{name}-stable_%{version}_amd64.deb
Source1: %{name}.sh
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
Recommends: chromium-pepper-flash
Recommends: ffmpeg
Provides: %{name}-gtk = %{version}
Provides: %{name}-kde4 = %{version}
Obsoletes: %{name}-gtk < %{version}
Obsoletes: %{name}-kde4 < %{version}
ExclusiveArch: x86_64
%description
Opera is a proprietary, fast, and user-friendly web browser.
It includes web developer tools, news aggregation, and the ability
to compress data via Opera Turbo on congested networks.
%prep
ar -x %{SOURCE0}
tar -xf data.tar.xz
rm -f data.tar.xz
mv -f .%{_datadir}/doc/%{name}-stable/copyright COPYING
gzip -d .%{_datadir}/doc/%{name}-stable/changelog.gz
mv -f .%{_datadir}/doc/%{name}-stable/changelog ChangeLog
sed -i 's/^\(TargetEnvironment\)/X-\1/' .%{_datadir}/applications/%{name}.desktop
cp -f %{SOURCE1} %{name}.sh
cat > %{name}.conf << EOF
# Default settings for opera. This file is sourced by /usr/bin/opera.
# Options to pass to opera.
OPERA_FLAGS=""
EOF
%build
# Nothing to build.
%install
mkdir -p %{buildroot}%{_libdir}/
cp -a .%{_libexecdir}/*-linux-gnu/%{name} %{buildroot}%{_libdir}/%{name}
install -Dm 0755 %{name}.sh %{buildroot}%{_bindir}/%{name}
install -Dm 0644 .%{_datadir}/applications/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
cp -a .%{_datadir}/icons/ \
%{buildroot}%{_datadir}/
install -Dm 0755 %{name}.sh %{buildroot}%{_bindir}/%{name}
install -Dm 0644 %{name}.conf %{buildroot}%{_sysconfdir}/default/%{name}
%fdupes %{buildroot}%{_libdir}/
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc ChangeLog COPYING
%defattr(-,root,root)
%{_bindir}/%{name}
%{_libdir}/%{name}/
%config(noreplace) %{_sysconfdir}/default/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/*
%changelog