File gsignond.spec of Package gsignond

#
# spec file for package gsignond
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


%define typelib typelib-1_0-gSignond-1_0
%define soname libgsignond-common
%define sover 0
Name:           gsignond
Version:        1.0.5+git20160714
Release:        0
Summary:        Online Accounts Sign-on glib daemon
License:        LGPL-2.1+
Group:          Productivity/Networking/Other
Url:            https://gitlab.com/accounts-sso/gsignond
Source:         %{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:  autoconf
BuildRequires:  automake
BuildRequires:  gtk-doc
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(sqlite3)
Requires:       %{name}-config = %{version}
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
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}
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:      otherproviders(%{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.

%lang_package

%prep
%setup -q
%patch0 -p1

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
  --enable-introspection=yes \
  --enable-dbus-type=session \
  --enable-storagedir=""     \
  --enable-gtk-doc
make %{?_smp_mflags}

%install
%make_install

if [ -u %{buildroot}%{_bindir}/%{name} ]; then
    chmod u-s %{buildroot}%{_bindir}/%{name}
fi

find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{soname}%{sover} -p /sbin/ldconfig
%postun -n %{soname}%{sover} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING*
%{_bindir}/%{name}
%{_libdir}/%{name}/
%{_datadir}/dbus-1/services/*.gSingleSignOn*.service

%files -n %{soname}%{sover}
%defattr(-,root,root)
%{_libdir}/%{soname}.so.%{sover}*

%files -n %{typelib}
%defattr(-,root,root)
%{_libdir}/girepository-1.0/gSignond-1.0.typelib

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/
%{_libdir}/%{soname}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/dbus-1/interfaces/*SSO*.xml
%{_datadir}/gir-1.0/gSignond-1.0.gir
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
%dir %{_datadir}/vala/vapi/
%{_datadir}/vala/vapi/%{name}*
%endif

%files doc
%defattr(-,root,root)
%{_datadir}/gtk-doc/html/%{name}/

%files config-upstream
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/%{name}.conf

%changelog
openSUSE Build Service is sponsored by