File kio-admin.spec of Package kio-admin
#
# spec file for package kio-admin
#
# Copyright (c) 2022 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/
#
%bcond_without released
Name: kio-admin
Version: 1.0.0
Release: 0
Summary: Manage files as administrator using the admin:// KIO protocol
# GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
License: GPL-2.0-or-later OR GPL-3.0-only
URL: https://www.kde.org
Source: https://download.kde.org/stable/kio-admin/%{name}-%{version}.tar.zst
%if %{with released}
Source1: https://download.kde.org/stable/kio-admin/%{name}-%{version}.tar.zst.sig
Source2: kio-admin.keyring
%endif
# PATCH-FIX-OPENSUSE
Patch1: 0001-Lower-minimum-CMake-version-to-3.17.patch
BuildRequires: extra-cmake-modules
BuildRequires: zstd
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5KIO)
BuildRequires: cmake(PolkitQt5-1)
%description
kio-admin implements a new protocol "admin:///" which gives administrative access
to the entire system. This is achieved by talking, over dbus, with a root-level
helper binary that in turn uses existing KIO infrastructure to run file://
operations in root-scope.
%lang_package
%prep
%autosetup -p1 -n %{name}-v%{version}
%build
%cmake_kf5 -d build
%cmake_build
%install
%kf5_makeinstall -C build
%find_lang kio5_admin %{name}.lang
%files
%license LICENSES/*
%{_kf5_appstreamdir}/org.kde.kio.admin.metainfo.xml
%dir %{_kf5_plugindir}/kf5/kfileitemaction/
%{_kf5_plugindir}/kf5/kfileitemaction/kio-admin.so
%dir %{_kf5_plugindir}/kf5/kio/
%{_kf5_plugindir}/kf5/kio/admin.so
%{_kf5_libexecdir}/kio-admin-helper
%{_kf5_dbuspolicydir}/org.kde.kio.admin.conf
%{_kf5_sharedir}/dbus-1/system-services/org.kde.kio.admin.service
%{_kf5_sharedir}/polkit-1/actions/org.kde.kio.admin.policy
%files lang -f %{name}.lang
%changelog