File gsignond.spec of Package gsignond
#
# spec file for package gsignond
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global __provides_exclude_from ^%{_libdir}/.*/gplugins/.*\\.so$
%define _typelibdir %(pkg-config --variable=typelibdir gobject-introspection-1.0)
%define _girdir %(pkg-config --variable=girdir gobject-introspection-1.0)
%define typelib typelib-1_0-gSignond-1_0
%define soname libgsignond-common
%define sover 1
Name: gsignond
Version: 1.2.0
Release: 0
Summary: Online Accounts Sign-on glib daemon
License: LGPL-2.1-or-later
Group: Productivity/Networking/Other
URL: https://gitlab.com/accounts-sso/gsignond
Source: https://gitlab.com/accounts-sso/gsignond/-/archive/%{version}/%{name}-%{version}.tar.gz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE gsignond-1.0.5_storagedir.patch avvissu@yandex.by -- Change the database path to not use SUID.
Patch0: gsignond-1.0.5_storagedir.patch
BuildRequires: gtk-doc
BuildRequires: meson >= 0.44.4
BuildRequires: pkgconfig
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.51.3
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libsecret-1)
BuildRequires: pkgconfig(sqlite3)
Requires: gsignond-config = %{version}
Recommends: gsignond-config-upstream
Recommends: gsignond-plugins = %{version}
Conflicts: signond
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} >= 120200
BuildRequires: vala >= 0.28.0
%endif
%description
The GSignOn daemon is a D-Bus service which performs user
authentication on behalf of its clients.
%package -n %{soname}%{sover}
Summary: The core library for gsignond
Group: System/Libraries
Provides: lib%{name}%{sover} = %{version}
%description -n %{soname}%{sover}
Online Accounts Sign-on glib daemon.
This package contains the shared library.
%package -n %{typelib}
Summary: Library for GLib applications -- Introspection Bindings
Group: System/Libraries
%description -n %{typelib}
Online Accounts Sign-on glib daemon.
This package contains the GObject Introspection bindings for the
gsignond.
%package devel
Summary: Development files for gsignond
Group: Development/Libraries/C and C++
Requires: %{soname}%{sover} = %{version}
%description devel
Online Accounts Sign-on glib daemon.
This package contains header files and libraries needed to develop
application that use gsignond.
%package doc
Summary: Documentation for gsignond
Group: Documentation/HTML
BuildArch: noarch
%description doc
Online Accounts Sign-on glib daemon.
Developer documentation for developing plugins and extensions.
%package config-upstream
Summary: Default configuration for gsignond
Group: Productivity/Networking/Other
Supplements: packageand(%{name}:config-upstream)
Conflicts: %{name}-config
Provides: %{name}-config = %{version}
BuildArch: noarch
%description config-upstream
Online Accounts Sign-on glib daemon.
This package is not required if you need to use other configuration
settings.
%package plugins
Summary: A collection of plugins for gsignond
Group: System/Libraries
Requires: %{name} = %{version}
%description plugins
Online Accounts Sign-on glib daemon.
This package contains a collection of plugins: digest, password, ssotest
and etc.
%lang_package
%prep
%setup -q
%patch0 -p1
%build
%meson \
-Dextension=desktop \
-Dbus_type=session \
-Denable_storagedir= \
-Denable_doc=true
%meson_build
%install
%meson_install
chmod u-s %{buildroot}%{_bindir}/%{name}
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{soname}%{sover} -p /sbin/ldconfig
%postun -n %{soname}%{sover} -p /sbin/ldconfig
%files
%license COPYING.LIB
%{_bindir}/%{name}
%{_libdir}/%{name}/
%{_datadir}/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service
%{_datadir}/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service
%dir %{_libdir}/%{name}
%exclude %{_libdir}/%{name}/gplugins
%files -n %{soname}%{sover}
%{_libdir}/%{soname}.so.*
%files -n %{typelib}
%{_typelibdir}/GSignond-1.0.typelib
%files devel
%{_includedir}/%{name}/
%{_libdir}/%{soname}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_girdir}/GSignond-1.0.gir
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} >= 120200
%dir %{_datadir}/vala/vapi/
%{_datadir}/vala/vapi/%{name}.deps
%{_datadir}/vala/vapi/%{name}.vapi
%endif
%files doc
%{_datadir}/gtk-doc/html/%{name}/
%files config-upstream
%config(noreplace) %{_sysconfdir}/%{name}.conf
%files plugins
%{_libdir}/%{name}/gplugins/
%changelog