File python-jabberpy.spec of Package python-jabberpy

#
# spec file for package python-jabberpy
#
# 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/
#


%global pypi_name jabberpy

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-%{pypi_name}
Version:        0.5
Release:        0
Summary:        Python xmlstream and jabber IM protocol libs
License:        LGPL-2.1+
Group:          Development/Libraries
Url:            http://jabberpy.sf.net
Source0:        http://unc.dl.sourceforge.net/sourceforge/jabberpy/%{pypi_name}-%{version}-0.tar.gz
Source1:        COPYING
Patch0:         jabberpy-no-init.patch
Patch1:         jabberpy-clean-sockets.patch
Patch2:         jabberpy-ipv6.patch
Patch3:         fix-hashlib-warning.dif
Patch4:         jabberpy-proxy-read.patch
Patch5:         jabberpy-python3.patch
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  libnl3-devel
BuildRequires:  pkgconfig
BuildRequires:  python-rpm-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%python_subpackages

%description
jabber.py is a Python module for the jabber instant messaging protocol.
jabber.py deals with the xml parsing and socket code, leaving the
programmer to concentrate on developing quality jabber based
applications with Python.

%prep
%setup -n %{pypi_name}-%{version}-0 -q
chmod -x examples/*.py
%patch0 -p1
%patch1 -p1
%patch2 -p0
%patch3 -p1
%patch4 -p1
%patch5 -p1
cp %{S:1} .

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install

%files %{python_files}
%defattr(-,root,root,-)
%doc CREDITS MANIFEST README COPYING
%{python_sitelib}/

%changelog
openSUSE Build Service is sponsored by