File midori.spec of Package midori

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

%define major   0
Name:           midori
Version:        v8.0
Release:        0
Summary:        Lightweight Web Browser
License:        LGPL-2.1-or-later
Group:          Productivity/Networking/Web/Browsers
Source:         %{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM zoom-menu.patch -- add page zoom in and out 
# (issue gh#midori-browser/core#286)
Patch0:         zoom-menu.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gettext-tools
BuildRequires:  intltool
BuildRequires:  vala
BuildRequires:  pkgconfig(gcr-3)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(libarchive)
BuildRequires:  pkgconfig(libpeas-1.0)
BuildRequires:  pkgconfig(libsoup-2.4)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(webkit2gtk-4.0)
Requires:       ca-certificates
Requires:       ca-certificates-mozilla
Recommends:     %{name}-lang
Recommends:     xdg-utils
Provides:       browser(npapi)
Obsoletes:      %{name}-branding-openSUSE

Midori is a lightweight web browser based on WebKit and GTK+. Its major
features are:

* Tabs, windows and session management.
* Flexibly configurable Web Search.
* User scripts and user styles support.
* Straightforward bookmark management.
* Customizable and extensible interface.
* Extensions written in C and Vala.

%package -n libmidori-core%{major}
Summary:        Midori Library
Group:          System/Libraries
Obsoletes:      libmidori-core1

%description -n libmidori-core%{major}
Midori shared library.

%package devel
Summary:        Development Files for Midori
Group:          Development/Libraries/C and C++
Requires:       libmidori-core%{major} = %{version}
Requires:       typelib-1_0-Midori-0_6
Requires:       pkgconfig(gobject-introspection-1.0)
Recommends:     pkgconfig(vapigen)

%description devel
This package contains development files needed to develop extensions for

%package -n typelib-1_0-Midori-0_6
Summary:        Midori Browser -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-Midori-0_6
Midori is a lightweight web browser based on WebKit and GTK+.

This package provides the GObject Introspection bindings for Midori.


%autosetup -p1


cd build
cd ..
%find_lang %{name} %{?no_lang_C}

# remove redundant doc directory and files
rm -rf %{buildroot}%{_datadir}/doc/midori/

# fix desktop file name
mv %{buildroot}%{_datadir}/applications/org.midori_browser.Midori.desktop %{buildroot}%{_datadir}/applications/midori.desktop

%fdupes -s %{buildroot}%{_datadir}/

%post -n libmidori-core%{major}  -p /sbin/ldconfig
%postun -n libmidori-core%{major} -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%doc ChangeLog
%license COPYING
%dir %{_libdir}/%{name}

%files -n libmidori-core%{major}

%files devel

%files -n typelib-1_0-Midori-0_6

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by