File turpial.spec of Package turpial

#
# spec file for package turpial
#
# Copyright (c) 2012 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:           turpial
Version:        1.6.9
Release:        0
Summary:        Lightweight, functional and integrated Twitter client
License:        GPL-3.0+
Group:          Productivity/Networking/Instant Messenger
Url:            http://turpial.org.ve/
Source:         http://turpial.org.ve/files/sources/stable/%{name}-%{version}.tar.gz
BuildRequires:  python-babel
BuildRequires:  python-imaging
BuildRequires:  python-setuptools
Requires:       python-cairo
# bnc#751192: /usr/bin/turpial has from pkg_resources import load_entry_point (pkg_resources coming from pyton-distribute)
Requires:       python-distribute
%if 0%{?suse_version} > 1130
Requires:       python-gconf
%else
# For gconf
Requires:       python-gnome
%endif
Requires:       python-gobject2
Requires:       python-gstreamer-0_10
Requires:       python-gtk
%if 0%{?suse_version} > 1130
Requires:       python-gtkspell
%else
# For gtkspell
Requires:       python-gnome-extras
%endif
Requires:       python-webkitgtk
Requires:       python-xdg
%if 0%{?fedora_version}
BuildRequires:  desktop-file-utils
Requires:       notify-python
%endif
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Requires:       python-notify
Recommends:     %{name}-lang
%{py_requires}
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Turpial is a microblogging client with support for multiple interfaces.
It's developed using Python and its goal is to be native, light and
integrated with desktop environment, but without loosing any
functionality.

%if 0%{?suse_version}
%lang_package
%endif

%prep
%setup -q -n %{name}-%{version}

%build
python setup.py build

%install
python setup.py install --skip-build --root %{buildroot} --prefix %{_prefix}
%find_lang %{name}
# Installing those in /usr is surely wrong.
rm %{buildroot}%{_prefix}/{AUTHORS,TRANSLATORS}
# Will use %%doc for those
rm %{buildroot}%{_datadir}/doc/%{name}/{ChangeLog,COPYING,README.rst}
# Not interesting
rm %{buildroot}%{_datadir}/doc/%{name}/%{name}.{dia,png}
%if 0%{?fedora_version}
desktop-file-install --add-category=InstantMessaging %{buildroot}%{_datadir}/applications/%{name}.desktop
%endif
%if 0%{?suse_version}
%suse_update_desktop_file %{name} InstantMessaging
%fdupes %{buildroot}%{python_sitelib}
%endif

%if 0%{?suse_version} > 1130

%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

%if !(0%{?suse_version})

%files -f %{name}.lang
%defattr(-,root,root,-)
%else

%files
%defattr(-,root,root,-)
%endif
%doc AUTHORS ChangeLog COPYING README.rst
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-1.6.9-py%{py_ver}.egg-info
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%if 0%{?suse_version}

%files lang -f %{name}.lang
%endif

%changelog
openSUSE Build Service is sponsored by