File kpmcore.spec of Package kpmcore
#
# spec file for package kpmcore
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%global sover 10
%bcond_without lang
Name: kpmcore
Version: 4.2.0
Release: 0
Summary: KDE Partition Manager core library
License: GPL-3.0-only
Group: Productivity/Office/Other
URL: https://www.kde.org
Source: https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
BuildRequires: extra-cmake-modules
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: cmake(KF5Auth)
BuildRequires: cmake(KF5CoreAddons) >= 5.56.0
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5WidgetsAddons)
BuildRequires: cmake(PolkitQt5-1)
BuildRequires: cmake(Qt5Core) >= 5.14.0
BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: pkgconfig(blkid) >= 2.33.2
%description
Library for managing partitions. Common code for KDE Partition Manager and other projects.
%package devel
Summary: Development package for KDE Partition Manager core library
Group: Development/Languages/C and C++
Requires: libkpmcore%{sover} = %{version}
%description devel
Library for managing partitions. Common code for KDE Partition Manager and other projects.
Development package for kpmcore.
%package -n libkpmcore%{sover}
Summary: KDE Partition Manager core library
Group: System/Libraries
Requires: %{name} >= %{version}
%description -n libkpmcore%{sover}
Library for managing partitions. Common code for KDE Partition Manager and other projects.
Main kpmcore library.
%lang_package
%prep
%setup -q
%build
%cmake_kf5 -d build
%cmake_build
%install
%kf5_makeinstall -C build
%if %{with lang}
%find_lang kpmcore
%endif
%post -n libkpmcore%{sover} -p /sbin/ldconfig
%postun -n libkpmcore%{sover} -p /sbin/ldconfig
%files
%license LICENSES/*
%{_kf5_dbuspolicydir}/org.kde.kpmcore.*.conf
%{_kf5_libdir}/libexec/kpmcore_externalcommand
%{_kf5_plugindir}/*.so
%{_kf5_sharedir}/dbus-1/system-services/org.kde.kpmcore.helperinterface.service
%{_kf5_sharedir}/polkit-1/actions/org.kde.kpmcore.externalcommand.policy
%files -n libkpmcore%{sover}
%license LICENSES/*
%{_kf5_libdir}/libkpmcore.so.%{sover}
%{_kf5_libdir}/libkpmcore.so.%{version}
%files devel
%{_includedir}/kpmcore/
%{_kf5_cmakedir}/KPMcore/
%{_kf5_libdir}/libkpmcore.so
%if %{with lang}
%files lang -f %{name}.lang
%endif
%changelog