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