File deepin-polkit-agent.spec of Package deepin-polkit-agent
#
# spec file for package deepin-polkit-agent
#
# Copyright (c) 2024 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 _name dde-polkit-agent
Name: deepin-polkit-agent
Version: 6.0.12
Release: 0
Summary: Deepin Polkit Agent
License: GPL-3.0-or-later
Group: System/GUI/Other
URL: https://github.com/linuxdeepin/dde-polkit-agent
Source0: https://github.com/linuxdeepin/dde-polkit-agent/archive/%{version}/%{_name}-%{version}.tar.gz
BuildRequires: dtk6core
BuildRequires: qt6-tools-linguist
BuildRequires: cmake(DDEShell)
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Linguist)
BuildRequires: pkgconfig(Qt6Network)
BuildRequires: pkgconfig(Qt6Qml)
BuildRequires: pkgconfig(Qt6Quick)
BuildRequires: pkgconfig(Qt6Widgets)
BuildRequires: pkgconfig(Qt6Xml)
BuildRequires: pkgconfig(dtk6widget) >= 5.0.0
BuildRequires: pkgconfig(polkit-qt6-1)
Recommends: %{name}-lang
%description
DDE Polkit Agent is the polkit agent used in Deepin Desktop Environment.
%package devel
Summary: Development package for %{name}
Group: Development/Languages/C and C++
Requires: %{name} = %{version}-%{release}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%lang_package
%prep
%autosetup -p1 -n %{_name}-%{version}
# sed -i 's|lrelease|lrelease6|' translate_generation.sh
sed -i 's/bool is_deepin = true/bool is_deepin = false/' policykitlistener.cpp
# sed -i '/setCancel/d' policykitlistener.cpp
# sed -i 's/qdbusxml2cpp/qdbusxml2cpp6/g' CMakeLists.txt
%build
%cmake
%cmake_build
%install
%cmake_install
%find_lang %{_name} --with-qt
%files
%defattr(-,root,root,-)
%doc README.md
%license LICENSE
%dir %{_prefix}/lib/polkit-1-dde
%{_prefix}/lib/polkit-1-dde/%{_name}
%files lang -f %{_name}.lang
%defattr(-,root,root,-)
%dir %{_datadir}/%{_name}
%dir %{_datadir}/%{_name}/translations
%{_datadir}/%{_name}/translations/%{_name}.qm
%files devel
%defattr(-,root,root,-)
%{_includedir}/dpa
%changelog