File partitionmanager.spec of Package partitionmanager

#
# spec file for package partitionmanager
#
# 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/
#


%define _kf5_min_version 5.71.0
%define _qt5_min_version 5.10.0
%bcond_without lang
Name:           partitionmanager
Version:        3.3.1
Release:        0
Summary:        Easily manage disks, partitions and file systems on your KDE Desktop
License:        GPL-3.0-only
Group:          Productivity/File utilities
URL:            https://www.kde.org/applications/system/kdepartitionmanager/
Source:         https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
BuildRequires:  extra-cmake-modules >= %{_kf5_min_version}
BuildRequires:  kf5-filesystem
BuildRequires:  libatasmart-devel
BuildRequires:  libblkid-devel
BuildRequires:  parted-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(KF5Config) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5ConfigWidgets) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5CoreAddons) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5Crash) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5DBusAddons) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5DocTools) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5I18n) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5JobWidgets) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5KIO) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5WidgetsAddons) >= %{_kf5_min_version}
BuildRequires:  cmake(KF5XmlGui) >= %{_kf5_min_version}
BuildRequires:  cmake(KPMcore) >= 4.2.0
BuildRequires:  cmake(Qt5Core) >= %{_qt5_min_version}
BuildRequires:  cmake(Qt5Gui) >= %{_qt5_min_version}
BuildRequires:  cmake(Qt5Widgets) >= %{_qt5_min_version}
Recommends:     %{name}-lang = %{version}
# A file moved from -lang into the main package
Conflicts:      %{name}-lang < %{version}-%{release}
Obsoletes:      partitionmanager5 < %{version}
Provides:       partitionmanager5 = %{version}

%description
This software allows you to manage your disks, partitions and
file systems: Create, resize, delete, copy, backup and restore
partitions with a large number of supported file systems (ext2/3,
reiserfs, NTFS, FAT32 and more). It makes use of external
programs to get its job done, so you might have to install
additional software (preferably packages from your distribution)
to make use of all features and get full support for all file
systems.

%lang_package

%prep
%setup -q

%build
  %cmake_kf5 -d build -- -DKDE_INSTALL_USE_QT_SYS_PATHS=OFF
  %cmake_build

%install
  %kf5_makeinstall -C build
  %suse_update_desktop_file org.kde.partitionmanager
  %if %{with lang}
    %find_lang partitionmanager
    %{kf5_find_htmldocs}
  %endif

%files
%doc README.md
%doc %lang(en) %{_kf5_htmldir}/en/partitionmanager/
# FIXME: workaround. Shall be fixed in kf5-filesystem instead.
%dir %{_kf5_configkcfgdir}/
%license LICENSES/*
%{_kf5_applicationsdir}/org.kde.partitionmanager.desktop
%{_kf5_appstreamdir}/org.kde.partitionmanager.appdata.xml
%{_kf5_bindir}/partitionmanager
%{_kf5_configkcfgdir}/partitionmanager.kcfg
%{_kf5_iconsdir}/hicolor/*/apps/partitionmanager.svg
%{_kf5_kxmlguidir}/partitionmanager/

%if %{with lang}
%files lang -f partitionmanager.lang
%endif

%changelog
openSUSE Build Service is sponsored by