File polly.spec of Package polly
#
# spec file for package polly
#
# 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: polly
Version: 0.93.10
Release: 0
Summary: Linux Twitter client
License: GPL-2.0 and GPL-3.0+ and MIT
Group: Productivity/Networking/Other
Url: https://launchpad.net/polly
Source0: Polly-0.93.10a.tar.gz
#PATCH-FIX-UPSTREAM: make the first start without any config working
Patch0: polly-settings.patch
BuildRequires: desktop-data-openSUSE
BuildRequires: fdupes
BuildRequires: gconf2-devel
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: dbus-1-python
Requires: desktop-data-openSUSE
Requires: python-SocksiPy
Requires: python-gconf
Requires: python-gdbm
Requires: python-gobject2
Requires: python-gtkspell
Requires: python-httplib2
Requires: python-keyring
Requires: python-notify
Requires: python-numpy
Requires: python-pycurl
Requires: python-xdg
Requires(pre): gconf2
Requires(post): gconf2
Requires(preun):gconf2
%description
Polly is a Linux Twitter client designed for multiple columns of multiple accounts.
%prep
%setup -q -n "Polly-0.93.10 (pre-alpha 3.10)"
# % patch0 -p0
%build
python setup.py build
%install
python setup.py install \
--prefix=%{_prefix} \
--root=%{buildroot}
# remove some icon themes
rm -rf %{buildroot}%{_datadir}/icons/{Faenza,ubuntu-mono-dark,ubuntu-mono-light}
# move gconf schema to /etc/gconf/schema to make find_gconf_schemas working
mkdir -p %{buildroot}/%{_sysconfdir}/gconf/schemas
mv %{buildroot}/%{_datadir}/gconf/schemas/* \
%{buildroot}/%{_sysconfdir}/gconf/schemas
rm -rf %{buildroot}/%{_datadir}/gconf/schemas/
# CC-BY-NC-SA-3 are not allowed license for openSUSE(!)
# http://en.opensuse.org/openSUSE:Accepted_licences#Bad_Licenses_3
rm -rf %{buildroot}/%{_datadir}/icons
# so use some generic icon
sed -i %{buildroot}/%{_datadir}/applications/%{name}.desktop -e 's/Icon=%{name}/Icon=package_internet_instantmessaging.png/'
%suse_update_desktop_file %{name} Network InstantMessaging
%find_gconf_schemas
%fdupes -s %{buildroot}
%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc COPYRIGHT CREDITS GPL-2 GPL-3 README THANKS
%{python_sitelib}/*
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}
%changelog