Accepting request 107164 from home:vuntz:branches:GNOME:Factory

Fix systemd-related packaging

OBS-URL: https://build.opensuse.org/request/show/107164
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/accountsservice?expand=0&rev=21
This commit is contained in:
Vincent Untz 2012-02-27 23:11:29 +00:00 committed by Git OBS Bridge
parent 9d3bb454be
commit eaa41826a7
2 changed files with 25 additions and 4 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Feb 27 13:21:43 UTC 2012 - vuntz@opensuse.org
- Fix systemd-related packaging:
+ Use %{?systemd_requires}.
+ Call %service_{add,del}_* macros in scriptlets for
accounts-daemon.service.
- Remove xz BuildRequires now that it comes for free in the build
system.
-------------------------------------------------------------------
Thu Dec 8 08:55:14 UTC 2011 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package accountsservice
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -31,14 +31,13 @@ Patch0: accountsservice-sysconfig.patch
BuildRequires: gnome-common
BuildRequires: gobject-introspection-devel
BuildRequires: intltool
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires: xz
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(polkit-gobject-1)
BuildRequires: pkgconfig(systemd)
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description
The accountsservice server provides a set of D-Bus interfaces for
@ -100,6 +99,18 @@ rm -f %{buildroot}%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%pre
%service_add_pre accounts-daemon.service
%post
%service_add_post accounts-daemon.service
%preun
%service_del_preun accounts-daemon.service
%postun
%service_del_postun accounts-daemon.service
%post -n libaccountsservice0 -p /sbin/ldconfig
%postun -n libaccountsservice0 -p /sbin/ldconfig
@ -107,7 +118,7 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
/lib/systemd/system/accounts-daemon.service
%{_unitdir}/accounts-daemon.service
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.Accounts.conf
%{_libexecdir}/accounts-daemon
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.xml