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