]> git.pld-linux.org Git - packages/xcb-proto.git/blame - xcb-proto.spec
rebuild with python 3.10
[packages/xcb-proto.git] / xcb-proto.spec
CommitLineData
09b3dbc3
JP
1#
2# Conditional build:
c006749c 3%bcond_without python2 # CPython 2.x module
09b3dbc3
JP
4%bcond_without python3 # CPython 3.x module
5
655536dd
JP
6%define _enable_debug_packages 0
7
a31ed8cd 8Summary: XML-XCB protocol description files
d4c620d8 9Summary(pl.UTF-8): Pliki opisu protokołu XML-XCB
45b8deae 10Name: xcb-proto
c006749c 11Version: 1.14.1
1ece6bab 12Release: 4
45b8deae
JB
13License: MIT
14Group: Development/Libraries
6bd22fd1
JB
15#Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2
16Source0: https://xorg.freedesktop.org/releases/individual/proto/%{name}-%{version}.tar.xz
c006749c 17# Source0-md5: ecd6955dab1a7b9ba9756a11b8bdb48f
f1374e0d 18URL: https://xcb.freedesktop.org/
c006749c
JB
19BuildRequires: autoconf >= 2.57
20BuildRequires: automake >= 1:1.12.6
cca2014e 21BuildRequires: libxml2-progs
c006749c
JB
22%{?with_python2:BuildRequires: python >= 1:2.5}
23%{?with_python3:BuildRequires: python3 >= 1:3.2}
278429fb 24BuildRequires: rpm-pythonprov
c006749c 25BuildRequires: rpmbuild(macros) >= 1.752
6bd22fd1
JB
26BuildRequires: tar >= 1:1.22
27BuildRequires: xz
8ea2a60e 28%if %{without python3}
6bd22fd1 29Requires: python >= 1:2.5
09b3dbc3 30Requires: python-xcbgen = %{version}-%{release}
c006749c
JB
31%else
32Requires: python3 >= 1:3.2
33Requires: python3-xcbgen = %{version}-%{release}
34%endif
45b8deae
JB
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
a31ed8cd
JB
38xcb-proto provides the XML-XCB protocol descriptions that libxcb uses
39to generate the majority of its code and API. They are provided
40separately from libxcb to allow reuse by other projects, such as
41additional language bindings, protocol dissectors, or documentation
42generators.
45b8deae 43
7392d99e
JR
44%description -l pl.UTF-8
45xcb-proto zawiera opisy protokołu XML-XCB używane przez libxcb do
46generowania większości swojego kodu i API. Są dostarczane osobno, aby
47umożliwić wykorzystanie przez inne projekty, takie jak dodatkowe
48dowiązania dla innych języków, analizatory protokołu czy generatory
a31ed8cd 49dokumentacji.
45b8deae 50
09b3dbc3
JP
51%package -n python-xcbgen
52Summary: Python 2 xcbgen module
53Summary(pl.UTF-8): Moduł xcbgen dla Pythona 2
54Group: Libraries/Python
c006749c 55Requires: python-modules >= 1:2.5
bc16a127 56BuildArch: noarch
09b3dbc3
JP
57
58%description -n python-xcbgen
59Python 2 xcbgen module.
60
61%description -n python-xcbgen -l pl.UTF-8
62Moduł xcbgen dla Pythona 2.
63
64%package -n python3-xcbgen
65Summary: Python 3 xcbgen module
66Summary(pl.UTF-8): Moduł xcbgen dla Pythona 3
67Group: Libraries/Python
c006749c 68Requires: python3-modules >= 1:3.2
bc16a127 69BuildArch: noarch
09b3dbc3
JP
70
71%description -n python3-xcbgen
72Python 3 xcbgen module.
73
74%description -n python3-xcbgen -l pl.UTF-8
75Moduł xcbgen dla Pythona 3.
76
45b8deae
JB
77%prep
78%setup -q
79
80%build
c006749c
JB
81# rebuild ac/am to use python3 sitescriptdir (apply automake/revert-debian-python-hacks.patch)
82%{__aclocal}
83%{__autoconf}
84%{__automake}
85
09b3dbc3 86%if %{with python3}
c006749c 87install -d build3
09b3dbc3
JP
88cd build3
89PYTHON=%{__python3} \
90../%configure
91%{__make}
92cd ..
93%endif
94
c006749c
JB
95%if %{with python2}
96install -d build2
09b3dbc3
JP
97cd build2
98PYTHON=%{__python} \
99../%configure
45b8deae 100%{__make}
c006749c
JB
101cd ..
102%endif
45b8deae
JB
103
104%install
105rm -rf $RPM_BUILD_ROOT
106
c006749c 107%if %{with python2}
b3f9ec0a 108%{__make} -C build2 install \
45b8deae
JB
109 DESTDIR=$RPM_BUILD_ROOT
110
0db5b06e 111%py_postclean
c006749c 112%endif
0db5b06e 113
8ea2a60e
JP
114%if %{with python3}
115%{__make} -C build3 install \
116 DESTDIR=$RPM_BUILD_ROOT
117%endif
118
45b8deae
JB
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%files
123%defattr(644,root,root,755)
6bd22fd1 124%doc COPYING NEWS README.md TODO doc/xml-xcb.txt
bc364925 125%{_datadir}/xcb
45b8deae 126%{_pkgconfigdir}/xcb-proto.pc
09b3dbc3 127
c006749c 128%if %{with python2}
09b3dbc3
JP
129%files -n python-xcbgen
130%defattr(644,root,root,755)
0db5b06e 131%{py_sitescriptdir}/xcbgen
c006749c 132%endif
09b3dbc3
JP
133
134%if %{with python3}
135%files -n python3-xcbgen
136%defattr(644,root,root,755)
c006749c 137%{py3_sitescriptdir}/xcbgen
09b3dbc3 138%endif
This page took 0.077168 seconds and 4 git commands to generate.