xdg-desktop-portal-gtk/xdg-desktop-portal-gtk.spec
Michael Catanzaro 3badeb4695 Improve Supplements
This backend is needed for GTK 4, not just GTK 3. It's needed for RHEL
too, not just Fedora. And it's needed even if you don't use flatpak or
snap, because host apps can use portals too.

https://pagure.io/fedora-workstation/issue/298
2022-04-10 17:11:37 +02:00

81 lines
2.1 KiB
RPMSpec

# Required for xdp_impl_background_emit_running_applications_changed
%global xdg_desktop_portal_version 1.5.4
Name: xdg-desktop-portal-gtk
Version: 1.12.0
Release: %autorelease
Summary: Backend implementation for xdg-desktop-portal using GTK+
License: LGPLv2+
URL: https://github.com/flatpak/%{name}
Source0: https://github.com/flatpak/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: make
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gsettings-desktop-schemas)
BuildRequires: pkgconfig(gtk+-unix-print-3.0)
BuildRequires: pkgconfig(xdg-desktop-portal) >= %{xdg_desktop_portal_version}
BuildRequires: systemd-rpm-macros
Requires: dbus
Requires: gsettings-desktop-schemas
Requires: xdg-desktop-portal >= %{xdg_desktop_portal_version}
# This portal is recommended if you have installed any app that uses GTK. (It's
# also recommended if you have any such app installed via flatpak or snap, but
# that is impossible to detect here.)
Supplements: gtk3
Supplements: gtk4
%description
A backend implementation for xdg-desktop-portal that is using GTK+.
%prep
%autosetup -p1
%build
# All backends that are disabled are instead provided by
# xdg-desktop-portal-gnome, to keep this package free of GNOME dependencies.
# The appchooser and settings backends are enabled for non-GNOME GTK
# applications.
%configure \
--disable-silent-rules \
--enable-appchooser \
--enable-settings \
--disable-background \
--disable-lockdown \
--disable-screencast \
--disable-screenshot \
--disable-wallpaper
%make_build
%install
%make_install
%find_lang %{name}
%post
%systemd_user_post %{name}.service
%preun
%systemd_user_preun %{name}.service
%files -f %{name}.lang
%license COPYING
%doc NEWS
%{_libexecdir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service
%{_datadir}/xdg-desktop-portal/portals/gtk.portal
%{_userunitdir}/%{name}.service
%changelog
%autochangelog