File python-smbc.spec of Package python-smbc

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

# norootforbuild


Name:           python-smbc
%define _name   pysmbc
BuildRequires:  libsmbclient-devel
BuildRequires:  python-devel
BuildRequires:  python3-devel
Version:        1.0.11
Release:        1
# FIXME: once we have proper macros for python3 packaging, build a python3-smbc subpackage
Group:          Development/Libraries/Python
License:        GPLv2+
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://cyberelk.net/tim/software/pysmbc/
Source:         %{_name}-%{version}.tar.bz2
Summary:        Python bindings for samba clients (libsmbclient)
%py_requires

%description
A module for using the Samba client API in Python programs.

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

%build
CFLAGS="%{optflags} -DVERSION=\\\"%version\\\"" \
%{__python} setup.py build

%install
%{__python} setup.py install --prefix=%{_prefix} --root %{buildroot}

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING NEWS README
%{py_sitedir}/smbc.so
%{py_sitedir}/%{_name}-%{version}-py%{python_version}.egg-info

%changelog
openSUSE Build Service is sponsored by