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

Name:           pybluez
Version:        0.15
Release:        4%{?_dist_release}
Summary:        Python API for the BlueZ bluetooth stack 
Summary(ja):    BlueZ bluetooth スタックの Python API

Group:          Development/Languages
License:        GPLv2
URL:            http://code.google.com/p/pybluez/
Source0:        http://pybluez.googlecode.com/files/PyBluez-0.15.tar.gz

#----------------------------------------------------------------------------
            
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

#----------------------------------------------------------------------------       
BuildRequires:      python-devel, bluez-libs-devel
                   
#----------------------------------------------------------------------------       
%description
PyBluez is an effort to create python wrappers around system Bluetooth
resources to allow Python developers to easily and quickly create Bluetooth
applications.

%description -l ja
PyBluez は Python 開発者が容易かつ迅速にBluetoothのアプリケーションを作成
できるようにシステム回りの Bluetooth リソースの Pythonラッパーを作成します。

#----------------------------------------------------------------------------       
%prep
%setup -q -n PyBluez-%{version}


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


#----------------------------------------------------------------------------       
%install
rm -rf $RPM_BUILD_ROOT
# This file shouldn't be executable - it's going into %doc
chmod a-x examples/bluezchat/bluezchat.py
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

 
%clean
rm -rf $RPM_BUILD_ROOT


#----------------------------------------------------------------------------       
%files
%defattr(-,root,root,-)
%doc README CHANGELOG COPYING examples
%{python_sitearch}/*

#----------------------------------------------------------------------------
# Maintainers: babasaki@mindgear.org
#
#----------------------------------------------------------------------------
%changelog
* Mon Apr 19 2010 Shu KONNO <owa@bg.wakwak.com> 0.15-4
- rebuilt with python-2.6

* Fri Oct 24  2008 Seiichirou Babasaki 0.15-2
- Import bluez-gnome - Packager: Babasaki
- added "# Maintainers: " comments.
- changed UTF-8 encode at pybluez.vs.spec
- updated specfile

#----------------------------------------------------------------------------
* Thu Sep 11 2008 - Bastien Nocera <bnocera@redhat.com> - 0.15-2
- Rebuild

* Wed Jun 4 2008 Will Woods <wwoods@redhat.com> - 0.15-1
- New upstream version

* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.1-4
- Autorebuild for GCC 4.3

* Fri Dec 29 2006 - Will Woods <wwoods@redhat.com> - 0.9.1-3
- Clean up spec file some more after further comments in bug #218678

* Fri Dec 15 2006 - Will Woods <wwoods@redhat.com> - 0.9.1-2
- Clean up spec file according to comments in bug #218678

* Wed Dec 6 2006 - Will Woods <wwoods@redhat.com> - 0.9.1-1
- Initial packaging attempt.