Blame accountsservice.spec

Adrian Schröter 24cc53
#
Adrian Schröter 24cc53
# spec file for package accountsservice
Adrian Schröter 24cc53
#
Adrian Schröter 24cc53
# Copyright (c) 2022 SUSE LLC
Adrian Schröter 24cc53
#
Adrian Schröter 24cc53
# All modifications and additions to the file contributed by third parties
Adrian Schröter 24cc53
# remain the property of their copyright owners, unless otherwise agreed
Adrian Schröter 24cc53
# upon. The license for this file, and modifications and additions to the
Adrian Schröter 24cc53
# file, is the same license as for the pristine package itself (unless the
Adrian Schröter 24cc53
# license for the pristine package is not an Open Source License, in which
Adrian Schröter 24cc53
# case the license is the MIT License). An "Open Source License" is a
Adrian Schröter 24cc53
# license that conforms to the Open Source Definition (Version 1.9)
Adrian Schröter 24cc53
# published by the Open Source Initiative.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Adrian Schröter 24cc53
#
Adrian Schröter 24cc53
Adrian Schröter 24cc53
Adrian Schröter 24cc53
# allow to not build vala binding
Adrian Schröter 24cc53
%bcond_without vala
Adrian Schröter 24cc53
Adrian Schröter 24cc53
Name:           accountsservice
Adrian Schröter 24cc53
Version:        22.08.8
Adrian Schröter 24cc53
Release:        0
Adrian Schröter 24cc53
Summary:        D-Bus Service to Manipulate User Account Information
Adrian Schröter 24cc53
License:        GPL-3.0-or-later
Adrian Schröter 24cc53
Group:          System/Daemons
Adrian Schröter 24cc53
URL:            https://www.freedesktop.org/wiki/Software/AccountsService/
Adrian Schröter 24cc53
#!RemoteAsset: sha256:909997a76919fe7dc138a9a01cea70bd622d5a932dbc9fb13010113023a7a391
Adrian Schröter 24cc53
Source0:        https://www.freedesktop.org/software/accountsservice/%{name}-%{version}.tar.xz
Adrian Schröter 24cc53
Adrian Schröter 24cc53
# WARNING: do not remove/significantly change patch0 without updating the relevant patch in gdm too
Adrian Schröter 24cc53
# PATCH-FIX-OPENSUSE accountsservice-sysconfig.patch bnc#688071 vuntz@opensuse.org -- Read/write autologin configuration from sysconfig, like gdm (see gdm-sysconfig-settings.patch) WAS PATCH-FIX-OPENSUSE
Adrian Schröter 24cc53
Patch0:         accountsservice-sysconfig.patch
Adrian Schröter 24cc53
# PATCH-FIX-OPENSUSE accountsservice-filter-suse-accounts.patch vuntz@opensuse.org -- Filter out some system users that are specific to openSUSE
Adrian Schröter 24cc53
Patch1:         accountsservice-filter-suse-accounts.patch
Adrian Schröter 24cc53
# PATCH-FIX-OPENSUSE harden_accounts-daemon.service.patch jsegitz@suse.com -- For details please see https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
Adrian Schröter 24cc53
Patch2:         harden_accounts-daemon.service.patch
Adrian Schröter 24cc53
Adrian Schröter 24cc53
## SLE and Leap only patches start at 1000
Adrian Schröter 24cc53
# PATCH-FEATURE-SLE as-fate318433-prevent-same-account-multi-logins.patch fate#318433 cxiong@suse.com -- prevent multiple simultaneous login.
Adrian Schröter 24cc53
Patch1000:      as-fate318433-prevent-same-account-multi-logins.patch
Adrian Schröter 24cc53
Adrian Schröter 24cc53
BuildRequires:  gtk-doc
Adrian Schröter 24cc53
BuildRequires:  meson
Adrian Schröter 24cc53
BuildRequires:  pkgconfig
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(dbus-1)
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(gio-2.0) >= 2.63.5
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(gio-unix-2.0)
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(glib-2.0) >= 2.63.5
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(gobject-introspection-1.0)
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(libsystemd) >= 186
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(polkit-gobject-1)
Adrian Schröter 24cc53
BuildRequires:  pkgconfig(systemd)
Adrian Schröter 24cc53
%{?systemd_ordering}
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%description
Adrian Schröter 24cc53
The accountsservice server provides a set of D-Bus interfaces for
Adrian Schröter 24cc53
querying and manipulating user account information.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
The implementation is based on the useradd, usermod and userdel
Adrian Schröter 24cc53
commands.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%package -n libaccountsservice0
Adrian Schröter 24cc53
Summary:        Client library for the user account information manipulation D-Bus service
Adrian Schröter 24cc53
# Clients do need the server to do something useful
Adrian Schröter 24cc53
Group:          System/Libraries
Adrian Schröter 24cc53
Requires:       %{name}
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%description -n libaccountsservice0
Adrian Schröter 24cc53
The accountsservice server provides a set of D-Bus interfaces for
Adrian Schröter 24cc53
querying and manipulating user account information.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
This package provides a client library for the service.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%package -n typelib-1_0-AccountsService-1_0
Adrian Schröter 24cc53
Summary:        Introspection bindings for the user account information manipulation service
Adrian Schröter 24cc53
Group:          System/Libraries
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%description -n typelib-1_0-AccountsService-1_0
Adrian Schröter 24cc53
The accountsservice server provides a set of D-Bus interfaces for
Adrian Schröter 24cc53
querying and manipulating user account information.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
This package provides the GObject Introspection bindings for the
Adrian Schröter 24cc53
client library.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%package devel
Adrian Schröter 24cc53
Summary:        Header files for the user account information manipulation service
Adrian Schröter 24cc53
Group:          Development/Libraries/C and C++
Adrian Schröter 24cc53
Requires:       libaccountsservice0 = %{version}
Adrian Schröter 24cc53
Requires:       typelib-1_0-AccountsService-1_0 = %{version}
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%description devel
Adrian Schröter 24cc53
The accountsservice server provides a set of D-Bus interfaces for
Adrian Schröter 24cc53
querying and manipulating user account information.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%if %{with vala}
Adrian Schröter 24cc53
%package vala
Adrian Schröter 24cc53
Summary:        Vala bindings for accountsservice
Adrian Schröter 24cc53
Group:          Development/Libraries/C and C++
Adrian Schröter 24cc53
Requires:       libaccountsservice0 = %{version}
Adrian Schröter 24cc53
Requires:       typelib-1_0-AccountsService-1_0 = %{version}
Adrian Schröter 24cc53
BuildRequires:  vala
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%description vala
Adrian Schröter 24cc53
The accountsservice server provides a set of D-Bus interfaces for
Adrian Schröter 24cc53
querying and manipulating user account information.
Adrian Schröter 24cc53
Adrian Schröter 24cc53
This package contains the Vala bindings for accountservice.
Adrian Schröter 24cc53
%endif
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%lang_package
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%prep
Adrian Schröter 24cc53
%setup -q
Adrian Schröter 24cc53
%patch0 -p1
Adrian Schröter 24cc53
%patch1 -p1
Adrian Schröter 24cc53
%patch2 -p1
Adrian Schröter 24cc53
Adrian Schröter 24cc53
# SLE and Leap patches start at 1000
Adrian Schröter 24cc53
%if 0%{?sle_version}
Adrian Schröter 24cc53
%patch1000 -p1
Adrian Schröter 24cc53
%endif
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%build
Adrian Schröter 24cc53
%meson \
Adrian Schröter 24cc53
	-Dintrospection=true \
Adrian Schröter 24cc53
	-Dgtk_doc=true \
Adrian Schröter 24cc53
%if %{with vala}
Adrian Schröter 24cc53
	-Dvapi=true \
Adrian Schröter 24cc53
%else
Adrian Schröter 24cc53
	-Dvapi=false \
Adrian Schröter 24cc53
%endif
Adrian Schröter 24cc53
	%{nil}
Adrian Schröter 24cc53
%meson_build
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%install
Adrian Schröter 24cc53
%meson_install
Adrian Schröter 24cc53
%find_lang accounts-service
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%pre
Adrian Schröter 24cc53
%service_add_pre accounts-daemon.service
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%post
Adrian Schröter 24cc53
%service_add_post accounts-daemon.service
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%preun
Adrian Schröter 24cc53
%service_del_preun accounts-daemon.service
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%postun
Adrian Schröter 24cc53
%service_del_postun accounts-daemon.service
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%post -n libaccountsservice0 -p /sbin/ldconfig
Adrian Schröter 24cc53
%postun -n libaccountsservice0 -p /sbin/ldconfig
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%files
Adrian Schröter 24cc53
%license COPYING
Adrian Schröter 24cc53
%doc README.md
Adrian Schröter 24cc53
%{_unitdir}/accounts-daemon.service
Adrian Schröter 24cc53
%{_libexecdir}/accounts-daemon
Adrian Schröter 24cc53
%{_datadir}/dbus-1/system.d/org.freedesktop.Accounts.conf
Adrian Schröter 24cc53
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.xml
Adrian Schröter 24cc53
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.User.xml
Adrian Schröter 24cc53
%{_datadir}/dbus-1/system-services/org.freedesktop.Accounts.service
Adrian Schröter 24cc53
%{_datadir}/polkit-1/actions/org.freedesktop.accounts.policy
Adrian Schröter 24cc53
# User templates
Adrian Schröter 24cc53
%dir %{_datadir}/accountsservice
Adrian Schröter 24cc53
%{_datadir}/accountsservice/user-templates
Adrian Schröter 24cc53
# Directories where the server stores user data
Adrian Schröter 24cc53
%dir %{_localstatedir}/lib/AccountsService
Adrian Schröter 24cc53
%dir %{_localstatedir}/lib/AccountsService/users
Adrian Schröter 24cc53
%dir %{_localstatedir}/lib/AccountsService/icons
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%files -n libaccountsservice0
Adrian Schröter 24cc53
%{_libdir}/*.so.0*
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%files -n typelib-1_0-AccountsService-1_0
Adrian Schröter 24cc53
%{_libdir}/girepository-1.0/AccountsService-1.0.typelib
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%files devel
Adrian Schröter 24cc53
%doc AUTHORS TODO
Adrian Schröter 24cc53
%doc %{_datadir}/gtk-doc/html/lib%{name}/
Adrian Schröter 24cc53
%{_libdir}/*.so
Adrian Schröter 24cc53
%{_libdir}/pkgconfig/accountsservice.pc
Adrian Schröter 24cc53
%{_includedir}/accountsservice-1.0/
Adrian Schröter 24cc53
%{_datadir}/gir-1.0/AccountsService-1.0.gir
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%if %{with vala}
Adrian Schröter 24cc53
%files vala
Adrian Schröter 24cc53
%dir %{_datadir}/vala/vapi
Adrian Schröter 24cc53
%{_datadir}/vala/vapi/accountsservice.deps
Adrian Schröter 24cc53
%{_datadir}/vala/vapi/accountsservice.vapi
Adrian Schröter 24cc53
%endif
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%files lang -f accounts-service.lang
Adrian Schröter 24cc53
Adrian Schröter 24cc53
%changelog