File deepin-xdg-desktop-portal.spec of Package deepin-xdg-desktop-portal
#
# spec file for package deepin-xdg-desktop-portal
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2023 Hillwood Yang <hillwood@opensuse.org>
#
# 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 xdg-desktop-portal-dde
Name: deepin-xdg-desktop-portal
Version: 1.0.15
Release: 0
Summary: Deepin appearance
License: LGPL-3.0-or-later
Group: System/GUI/Other
URL: https://github.com/linuxdeepin/xdg-desktop-portal-dde
Source: https://github.com/linuxdeepin/xdg-desktop-portal-dde/archive/%{version}/%{_name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-Qt_6_10.patch
# https://github.com/linuxdeepin/xdg-desktop-portal-dde/commit/e524e2d424e942424c3e3b7e7ca8bd5c7d3bf88e
Patch0: fix-Qt_6_10.patch
# PATCH-FIX-UPSTREAM fix-wayland-link-dde_utils-for-Utils-setParentWindow.patch hillwood@opensuse.org
# Fix undefined reference to Utils::setParentWindow(QWindow*, QString const&)
# https://github.com/linuxdeepin/xdg-desktop-portal-dde/pull/86
Patch1: fix-wayland-link-dde_utils-for-Utils-setParentWindow.patch
BuildRequires: extra-cmake-modules
BuildRequires: qt6-tools-linguist
BuildRequires: qt6-wayland
BuildRequires: cmake(Dtk6Declarative)
BuildRequires: cmake(KF6I18n)
BuildRequires: cmake(KF6Declarative)
BuildRequires: cmake(KF6Notifications)
BuildRequires: cmake(KWayland)
BuildRequires: cmake(Qt6GuiPrivate)
BuildRequires: cmake(Qt6WaylandClientPrivate)
BuildRequires: cmake(Qt6WaylandScannerTools)
BuildRequires: cmake(TreelandProtocols)
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-protocols)
BuildRequires: pkgconfig(wlr-protocols)
BuildRequires: pkgconfig(dtk6core)
BuildRequires: pkgconfig(dtk6widget)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Widgets)
BuildRequires: pkgconfig(Qt6WaylandClient)
%description
A backend implement for xdg-desktop-portal on Deepin desktop environment
%lang_package
%prep
%autosetup -p1 -n %{_name}-%{version}
sed -i 's/lrelease/lrelease6/' misc/translations/translate_generation.sh
%build
%cmake
%cmake_build
%install
%cmake_install
%find_lang %{_name} --with-qt
%files
%license LICENSE
%doc README.md README.zh_CN.md
%{_libdir}/libxdg-desktop-portal-dde-wayland.so
%{_libexecdir}/%{_name}
%{_datadir}/dbus-1/services/org.freedesktop.impl.portal.desktop.dde.service
%dir %{_datadir}/xdg-desktop-portal
%dir %{_datadir}/xdg-desktop-portal/portals
%{_datadir}/xdg-desktop-portal/portals/dde.portal
%dir %{_datadir}/xdg-desktop-portal
%{_datadir}/xdg-desktop-portal/dde-portals.conf
%{_userunitdir}/%{_name}.service
%files lang -f %{_name}.lang
%dir %{_datadir}/%{_name}
%dir %{_datadir}/%{_name}/translations
%changelog