File python-smbc.spec of Package python-smbc
#
# spec file for package python-smbc
#
# 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/
#
%define mod_name pysmbc
Name: python-smbc
BuildRequires: libsmbclient-devel
BuildRequires: python-devel
BuildRequires: pkgconfig
Version: 1.0.13
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://cyberelk.net/tim/software/pysmbc/
Source: http://cyberelk.net/tim/data/pysmbc/%{mod_name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM python-smbc-pkg-config.patch zaitor@opensuse.org -- Add pkg-config support, fixes build with samba 4. Patch copied from fedora.
Patch0: python-smbc-pkg-config.patch
Summary: Python bindings for samba clients (libsmbclient)
License: GPL-2.0+
Group: Development/Libraries/Python
%description
A module for using the Samba client API in Python programs.
%prep
%setup -q -n %{mod_name}-%{version}
%if 0%{?suse_version} >= 1220
%patch0 -p1
%endif
%build
CFLAGS="%{optflags} -DVERSION=\\\"%version\\\"" \
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING NEWS README
%{python_sitearch}/*
%changelog