From 3769bb02beaf852ed8a8c328613255bfb969288b1ba7e1f506988f8d93099692 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 14 Jan 2021 18:28:02 +0000 Subject: [PATCH] Accepting request 863082 from home:fcrozat:branches:GNOME:Factory - Ensure systemd rpm macros are called at install/uninstall times for systemd user services. - Add BuildRequires on systemd-rpm-macros. OBS-URL: https://build.opensuse.org/request/show/863082 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/xdg-desktop-portal?expand=0&rev=38 --- xdg-desktop-portal.changes | 7 +++++++ xdg-desktop-portal.spec | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/xdg-desktop-portal.changes b/xdg-desktop-portal.changes index 1b31abc..31af29c 100644 --- a/xdg-desktop-portal.changes +++ b/xdg-desktop-portal.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 14 10:49:29 UTC 2021 - Frederic Crozat + +- Ensure systemd rpm macros are called at install/uninstall times + for systemd user services. +- Add BuildRequires on systemd-rpm-macros. + ------------------------------------------------------------------- Thu Jan 7 20:11:15 UTC 2021 - Bjørn Lie diff --git a/xdg-desktop-portal.spec b/xdg-desktop-portal.spec index 0b9dbf0..f44b8d2 100644 --- a/xdg-desktop-portal.spec +++ b/xdg-desktop-portal.spec @@ -27,6 +27,7 @@ Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz BuildRequires: libtool BuildRequires: pkgconfig +BuildRequires: systemd-rpm-macros BuildRequires: xmlto BuildRequires: pkgconfig(flatpak) BuildRequires: pkgconfig(fontconfig) @@ -84,6 +85,12 @@ export LANG=C.UTF-8 %make_install %find_lang %{name} +%post +%systemd_user_post %{name}.service xdg-document-portal.service xdg-permission-store.service + +%preun +%systemd_user_preun %{name}.service xdg-document-portal.service xdg-permission-store.service + %files %license COPYING %dir %{_datadir}/dbus-1 @@ -95,11 +102,11 @@ export LANG=C.UTF-8 %{_datadir}/dbus-1/services/org.freedesktop.portal.Documents.service %{_datadir}/doc/xdg-desktop-portal/ %{_libexecdir}/xdg-desktop-portal -%{_prefix}/lib/systemd/user/xdg-document-portal.service -%{_prefix}/lib/systemd/user/xdg-permission-store.service %{_libexecdir}/xdg-document-portal %{_libexecdir}/xdg-permission-store %{_userunitdir}/xdg-desktop-portal.service +%{_userunitdir}/xdg-document-portal.service +%{_userunitdir}/xdg-permission-store.service %files devel %{_datadir}/pkgconfig/xdg-desktop-portal.pc