]>
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 |
c006749c | 11 | Version: 1.14.1 |
7e890e5f | 12 | Release: 5 |
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 | |
c006749c | 17 | # Source0-md5: ecd6955dab1a7b9ba9756a11b8bdb48f |
7e890e5f | 18 | Patch0: %{name}-automake.patch |
f1374e0d | 19 | URL: https://xcb.freedesktop.org/ |
c006749c JB |
20 | BuildRequires: autoconf >= 2.57 |
21 | BuildRequires: automake >= 1:1.12.6 | |
cca2014e | 22 | BuildRequires: libxml2-progs |
c006749c JB |
23 | %{?with_python2:BuildRequires: python >= 1:2.5} |
24 | %{?with_python3:BuildRequires: python3 >= 1:3.2} | |
278429fb | 25 | BuildRequires: rpm-pythonprov |
c006749c | 26 | BuildRequires: rpmbuild(macros) >= 1.752 |
6bd22fd1 JB |
27 | BuildRequires: tar >= 1:1.22 |
28 | BuildRequires: xz | |
8ea2a60e | 29 | %if %{without python3} |
6bd22fd1 | 30 | Requires: python >= 1:2.5 |
09b3dbc3 | 31 | Requires: python-xcbgen = %{version}-%{release} |
c006749c JB |
32 | %else |
33 | Requires: python3 >= 1:3.2 | |
34 | Requires: python3-xcbgen = %{version}-%{release} | |
35 | %endif | |
45b8deae JB |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
a31ed8cd JB |
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 | |
43 | generators. | |
45b8deae | 44 | |
7392d99e JR |
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 | |
a31ed8cd | 50 | dokumentacji. |
45b8deae | 51 | |
09b3dbc3 JP |
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 | |
c006749c | 56 | Requires: python-modules >= 1:2.5 |
bc16a127 | 57 | BuildArch: noarch |
09b3dbc3 JP |
58 | |
59 | %description -n python-xcbgen | |
60 | Python 2 xcbgen module. | |
61 | ||
62 | %description -n python-xcbgen -l pl.UTF-8 | |
63 | Moduł xcbgen dla Pythona 2. | |
64 | ||
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 | |
c006749c | 69 | Requires: python3-modules >= 1:3.2 |
bc16a127 | 70 | BuildArch: noarch |
09b3dbc3 JP |
71 | |
72 | %description -n python3-xcbgen | |
73 | Python 3 xcbgen module. | |
74 | ||
75 | %description -n python3-xcbgen -l pl.UTF-8 | |
76 | Moduł 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 | 89 | install -d build3 |
09b3dbc3 JP |
90 | cd build3 |
91 | PYTHON=%{__python3} \ | |
92 | ../%configure | |
93 | %{__make} | |
94 | cd .. | |
95 | %endif | |
96 | ||
c006749c JB |
97 | %if %{with python2} |
98 | install -d build2 | |
09b3dbc3 JP |
99 | cd build2 |
100 | PYTHON=%{__python} \ | |
101 | ../%configure | |
45b8deae | 102 | %{__make} |
c006749c JB |
103 | cd .. |
104 | %endif | |
45b8deae JB |
105 | |
106 | %install | |
107 | rm -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 |
122 | rm -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 |