File libgsignon-glib.spec of Package libgsignon-glib
#
# spec file for package libgsignon-glib
#
# Copyright (c) 2015 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
# 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 dbus_type session
%define _soname 1
Name: libgsignon-glib
Version: 2.4.0
Release: 0
License: LGPL-2.1
Summary: Single signon authentication library for GLib applications
Url: https://gitlab.com/accounts-sso/libgsignon-glib
Group: System/Libraries
Source: %{name}-%{version}.tar.xz
BuildRequires: automake
BuildRequires: gtk-doc
BuildRequires: libtool
BuildRequires: pkgconfig(check)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(pygobject-3.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(python2)
BuildRequires: pkgconfig(python3)
BuildRequires: gobject-introspection
BuildRequires: fdupes
Requires: dbus-1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This project is a library for managing single signon credentilas which can be
used from GLib applications. It is effectively a GLib binding for the D-Bus API
provided by signond.
%package -n %{name}%{_soname}
Summary: Single signon authentication library for GLib Applications
Group: System/Libraries
%description -n %{name}%{_soname}
This package contains the shared libraries for use by applications.
%package -n typelib-1_0-gSignon-1_0
Summary: Library for GLib applications - Introspection Bindings
Group: System/Libraries
%description -n typelib-1_0-gSignon-1_0
This package contains the GObject Introspection bindings for the gsignon-glib
library.
%package -n python-libgsignon
Summary: Python bindings for the Single signon authentication library
Group: System/Libraries
Requires: python(abi) = %{py_ver}
%description -n python-libgsignon
This package contains the python bindings for the Single signon authentication library.
%package -n python3-libgsignon
Summary: Python bindings for the Single signon authentication library
Group: System/Libraries
Requires: python(abi) = %{py3_ver}
%description -n python3-libgsignon
This package contains the python bindings for the Single signon authentication library.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{_soname} = %{version}-%{release}
Requires: python-libgsignon = %{version}
Requires: python3-libgsignon = %{version}
Requires: typelib-1_0-gSignon-1_0 = %{version}
%description devel
This project is a library for managing single signon credentilas which can be
used from GLib applications. It is effectively a GLib binding for the D-Bus API
provided by signond.
%package docs
Summary: Documentation for %{name}
Group: Documentation/HTML
BuildArch: noarch
%description docs
This package contains the documentation for the gsignon-glib library.
%prep
%setup -q
%build
./autogen.sh
make distclean
%global _configure ../configure
mkdir build-python2 build-python3
pushd build-python2/
%configure \
--enable-python \
--enable-dbus-type=%{dbus_type} \
--disable-static \
--enable-gtk-doc
make %{?_smp_mflags}
popd
pushd build-python3/
export PYTHON=python3
%configure \
--enable-python \
--enable-dbus-type=%{dbus_type} \
--disable-static
popd
%install
pushd build-python2/
make DESTDIR=%{buildroot} install %{?_smp_mflags}
popd
pushd build-python3/pygobject/
make DESTDIR=%{buildroot} install %{?_smp_mflags}
popd
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}%{python_sitearch}
%fdupes %{buildroot}%{python3_sitearch}
%post -n %{name}%{_soname} -p /sbin/ldconfig
%postun -n %{name}%{_soname} -p /sbin/ldconfig
%files -n %{name}%{_soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/%{name}.so.*
%files -n typelib-1_0-gSignon-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/gSignon-1.0.typelib
%files -n python-libgsignon
%defattr(-,root,root)
%{python_sitearch}/gi/overrides
%files -n python3-libgsignon
%defattr(-,root,root)
%{python3_sitearch}/gi/overrides
%files devel
%defattr(-,root,root)
%{_bindir}/gsso-example
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/gir-1.0/gSignon-1.0.gir
%files docs
%defattr(-,root,root)
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/%{name}
%doc %{_datadir}/gtk-doc/html/%{name}/*