3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define _enable_debug_packages 0
8 Summary: XML-XCB protocol description files
9 Summary(pl.UTF-8): Pliki opisu protokołu XML-XCB
14 Group: Development/Libraries
15 #Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2
16 Source0: https://xorg.freedesktop.org/releases/individual/proto/%{name}-%{version}.tar.xz
17 # Source0-md5: d2251b01927c2fbe92dc540f9536b430
18 URL: https://xcb.freedesktop.org/
19 BuildRequires: autoconf >= 2.57
20 BuildRequires: automake >= 1:1.12.6
21 BuildRequires: libxml2-progs
23 BuildRequires: python >= 1:2.5
24 BuildRequires: python-modules >= 1:2.5
27 BuildRequires: python3 >= 1:3.2
28 BuildRequires: python3-modules >= 1:3.2
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.752
32 BuildRequires: tar >= 1:1.22
34 %if %{without python3}
35 Requires: python >= 1:2.5
36 Requires: python-xcbgen = %{version}-%{release}
38 Requires: python3 >= 1:3.2
39 Requires: python3-xcbgen = %{version}-%{release}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 xcb-proto provides the XML-XCB protocol descriptions that libxcb uses
46 to generate the majority of its code and API. They are provided
47 separately from libxcb to allow reuse by other projects, such as
48 additional language bindings, protocol dissectors, or documentation
51 %description -l pl.UTF-8
52 xcb-proto zawiera opisy protokołu XML-XCB używane przez libxcb do
53 generowania większości swojego kodu i API. Są dostarczane osobno, aby
54 umożliwić wykorzystanie przez inne projekty, takie jak dodatkowe
55 dowiązania dla innych języków, analizatory protokołu czy generatory
58 %package -n python-xcbgen
59 Summary: Python 2 xcbgen module
60 Summary(pl.UTF-8): Moduł xcbgen dla Pythona 2
61 Group: Libraries/Python
62 Requires: python-modules >= 1:2.5
64 %description -n python-xcbgen
65 Python 2 xcbgen module.
67 %description -n python-xcbgen -l pl.UTF-8
68 Moduł xcbgen dla Pythona 2.
70 %package -n python3-xcbgen
71 Summary: Python 3 xcbgen module
72 Summary(pl.UTF-8): Moduł xcbgen dla Pythona 3
73 Group: Libraries/Python
74 Requires: python3-modules >= 1:3.2
77 %description -n python3-xcbgen
78 Python 3 xcbgen module.
80 %description -n python3-xcbgen -l pl.UTF-8
81 Moduł xcbgen dla Pythona 3.
87 # rebuild ac/am to use python3 sitescriptdir (apply automake/revert-debian-python-hacks.patch)
111 rm -rf $RPM_BUILD_ROOT
114 %{__make} -C build2 install \
115 DESTDIR=$RPM_BUILD_ROOT
121 %{__make} -C build3 install \
122 DESTDIR=$RPM_BUILD_ROOT
126 rm -rf $RPM_BUILD_ROOT
129 %defattr(644,root,root,755)
130 %doc COPYING NEWS README.md TODO doc/xml-xcb.txt
132 %{_npkgconfigdir}/xcb-proto.pc
135 %files -n python-xcbgen
136 %defattr(644,root,root,755)
137 %{py_sitescriptdir}/xcbgen
141 %files -n python3-xcbgen
142 %defattr(644,root,root,755)
143 %{py3_sitescriptdir}/xcbgen