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