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/
#


%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define origname jabberpy

Name:           python-jabberpy
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/%{origname}-%{version}-0.tar.gz
Source1:        COPYING
Patch0:         fix-package.dif
Patch1:         jabberpy-clean-sockets.patch
Patch2:         fix-hashlib-warning.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  python-devel
BuildArch:      noarch

%if 0%{?suse_version}
%py_requires
%else
Requires:       python
%endif
Provides:       jabberpy = %{version}

%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 %{origname}-%{version}-0 -q
chmod -x examples/*.py
%patch0 -p1
%patch1 -p1
%patch2 -p1
cp %{S:1} .

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root="$RPM_BUILD_ROOT" --prefix=%{_prefix}

%clean
rm -rf $RPM_BUILD_ROOT

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

%changelog
openSUSE Build Service is sponsored by