%define	pyver		%(python -c 'import sys;print(sys.version[0:3])')
%define pkg_release	2%{?_dist_release}

Summary:	Python library to access freedesktop.org standards
Summary(ja): 	freedesktop.org のデスクトップ標準にアクセスする為の Python ライブラリ
Name:		pyxdg
Version:	0.19
Release: 	%{pkg_release}
Source0:	http://www.freedesktop.org/~lanius/%{name}-%{version}.tar.gz
Patch0:         fix-BaseDirectory-empty-vars.patch
License:	LGPL
Group:		Development/Libraries
URL:		http://freedesktop.org/Software/pyxdg

Requires:	python
BuildRequires:	python, python-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:	noarch


%description
Pyxdg is a Python library to access freedesktop.org standards.

%description -l ja
Pyxdg は freedesktop.org のデスクトップ標準にアクセスする為の
Python ライブラリです。

%prep

%setup -q
%patch0 -p1


%build
%{__python} setup.py build


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__python} setup.py install --skip-build --root ${RPM_BUILD_ROOT}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL PKG-INFO README TODO
#%{_libdir}/python%{pyver}/site-packages/xdg
#%{_libdir}/python%{pyver}/site-packages/pyxdg-0.17-py2.5.egg-info
%{_prefix}/lib/python%{pyver}/site-packages/xdg
%{_prefix}/lib/python%{pyver}/site-packages/pyxdg-%{version}-py%{pyver}.egg-info

%changelog
* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.19-2
- rebuild with python-2.7.2

* Sat Jan 28 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.19-1
- new upstream release
- added patch0 from Debian

* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.17-2
- rebuilt with python-2.6.4
- fixed site-packages directory

* Fri Nov 07 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.17-1
- initial build for Vine Linux
