File kmarkdownwebview.spec of Package kmarkdownwebview

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

%bcond_without lang
Name:           kmarkdownwebview
Version:        0.5.2
Release:        0
%define kf5_version 5.25.0
Summary:        KPart for rendering Markdown content
License:        LGPL-2.1+
Group:          System/Libraries
BuildRequires:  extra-cmake-modules >= %{kf5_version}
BuildRequires:  ki18n-devel >= %{kf5_version}
BuildRequires:  kio-devel >= %{kf5_version}
BuildRequires:  kparts-devel >= %{kf5_version}
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.6.0
%if 0%{?suse_version} >= 1330
BuildRequires:  pkgconfig(Qt5WebEngineWidgets) >= 5.7.0
BuildRequires:  pkgconfig(Qt5WebKitWidgets) >= 5.6.0
%if %{with lang}
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This package allows KDE applications which use it to obtain a live preview of HTML-rendered Markdown content.

%if %{with lang}

%setup -q

%if 0%{?suse_version} < 1330
  %cmake_kf5 -d build -- -DUSE_WEBKIT=TRUE
  %cmake_kf5 -d build

%kf5_makeinstall -C build
%if %{with lang}
  %find_lang %{name} --all-name

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%license COPYING*
%if 0%{?suse_version} < 1330

%if %{with lang}
%files lang -f %{name}.lang
%license COPYING*

openSUSE Build Service is sponsored by