From d2c2ba32f9a88dc87481a3409c744fb5f96073a3 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 6 Feb 2014 22:39:44 +0100 Subject: [PATCH] Add systemd rpm scripts --- geoclue2.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/geoclue2.spec b/geoclue2.spec index f060617..4741973 100644 --- a/geoclue2.spec +++ b/geoclue2.spec @@ -1,6 +1,6 @@ Name: geoclue2 Version: 2.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Geolocation service License: GPLv2+ @@ -13,9 +13,13 @@ BuildRequires: intltool BuildRequires: itstool BuildRequires: json-glib-devel BuildRequires: libsoup-devel -BuildRequires: NetworkManager-glib-devel BuildRequires: ModemManager-glib-devel +BuildRequires: NetworkManager-glib-devel +BuildRequires: systemd Requires(pre): shadow-utils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd Requires: dbus %description @@ -70,6 +74,15 @@ getent passwd geoclue >/dev/null || \ -c "User for geoclue" geoclue exit 0 +%post +%systemd_post geoclue.service + +%preun +%systemd_preun geoclue.service + +%postun +%systemd_postun_with_restart geoclue.service + %files %doc COPYING NEWS @@ -94,6 +107,9 @@ exit 0 %changelog +* Thu Feb 06 2014 Kalev Lember - 2.1.2-2 +- Add systemd rpm scripts + * Tue Feb 04 2014 Richard Hughes - 2.1.2-1 - Update to 2.1.2