1 |
# sitelib for noarch packages, sitearch for others (remove the unneeded one) |
2 |
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
3 |
%define pre_release rc1 |
4 |
Name: python-xlib |
5 |
Version: 0.15 |
6 |
Release: %mkrel 7 |
7 |
Summary: X client library for Python |
8 |
|
9 |
Group: Development/Python |
10 |
License: GPLv2+ |
11 |
URL: http://python-xlib.sourceforge.net/ |
12 |
Source0: http://prdownloads.sourceforge.net/python-xlib/python-xlib-%{version}%{pre_release}.tar.gz |
13 |
Source1: defs |
14 |
Patch0: increase-receiving-buffer |
15 |
Patch1: fix-unix-socket-in-display |
16 |
Patch2: fix-ssh-tunnel-auth |
17 |
Patch3: fix-rhomboid-examples |
18 |
Patch4: python-xlib-0.15rc1-xauthority.patch |
19 |
Patch5: r138-mggr-get-rid-of-annoying-Xlib.protocol.request.Query.patch |
20 |
Patch6: r139-allow-IPv6-addresses-e.g.-d-Xlib.display.Display-fff.patch |
21 |
BuildArch: noarch |
22 |
BuildRequires: python-devel |
23 |
BuildRequires: texinfo |
24 |
BuildRequires: tetex-dvips |
25 |
BuildRequires: texinfo-tex |
26 |
|
27 |
%package doc |
28 |
Summary: Documentation and examples for python-xlib |
29 |
Group: Documentation |
30 |
|
31 |
|
32 |
%description |
33 |
The Python X Library is a complete X11R6 client-side implementation, |
34 |
written in pure Python. It can be used to write low-levelish X Windows |
35 |
client applications in Python. |
36 |
|
37 |
%description doc |
38 |
Install this package if you want the developers' documentation and examples |
39 |
that tell you how to program with python-xlib. |
40 |
|
41 |
%prep |
42 |
%setup -q -n %{name}-%{version}%{pre_release} |
43 |
%patch0 -p1 |
44 |
%patch1 -p1 |
45 |
%patch2 -p1 |
46 |
%patch3 -p1 |
47 |
%patch4 -p0 |
48 |
%patch5 -p2 |
49 |
%patch6 -p2 |
50 |
|
51 |
%build |
52 |
%{__python} setup.py build |
53 |
%__cp %{SOURCE1} doc/src/ |
54 |
cd doc |
55 |
%__make html ps |
56 |
cd html |
57 |
%__rm Makefile texi2html |
58 |
|
59 |
%install |
60 |
%{__python} setup.py install -O1 --skip-build --root %{buildroot} |
61 |
%__chmod a-x examples/*.py |
62 |
|
63 |
|
64 |
%files |
65 |
%doc README COPYING |
66 |
# For noarch packages: sitelib |
67 |
%{python_sitelib}/* |
68 |
|
69 |
%files doc |
70 |
%doc COPYING examples doc/html doc/ps/python-xlib.ps |