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: ecd6955dab1a7b9ba9756a11b8bdb48f
18 URL: https://xcb.freedesktop.org/
19 BuildRequires: autoconf >= 2.57
20 BuildRequires: automake >= 1:1.12.6
21 BuildRequires: libxml2-progs
22 %{?with_python2:BuildRequires: python >= 1:2.5}
23 %{?with_python3:BuildRequires: python3 >= 1:3.2}
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.752
26 BuildRequires: tar >= 1:1.22
28 %if %{without python3}
29 Requires: python >= 1:2.5
30 Requires: python-xcbgen = %{version}-%{release}
32 Requires: python3 >= 1:3.2
33 Requires: python3-xcbgen = %{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 xcb-proto provides the XML-XCB protocol descriptions that libxcb uses
39 to generate the majority of its code and API. They are provided
40 separately from libxcb to allow reuse by other projects, such as
41 additional language bindings, protocol dissectors, or documentation
44 %description -l pl.UTF-8
45 xcb-proto zawiera opisy protokołu XML-XCB używane przez libxcb do
46 generowania większości swojego kodu i API. Są dostarczane osobno, aby
47 umożliwić wykorzystanie przez inne projekty, takie jak dodatkowe
48 dowiązania dla innych języków, analizatory protokołu czy generatory
51 %package -n python-xcbgen
52 Summary: Python 2 xcbgen module
53 Summary(pl.UTF-8): Moduł xcbgen dla Pythona 2
54 Group: Libraries/Python
55 Requires: python-modules >= 1:2.5
58 %description -n python-xcbgen
59 Python 2 xcbgen module.
61 %description -n python-xcbgen -l pl.UTF-8
62 Moduł xcbgen dla Pythona 2.
64 %package -n python3-xcbgen
65 Summary: Python 3 xcbgen module
66 Summary(pl.UTF-8): Moduł xcbgen dla Pythona 3
67 Group: Libraries/Python
68 Requires: python3-modules >= 1:3.2
71 %description -n python3-xcbgen
72 Python 3 xcbgen module.
74 %description -n python3-xcbgen -l pl.UTF-8
75 Moduł xcbgen dla Pythona 3.
81 # rebuild ac/am to use python3 sitescriptdir (apply automake/revert-debian-python-hacks.patch)
105 rm -rf $RPM_BUILD_ROOT
108 %{__make} -C build2 install \
109 DESTDIR=$RPM_BUILD_ROOT
115 %{__make} -C build3 install \
116 DESTDIR=$RPM_BUILD_ROOT
120 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc COPYING NEWS README.md TODO doc/xml-xcb.txt
126 %{_pkgconfigdir}/xcb-proto.pc
129 %files -n python-xcbgen
130 %defattr(644,root,root,755)
131 %{py_sitescriptdir}/xcbgen
135 %files -n python3-xcbgen
136 %defattr(644,root,root,755)
137 %{py3_sitescriptdir}/xcbgen