File epiphany.spec of Package epiphany

# spec file for package epiphany
# Copyright (c) 2016 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

Name:           epiphany
Version:        3.20.3
Release:        0
%define _base_version 3.20
Summary:        GNOME Web Browser
License:        GPL-2.0+
Group:          Productivity/Networking/Web/Browsers
# PATCH-FEATURE-OPENSUSE epiphany-safe-one-click-install.patch bnc330070 -- Make one-click install work with one-click
Patch0:         epiphany-safe-one-click-install.patch
# PATCH-FIX-UPSTREAM epiphany-embed-Check-for-NULL-SoupURI.patch bgo#768250 -- Fixes crashes when accessing soup_uri memory.
Patch1:         epiphany-embed-Check-for-NULL-SoupURI.patch
# The icon we rely on is from adwaita-icon-theme
BuildRequires:  adwaita-icon-theme
BuildRequires:  fdupes
BuildRequires:  gnome-icon-theme
BuildRequires:  intltool >= 0.50
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(avahi-client) >= 0.6.22
BuildRequires:  pkgconfig(avahi-gobject) >= 0.6.22
BuildRequires:  pkgconfig(gcr-3) >= 3.5.5
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.31.2
BuildRequires:  pkgconfig(glib-2.0) >= 2.44.0
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 2.91.7
BuildRequires:  pkgconfig(gsettings-desktop-schemas) >= 0.0.1
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.19.1
BuildRequires:  pkgconfig(gtk+-unix-print-3.0) >= 3.5.2
BuildRequires:  pkgconfig(iso-codes) >= 0.35
BuildRequires:  pkgconfig(libnotify) >= 0.5.1
BuildRequires:  pkgconfig(libsecret-1) >= 0.14
BuildRequires:  pkgconfig(libsoup-2.4) >= 2.42.1
BuildRequires:  pkgconfig(libwnck-3.0)
BuildRequires:  pkgconfig(libxml-2.0) >= 2.6.12
BuildRequires:  pkgconfig(libxslt) >= 1.1.7
BuildRequires:  pkgconfig(nss)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(webkit2gtk-4.0) >= 2.11.4
BuildRequires:  pkgconfig(webkit2gtk-web-extension-4.0) >= 2.11.1
BuildRequires:  pkgconfig(x11)
Requires:       %{name}-branding = %{version}
Requires:       NetworkManager
Requires:       iso-codes
Recommends:     %{name}-lang
Recommends:     ca-certificates
# Epiphany dropped extensions support in 3.7.1; thus obsoleting the extensions package.
Obsoletes:      epiphany-extensions < %{version}
Obsoletes:      epiphany-extensions-lang < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# With epiphany 3.7.90, the installation of headers and API doc was stopped. Obsolete an eventual installed package.
Obsoletes:      %{name}-devel < 3.7.90

Epiphany is a Web browser for the GNOME Desktop. Its principles are
simplicity and standards compliance.

%package branding-upstream
Summary:        GNOME Web Browser -- Upstream default bookmarks and user agent string
Group:          Productivity/Networking/Web/Browsers
Requires:       %{name} = %{version}
Supplements:    packageand(%{name}:branding-upstream)
Provides:       %{name}-branding = %{version}
BuildArch:      noarch
Conflicts:      otherproviders(%{name}-branding)
#BRAND: Provide a few files -
#BRAND: /usr/share/epiphany/default-bookmarks.rdf
#BRAND:   the default bookmarks
#BRAND: /usr/share/epiphany/branding.conf (optional)
#BRAND:   a file to change the default user agent. For instance:
#BRAND:     [User Agent]
#BRAND:     Vendor=SUSE
#BRAND:     VendorSub=12.1
#BRAND:     VendorComment=3.1.2-101.5

%description branding-upstream
Epiphany is a Web Browser for the GNOME Desktop. Its principles are
simplicity and standards compliance.

This package provides the upstream default bookmarks and user agent

%package -n gnome-shell-search-provider-epiphany
Summary:        Epiphany is a Web browser for the GNOME Desktop -- Search Provider for GNOME Shell
Group:          Productivity/Networking/Web/Browsers
Requires:       %{name} = %{version}
Requires:       gnome-shell
Supplements:    packageand(%{name}:gnome-shell)

%description -n gnome-shell-search-provider-epiphany
Epiphany is a Web browser for the GNOME Desktop.

This package contains a search provider to enable GNOME Shell to get
search results from Web (epiphany)

%setup -q
%patch0 -p1
%patch1 -p1

%configure \
    --disable-maintainer-mode \
make %{?_smp_mflags} V=1

find %{buildroot} -type f -name '*.la' -delete -print
%suse_update_desktop_file %{name}
# Copy the icons in hicolor, else brp-check is sad
for size in 8x8 16x16 22x22 24x24 32x32 48x48 256x256; do
        if test -f %{_datadir}/icons/gnome/${size}/apps/web-browser.png; then
                mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size/apps
                cp -a %{_datadir}/icons/gnome/$size/apps/web-browser.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/web-browser.png
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}



%doc %{_datadir}/help/C/%{name}/
%dir %{_datadir}/appdata
%exclude %{_datadir}/epiphany/default-bookmarks.rdf
%doc %{_mandir}/man1/epiphany.1.gz
%dir %{_libdir}/epiphany
%dir %{_libdir}/epiphany/%{_base_version}
%dir %{_libdir}/epiphany/%{_base_version}/web-extensions

%files lang -f %{name}.lang

%files branding-upstream

%files -n gnome-shell-search-provider-epiphany
%dir %{_datadir}/gnome-shell
%dir %{_datadir}/gnome-shell/search-providers

openSUSE Build Service is sponsored by