File python-desktopcouch.spec of Package python-desktopcouch

#
# spec file for package python-desktopcouch
#
# Copyright (c) 2013 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/
#


Name:           python-desktopcouch
Version:        1.0.8
Release:        0
Summary:        Python module to manipulate CouchDB databases
License:        LGPL-3.0
Group:          Development/Libraries/Python
Url:            https://launchpad.net/desktopcouch
Source:         desktopcouch-%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  python-devel
BuildRequires:  python-distutils-extra
BuildRequires:  python-setuptools
BuildRequires:  update-desktop-files
Requires:       python-Twisted
Requires:       python-avahi
Suggests:       couchdb
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
Integration of CouchDB storage into desktop applications, for automatic
replication and synchronization of data between computers. Examples:

  * Store notes, contacts, calendars, bookmarks, etc on a central storage
  * Replicate and synchronize that data from users' desktops to several
    machines
  * Provide servers with the ability to provide a web interface to display and
    manage that data from a browser everywhere (like Ubuntu One or Midgard)

%prep
%setup -n desktopcouch-%{version}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}%{_datadir}/doc
%if 0%{?suse_version}
%suse_update_desktop_file desktopcouch-pair Office Database
%endif
# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitelib}
%py_compile .
popd
# Remove duplicate python libs
%fdupes -s %{buildroot}

%files
%defattr(-,root,root)
%doc README COPYING PKG-INFO COPYING.LESSER
%{_bindir}/desktopcouch-pair
%{python_sitelib}/*
%{_prefix}/lib/desktopcouch/
%{_datadir}/applications/desktopcouch-pair.desktop
%dir %{_datadir}/apport
%dir %{_datadir}/apport/package-hooks
%{_datadir}/apport/package-hooks/source_desktopcouch.py
%config %{_sysconfdir}/xdg/desktop-couch
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%{_datadir}/dbus-1/services/org.desktopcouch.CouchDB.service
%{_datadir}/desktopcouch
%{_mandir}/*/*

%changelog
openSUSE Build Service is sponsored by