# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: python-xlib
Version: 0.13
Release: 3%{?dist}
Summary: X client library for Python
Group: Development/Languages
License: GPL
URL: http://python-xlib.sourceforge.net/
Source0: http://prdownloads.sourceforge.net/python-xlib/python-xlib-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: texinfo-tex tetex-dvips
%package doc
Summary: Documentation and examples for python-xlib
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description
The Python X Library is a complete X11R6 client-side implementation,
written in pure Python. It can be used to write low-levelish X Windows
client applications in Python.
%description doc
Install this package if you want the developers' documentation and examples
that tell you how to program with python-xlib.
%prep
%setup -q
%build
%{__python} setup.py build
cd doc
make html ps
cd html
rm Makefile texi2html
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
chmod a-x examples/*.py
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README COPYING
# For noarch packages: sitelib
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc COPYING examples doc/html doc/ps/python-xlib.ps
%changelog
* Tue Apr 10 2007 Jef Spaleta <jspaleta@gmail.com> - 0.13-3
- Created doc subpackage per suggestion in review
* Mon Mar 26 2007 Jef Spaleta <jspaleta@gmail.com> - 0.13-2
- Review Cleanup
* Sat Mar 24 2007 Jef Spaleta <jspaleta@gmail.com> - 0.13-1
- Initial packaging