File kipi-plugins.spec of Package kipi-plugins

# spec file for package kipi-plugins
# 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

%bcond_without lang
Name:           kipi-plugins
Version:        5.9.1
Release:        0
Summary:        KDE Plug-Ins for Image Manipulation
License:        GPL-2.0-or-later
Group:          Productivity/Graphics/Other
BuildRequires:  extra-cmake-modules
BuildRequires:  karchive-devel
BuildRequires:  kconfig-devel
BuildRequires:  kf5-filesystem
BuildRequires:  ki18n-devel
BuildRequires:  kio-devel
BuildRequires:  kwindowsystem-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  libkipi-devel >= 16.04.0
BuildRequires:  libmediawiki-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5XmlPatterns)
Recommends:     %{name}-lang
Obsoletes:      kipi-plugins-acquireimage < %{version}
Obsoletes:      kipi-plugins-geolocation < %{version}
Obsoletes:      kipi-plugins5 < %{version}
Provides:       kipi-plugins5 = %{version}
Obsoletes:      kipi-plugin-icons < %{version}
Provides:       kipi-plugin-icons = %{version}
%if 0%{?suse_version} < 1500
# It does not build with the default compiler (GCC 4.8) on Leap 42.x
BuildRequires:  gcc7-c++

A set of plug-ins for the KDE KIPI interface, used by some KDE imaging


%setup -q

# Remove build time references so build-compare can do its work
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" common/libkipiplugins/tools/

# Workaround for kde#369517 - vkontakte installs translations even if not built
rm -f po/*/kipiplugin_vkontakte.po

%if 0%{?suse_version} < 1500
# gcc 4.8.5 is too old
export CC=gcc-7
export CXX=g++-7
%cmake_kf5 -d build
%make_jobs VERBOSE=1

%kf5_makeinstall -C build

# Not needed, the package doesn't actually provide any shared libraries
rm -f %{buildroot}%{_kf5_libdir}/

%if %{with lang}
%find_lang kipiplugins %{name}.lang

for i in dropbox facebook flashexport flickr googleservices imageshack imgur jalbum kmlexport mediawiki piwigo printimages rajce remotestorage sendimages smug yandexfotki
  %find_lang kipiplugin_$i %{name}.lang

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

%license COPYING*
%dir %{_kf5_iconsdir}/hicolor/24x24
%dir %{_kf5_iconsdir}/hicolor/24x24/apps

%if %{with lang}
%files lang -f %{name}.lang

openSUSE Build Service is sponsored by