]>
Commit | Line | Data |
---|---|---|
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 | 8 | Summary: XML-XCB protocol description files |
d4c620d8 | 9 | Summary(pl.UTF-8): Pliki opisu protokołu XML-XCB |
45b8deae | 10 | Name: xcb-proto |
496af399 JP |
11 | Version: 1.15 |
12 | Release: 1 | |
45b8deae JB |
13 | License: MIT |
14 | Group: Development/Libraries | |
6bd22fd1 JB |
15 | #Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2 |
16 | Source0: https://xorg.freedesktop.org/releases/individual/proto/%{name}-%{version}.tar.xz | |
496af399 | 17 | # Source0-md5: 19487607bde28d4a0e981fcfe0a328c5 |
f1374e0d | 18 | URL: https://xcb.freedesktop.org/ |
c006749c JB |
19 | BuildRequires: autoconf >= 2.57 |
20 | BuildRequires: automake >= 1:1.12.6 | |
cca2014e | 21 | BuildRequires: libxml2-progs |
c006749c JB |
22 | %{?with_python2:BuildRequires: python >= 1:2.5} |
23 | %{?with_python3:BuildRequires: python3 >= 1:3.2} | |
278429fb | 24 | BuildRequires: rpm-pythonprov |
c006749c | 25 | BuildRequires: rpmbuild(macros) >= 1.752 |
6bd22fd1 JB |
26 | BuildRequires: tar >= 1:1.22 |
27 | BuildRequires: xz | |
8ea2a60e | 28 | %if %{without python3} |
6bd22fd1 | 29 | Requires: python >= 1:2.5 |
09b3dbc3 | 30 | Requires: python-xcbgen = %{version}-%{release} |
c006749c JB |
31 | %else |
32 | Requires: python3 >= 1:3.2 | |
33 | Requires: python3-xcbgen = %{version}-%{release} | |
34 | %endif | |
45b8deae JB |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
a31ed8cd JB |
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 | |
42 | generators. | |
45b8deae | 43 | |
7392d99e JR |
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 | |
a31ed8cd | 49 | dokumentacji. |
45b8deae | 50 | |
09b3dbc3 JP |
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 | |
c006749c | 55 | Requires: python-modules >= 1:2.5 |
bc16a127 | 56 | BuildArch: noarch |
09b3dbc3 JP |
57 | |
58 | %description -n python-xcbgen | |
59 | Python 2 xcbgen module. | |
60 | ||
61 | %description -n python-xcbgen -l pl.UTF-8 | |
62 | Moduł xcbgen dla Pythona 2. | |
63 | ||
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 | |
c006749c | 68 | Requires: python3-modules >= 1:3.2 |
bc16a127 | 69 | BuildArch: noarch |
09b3dbc3 JP |
70 | |
71 | %description -n python3-xcbgen | |
72 | Python 3 xcbgen module. | |
73 | ||
74 | %description -n python3-xcbgen -l pl.UTF-8 | |
75 | Moduł 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 | 87 | install -d build3 |
09b3dbc3 JP |
88 | cd build3 |
89 | PYTHON=%{__python3} \ | |
90 | ../%configure | |
91 | %{__make} | |
92 | cd .. | |
93 | %endif | |
94 | ||
c006749c JB |
95 | %if %{with python2} |
96 | install -d build2 | |
09b3dbc3 JP |
97 | cd build2 |
98 | PYTHON=%{__python} \ | |
99 | ../%configure | |
45b8deae | 100 | %{__make} |
c006749c JB |
101 | cd .. |
102 | %endif | |
45b8deae JB |
103 | |
104 | %install | |
105 | rm -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 |
120 | rm -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 |