File libaccounts-glib.spec of Package libaccounts-glib
#
# spec file for package libaccounts-glib
#
# Copyright (c) 2014 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 _soname 0
Name: libaccounts-glib
Version: 1.17
Release: 0
Summary: Account management library for GLib Applications
License: LGPL-2.0
Group: System/Libraries
Url: https://code.google.com/p/accounts-sso/
Source: libaccounts-glib-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gtk-doc
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: python3-gobject
BuildRequires: pkgconfig(check)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pygobject-3.0)
BuildRequires: pkgconfig(python2)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(sqlite3)
%description
This package contains the shared libraries for use by applications.
%package -n libaccounts-glib%{_soname}
Summary: Account management library for GLib Applications
Group: System/Libraries
%description -n libaccounts-glib%{_soname}
This package contains the shared libraries for use by applications.
%package -n python-libaccounts
Summary: Python bindings for the Account management library
Group: System/Libraries
Requires: python(abi) = %{py_ver}
%description -n python-libaccounts
This package contains the python bindings for the account management library.
%package -n python3-libaccounts
Summary: Python bindings for the Account management library
Group: System/Libraries
Requires: python(abi) = %{py3_ver}
%description -n python3-libaccounts
This package contains the python bindings for the account management library.
%package -n typelib-1_0-Accounts-1_0
Summary: Account management library for GLib Applications - Introspection Bindings
Group: System/Libraries
%description -n typelib-1_0-Accounts-1_0
This package contains the GObject Introspection bindings for the accounts-glib
library.
%package devel
Summary: Development files for libaccounts-glib%{_soname}
Group: Development/Libraries/C and C++
Requires: libaccounts-glib%{_soname} = %{version}
Requires: python-libaccounts = %{version}
Requires: python3-libaccounts = %{version}
Requires: typelib-1_0-Accounts-1_0 = %{version}
%description devel
This package contains the development files for the accounts-glib library.
%package docs
Summary: Documentation for libaccounts-glib%{_soname}
Group: Documentation/HTML
BuildArch: noarch
%description docs
This package contains the documentation for the accounts-glib library.
%package tools
Summary: Tools for libaccounts-glib%{_soname}
Group: Development/Tools/Other
Requires: libaccounts-glib%{_soname} = %{version}-%{release}
%description tools
This package contains the tools for the accounts-glib library.
%prep
%setup -q
%build
autoreconf -vfi
%global _configure ../configure
mkdir build-python2 build-python3
pushd build-python2/
%configure --disable-static --enable-gtk-doc
make %{?_smp_mflags}
popd
pushd build-python3/
export PYTHON=python3
%configure --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
# Remove Meego specific file
rm -v %{buildroot}%{_datadir}/backup-framework/applications/accounts.conf
# Remove libtool file
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes -s %{buildroot}
%post -n libaccounts-glib%{_soname} -p /sbin/ldconfig
%postun -n libaccounts-glib%{_soname} -p /sbin/ldconfig
%files -n libaccounts-glib%{_soname}
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_libdir}/libaccounts-glib.so.%{_soname}*
%files -n typelib-1_0-Accounts-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Accounts-1.0.typelib
%files -n python-libaccounts
%defattr(-,root,root)
%{python_sitearch}/gi/overrides
%files -n python3-libaccounts
%defattr(-,root,root)
%{python3_sitearch}/gi/overrides
%files devel
%defattr(-,root,root)
%dir %{_includedir}/libaccounts-glib/
%{_includedir}/libaccounts-glib/*.h
%{_libdir}/libaccounts-glib.so
%{_libdir}/pkgconfig/libaccounts-glib.pc
%{_datadir}/gir-1.0/Accounts-1.0.gir
%dir %{_datadir}/vala/
%dir %{_datadir}/vala/vapi/
%{_datadir}/vala/vapi/%{name}.*
%{_libdir}/%{name}
%{_datadir}/%{name}/testdata
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/testdata
%files docs
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/libaccounts-glib/
%files tools
%defattr(-,root,root)
%{_bindir}/ag-backup
%{_bindir}/ag-tool
%{_mandir}/man1/ag-backup.1.gz
%{_mandir}/man1/ag-tool.1.gz
%dir %{_datadir}/dbus-1/
%dir %{_datadir}/dbus-1/interfaces/
%{_datadir}/dbus-1/interfaces/com.google.code.AccountsSSO.Accounts.Manager.xml
%dir %{_datadir}/xml/accounts/
%dir %{_datadir}/xml/accounts/schema/
%dir %{_datadir}/xml/accounts/schema/dtd/
%{_datadir}/xml/accounts/schema/dtd/accounts-*.dtd
%changelog