]>
Commit | Line | Data |
---|---|---|
3b3536d4 JB |
1 | # |
2 | # Conditional build | |
3 | %bcond_without static_libs # static libraries | |
83b18e2d AF |
4 | %bcond_without gdkpixbuf # gdk-pixbuf for image loading [instead of stb_image] |
5 | %bcond_without gles1 # OpenGL-ES 1.1 support | |
6 | %bcond_without gles2 # OpenGL-ES 2.0 support | |
b0b44050 | 7 | %bcond_without kms # KMS EGL support |
f877413a | 8 | %bcond_without gstreamer # GStreamer support |
83b18e2d | 9 | %bcond_without wayland # Wayland EGL support |
3b3536d4 | 10 | # |
a8e45d23 | 11 | Summary: A library for using 3D graphics hardware to draw pretty pictures |
3b3536d4 | 12 | Summary(pl.UTF-8): Biblioteka do rysowania ładnych obrazków przy użyciu sprzętowej grafiki 3D |
a8e45d23 | 13 | Name: cogl |
8306bd82 | 14 | Version: 1.17.4 |
27a61ffe | 15 | Release: 1 |
a8e45d23 | 16 | License: LGPL v2+ |
3b3536d4 | 17 | Group: Libraries |
8306bd82 JR |
18 | Source0: http://ftp.gnome.org/pub/GNOME/sources/cogl/1.17/%{name}-%{version}.tar.xz |
19 | # Source0-md5: 6f8f3a6652de35eafc37ebbf95d09e17 | |
646b7883 | 20 | Patch0: %{name}-link.patch |
a8e45d23 | 21 | URL: http://www.clutter-project.org/ |
f877413a | 22 | %{?with_wayland:BuildRequires: EGL-devel} |
b0b44050 | 23 | %{?with_kms:BuildRequires: Mesa-libgbm-devel} |
f877413a | 24 | %{?with_wayland:BuildRequires: Mesa-libwayland-egl-devel >= 1.0.0} |
646b7883 | 25 | %{?with_gles1:BuildRequires: OpenGLESv1-devel >= 1.1} |
1ae58ca6 | 26 | BuildRequires: OpenGL-GLX-devel |
aedf1bd3 JB |
27 | BuildRequires: autoconf >= 2.59 |
28 | BuildRequires: automake >= 1:1.11 | |
3b3536d4 | 29 | BuildRequires: cairo-devel >= 1.10 |
bfeaf83d | 30 | %{?with_gdkpixbuf:BuildRequires: gdk-pixbuf2-devel >= 2.0} |
19a3a169 | 31 | BuildRequires: gettext-devel >= 0.18.1 |
774ef314 | 32 | BuildRequires: glib2-devel >= 1:2.32.0 |
3b3536d4 | 33 | BuildRequires: gobject-introspection-devel >= 0.9.5 |
f877413a JB |
34 | %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0} |
35 | %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0} | |
3b3536d4 JB |
36 | BuildRequires: gtk-doc >= 1.13 |
37 | BuildRequires: libdrm-devel | |
aedf1bd3 | 38 | BuildRequires: libtool >= 2:2.2.6 |
3b3536d4 | 39 | BuildRequires: pango-devel >= 1:1.20 |
a8e45d23 | 40 | BuildRequires: pkgconfig |
aedf1bd3 | 41 | BuildRequires: tar >= 1:1.22 |
f877413a JB |
42 | # wayland-client >= 1.0.0, wayland-server >= 1.1.90 |
43 | %{?with_wayland:BuildRequires: wayland-devel >= 1.2.0} | |
1ae58ca6 | 44 | BuildRequires: xorg-lib-libX11-devel |
3b3536d4 | 45 | BuildRequires: xorg-lib-libXcomposite-devel >= 0.4 |
a8e45d23 PZ |
46 | BuildRequires: xorg-lib-libXdamage-devel |
47 | BuildRequires: xorg-lib-libXext-devel | |
3b3536d4 | 48 | BuildRequires: xorg-lib-libXfixes-devel >= 3 |
774ef314 | 49 | BuildRequires: xorg-lib-libXrandr-devel >= 1.2 |
aedf1bd3 | 50 | BuildRequires: xz |
3b3536d4 | 51 | Requires: cairo >= 1.10 |
774ef314 | 52 | Requires: glib2 >= 1:2.32.0 |
3b3536d4 | 53 | Requires: pango >= 1:1.20 |
f877413a | 54 | %{?with_wayland:Requires: wayland >= 1.2.0} |
3b3536d4 JB |
55 | Requires: xorg-lib-libXcomposite >= 0.4 |
56 | Requires: xorg-lib-libXfixes >= 3 | |
774ef314 | 57 | Requires: xorg-lib-libXrandr >= 1.2 |
1ae58ca6 | 58 | Suggests: OpenGL |
502bb6a5 JB |
59 | %{?with_gles1:Provides: cogl(gles1) = %{version}-%{release}} |
60 | %{?with_gles2:Provides: cogl(gles2) = %{version}-%{release}} | |
b0b44050 | 61 | %{?with_kms:Provides: cogl(kms) = %{version}-%{release}} |
502bb6a5 | 62 | %{?with_wayland:Provides: cogl(wayland) = %{version}-%{release}} |
9fabc6b2 | 63 | Conflicts: clutter < 1.8.0 |
3b3536d4 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
a8e45d23 PZ |
65 | |
66 | %description | |
67 | Cogl is a small open source library for using 3D graphics hardware to | |
68 | draw pretty pictures. The API departs from the flat state machine | |
69 | style of OpenGL and is designed to make it easy to write orthogonal | |
70 | components that can render without stepping on each others toes. | |
71 | ||
3b3536d4 JB |
72 | %description -l pl.UTF-8 |
73 | Cogl to mała biblioteka o otwartych źródłach, pozwalająca na rysowanie | |
74 | ładnych rysunków przy użyciu sprzętu graficznego 3D. API wywodzi się z | |
75 | automatu skończonego w stylu OpenGL i zostało tak zaprojektowane, aby | |
76 | ułatwić pisanie ortogonalnych komponentów, potrafiących renderować bez | |
77 | przeszkadzania sobie nawzajem. | |
a8e45d23 PZ |
78 | |
79 | %package devel | |
3b3536d4 JB |
80 | Summary: Header files for cogl library |
81 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl | |
a8e45d23 PZ |
82 | Group: Development/Libraries |
83 | Requires: %{name} = %{version}-%{release} | |
f877413a | 84 | %{?with_wayland:Requires: EGL-devel} |
b0b44050 | 85 | %{?with_kms:Requires: Mesa-libgbm-devel} |
f877413a | 86 | %{?with_wayland:Requires: Mesa-libwayland-egl-devel >= 1.0.0} |
3b3536d4 | 87 | Requires: cairo-devel >= 1.10 |
bfeaf83d | 88 | %{?with_gdkpixbuf:Requires: gdk-pixbuf2-devel >= 2.0} |
774ef314 | 89 | Requires: glib2-devel >= 1:2.32.0 |
3b3536d4 JB |
90 | Requires: gobject-introspection-devel >= 0.9.5 |
91 | Requires: libdrm-devel | |
92 | Requires: pango-devel >= 1:1.20 | |
f877413a | 93 | %{?with_wayland:Requires: wayland-devel >= 1.2.0} |
3b3536d4 JB |
94 | Requires: xorg-lib-libXcomposite-devel >= 0.4 |
95 | Requires: xorg-lib-libXdamage-devel | |
96 | Requires: xorg-lib-libXext-devel | |
97 | Requires: xorg-lib-libXfixes-devel >= 3 | |
774ef314 | 98 | Requires: xorg-lib-libXrandr-devel >= 1.2 |
502bb6a5 JB |
99 | %{?with_gles1:Provides: cogl-devel(gles1) = %{version}-%{release}} |
100 | %{?with_gles2:Provides: cogl-devel(gles2) = %{version}-%{release}} | |
b0b44050 | 101 | %{?with_kms:Provides: cogl-devel(kms) = %{version}-%{release}} |
502bb6a5 | 102 | %{?with_wayland:Provides: cogl-devel(wayland) = %{version}-%{release}} |
9fabc6b2 | 103 | Conflicts: clutter-devel < 1.8.0 |
a8e45d23 PZ |
104 | |
105 | %description devel | |
3b3536d4 JB |
106 | Header files for building and developing applications with cogl. |
107 | ||
108 | %description devel -l pl.UTF-8 | |
109 | Pliki nagłówkowe do tworzenia aplikacji z użyciem biblioteki cogl. | |
110 | ||
111 | %package static | |
112 | Summary: Static cogl libraries | |
113 | Summary(pl.UTF-8): Statyczne biblioteki cogl | |
114 | Group: Development/Libraries | |
115 | Requires: %{name}-devel = %{version}-%{release} | |
502bb6a5 JB |
116 | %{?with_gles1:Provides: cogl-static(gles1) = %{version}-%{release}} |
117 | %{?with_gles2:Provides: cogl-static(gles2) = %{version}-%{release}} | |
b0b44050 | 118 | %{?with_kms:Provides: cogl-static(kms) = %{version}-%{release}} |
502bb6a5 | 119 | %{?with_wayland:Provides: cogl-static(wayland) = %{version}-%{release}} |
9fabc6b2 | 120 | Conflicts: clutter-static < 1.8.0 |
3b3536d4 JB |
121 | |
122 | %description static | |
123 | Static cogl libraries. | |
124 | ||
125 | %description static -l pl.UTF-8 | |
126 | Statyczne biblioteki cogl. | |
a8e45d23 | 127 | |
3b3536d4 JB |
128 | %package doc |
129 | Summary: API documentation for cogl | |
130 | Summary(pl.UTF-8): Dokumentacja API cogl | |
a8e45d23 | 131 | Group: Documentation |
a8e45d23 | 132 | |
3b3536d4 JB |
133 | %description doc |
134 | This package contains API documentation for cogl. | |
135 | ||
136 | %description doc -l pl.UTF-8 | |
137 | Ten pakiet zawiera dokumentację API cogl. | |
a8e45d23 | 138 | |
646b7883 JB |
139 | %package gles2 |
140 | Summary: Cogl frontend library for OpenGL-ES 2.0 | |
141 | Summary(pl.UTF-8): Biblioteka frontendowa Cogl dla OpenGL-ES 2.0 | |
142 | Group: Libraries | |
502bb6a5 | 143 | Requires: %{name}(gles2) = %{version}-%{release} |
646b7883 JB |
144 | |
145 | %description gles2 | |
146 | Cogl frontend library for OpenGL-ES 2.0. | |
147 | ||
148 | %description gles2 -l pl.UTF-8 | |
149 | Biblioteka frontendowa Cogl dla OpenGL-ES 2.0. | |
150 | ||
151 | %package gles2-devel | |
152 | Summary: Header files for cogl-gles2 library | |
153 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gles2 | |
154 | Group: Development/Libraries | |
502bb6a5 | 155 | Requires: %{name}-devel(gles2) = %{version}-%{release} |
646b7883 JB |
156 | Requires: %{name}-gles2 = %{version}-%{release} |
157 | ||
158 | %description gles2-devel | |
159 | Header files for cogl-gles2 library. | |
160 | ||
161 | %description gles2-devel -l pl.UTF-8 | |
162 | Pliki nagłówkowe biblioteki cogl-gles2. | |
163 | ||
164 | %package gles2-static | |
165 | Summary: Static cogl-gles2 library | |
166 | Summary(pl.UTF-8): Statyczna biblioteka cogl-gles2 | |
167 | Group: Development/Libraries | |
502bb6a5 | 168 | Requires: %{name}-gles2-devel = %{version}-%{release} |
646b7883 JB |
169 | |
170 | %description gles2-static | |
171 | Static cogl-gles2 library. | |
172 | ||
173 | %description gles2-static -l pl.UTF-8 | |
174 | Statyczna biblioteka cogl-gles2. | |
175 | ||
f877413a JB |
176 | %package gst |
177 | Summary: GStreamer integration library for Cogl | |
178 | Summary(pl.UTF-8): Biblioteka integrująca GStreamera z Cogl | |
179 | Group: Libraries | |
180 | Requires: %{name} = %{version}-%{release} | |
181 | ||
182 | %description gst | |
183 | GStreamer integration library for Cogl. | |
184 | ||
185 | %description gst -l pl.UTF-8 | |
186 | Biblioteka integrująca GStreamera z Cogl. | |
187 | ||
188 | %package gst-devel | |
189 | Summary: Header files for cogl-gst library | |
190 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cogl-gst | |
191 | Group: Development/Libraries | |
192 | Requires: %{name}-devel = %{version}-%{release} | |
193 | Requires: %{name}-gst = %{version}-%{release} | |
194 | Requires: gstreamer-devel >= 1.0 | |
195 | Requires: gstreamer-plugins-base-devel >= 1.0 | |
196 | ||
197 | %description gst-devel | |
198 | Header files for cogl-gst library. | |
199 | ||
200 | %description gst-devel -l pl.UTF-8 | |
201 | Pliki nagłówkowe biblioteki cogl-gst. | |
202 | ||
203 | %package gst-static | |
204 | Summary: Static cogl-gst library | |
205 | Summary(pl.UTF-8): Statyczna biblioteka cogl-gst | |
206 | Group: Development/Libraries | |
207 | Requires: %{name}-gst-devel = %{version}-%{release} | |
208 | ||
209 | %description gst-static | |
210 | Static cogl-gst library. | |
211 | ||
212 | %description gst-static -l pl.UTF-8 | |
213 | Statyczna biblioteka cogl-gst. | |
214 | ||
215 | %package gst-apidocs | |
216 | Summary: API documentation for cogl-gst library | |
217 | Summary(pl.UTF-8): Dokumentacja API biblioteki cogl-gst | |
218 | Group: Documentation | |
219 | ||
220 | %description gst-apidocs | |
221 | API documentation for cogl-gst library. | |
222 | ||
223 | %description gst-apidocs -l pl.UTF-8 | |
224 | Dokumentacja API biblioteki cogl-gst. | |
225 | ||
a8e45d23 PZ |
226 | %prep |
227 | %setup -q | |
646b7883 | 228 | %patch0 -p1 |
a8e45d23 PZ |
229 | |
230 | %build | |
aedf1bd3 JB |
231 | %{__gettextize} |
232 | %{__libtoolize} | |
233 | %{__aclocal} -I build/autotools | |
234 | %{__autoconf} | |
235 | %{__autoheader} | |
236 | %{__automake} | |
a8e45d23 | 237 | %configure \ |
bfeaf83d | 238 | %{!?with_gdkpixbuf:--disable-gdk-pixbuf} \ |
3b3536d4 JB |
239 | --disable-silent-rules \ |
240 | --enable-cairo \ | |
f877413a | 241 | %{?with_gstreamer:--enable-cogl-gst} \ |
3b3536d4 | 242 | --enable-cogl-pango \ |
646b7883 JB |
243 | %{?with_gles1:--enable-gles1 --with-gles1-libname=libGLESv1_CM.so.1} \ |
244 | %{?with_gles2:--enable-gles2 --with-gles2-libname=libGLESv2.so.2} \ | |
3b3536d4 | 245 | --enable-glx \ |
a8e45d23 | 246 | --enable-gtk-doc \ |
3b3536d4 | 247 | --enable-introspection \ |
b0b44050 | 248 | --enable-kms-egl-platform \ |
3b3536d4 | 249 | %{?with_static_libs:--enable-static} \ |
f877413a JB |
250 | %{?with_wayland:--enable-wayland-egl-platform} \ |
251 | %{?with_wayland:--enable-wayland-egl-server} \ | |
f05709a8 | 252 | --enable-xlib-egl-platform \ |
a8e45d23 PZ |
253 | --with-html-dir=%{_gtkdocdir} |
254 | %{__make} | |
255 | ||
256 | %install | |
257 | rm -rf $RPM_BUILD_ROOT | |
3b3536d4 | 258 | |
611aea59 | 259 | %{__make} -j1 install \ |
a8e45d23 PZ |
260 | DESTDIR=$RPM_BUILD_ROOT |
261 | ||
f877413a JB |
262 | %if %{with gstreamer} |
263 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.la | |
264 | %if %{with static_libs} | |
265 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.a | |
266 | %endif | |
267 | %endif | |
3b3536d4 | 268 | # obsoleted by pkg-config |
f877413a | 269 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcogl*.la |
a8e45d23 PZ |
270 | |
271 | %find_lang %{name} | |
272 | ||
3b3536d4 JB |
273 | %clean |
274 | rm -rf $RPM_BUILD_ROOT | |
a8e45d23 | 275 | |
3b3536d4 JB |
276 | %post -p /sbin/ldconfig |
277 | %postun -p /sbin/ldconfig | |
a8e45d23 | 278 | |
646b7883 JB |
279 | %post gles2 -p /sbin/ldconfig |
280 | %postun gles2 -p /sbin/ldconfig | |
281 | ||
282 | %post gst -p /sbin/ldconfig | |
283 | %postun gst -p /sbin/ldconfig | |
284 | ||
a8e45d23 PZ |
285 | %files -f %{name}.lang |
286 | %defattr(644,root,root,755) | |
3b3536d4 | 287 | %doc ChangeLog NEWS README |
a8e45d23 | 288 | %attr(755,root,root) %{_libdir}/libcogl.so.*.*.* |
e3b17614 | 289 | %attr(755,root,root) %ghost %{_libdir}/libcogl.so.20 |
a8e45d23 | 290 | %attr(755,root,root) %{_libdir}/libcogl-pango.so.*.*.* |
e3b17614 | 291 | %attr(755,root,root) %ghost %{_libdir}/libcogl-pango.so.20 |
07fb2d8c JR |
292 | %attr(755,root,root) %{_libdir}/libcogl-path.so.*.*.* |
293 | %attr(755,root,root) %ghost %{_libdir}/libcogl-path.so.20 | |
a8e45d23 PZ |
294 | %{_libdir}/girepository-1.0/Cogl-1.0.typelib |
295 | %{_libdir}/girepository-1.0/CoglPango-1.0.typelib | |
296 | ||
297 | %files devel | |
298 | %defattr(644,root,root,755) | |
3b3536d4 JB |
299 | %attr(755,root,root) %{_libdir}/libcogl.so |
300 | %attr(755,root,root) %{_libdir}/libcogl-pango.so | |
07fb2d8c | 301 | %attr(755,root,root) %{_libdir}/libcogl-path.so |
f877413a JB |
302 | %dir %{_includedir}/cogl |
303 | %{_includedir}/cogl/cogl | |
304 | %{_includedir}/cogl/cogl-pango | |
305 | %{_includedir}/cogl/cogl-path | |
a8e45d23 PZ |
306 | %{_pkgconfigdir}/cogl-1.0.pc |
307 | %{_pkgconfigdir}/cogl-2.0-experimental.pc | |
308 | %{_pkgconfigdir}/cogl-gl-1.0.pc | |
309 | %{_pkgconfigdir}/cogl-pango-1.0.pc | |
310 | %{_pkgconfigdir}/cogl-pango-2.0-experimental.pc | |
07fb2d8c JR |
311 | %{_pkgconfigdir}/cogl-path-1.0.pc |
312 | %{_pkgconfigdir}/cogl-path-2.0-experimental.pc | |
a8e45d23 PZ |
313 | %{_datadir}/gir-1.0/Cogl-1.0.gir |
314 | %{_datadir}/gir-1.0/CoglPango-1.0.gir | |
315 | ||
3b3536d4 JB |
316 | %if %{with static_libs} |
317 | %files static | |
318 | %defattr(644,root,root,755) | |
319 | %{_libdir}/libcogl.a | |
320 | %{_libdir}/libcogl-pango.a | |
07fb2d8c | 321 | %{_libdir}/libcogl-path.a |
3b3536d4 JB |
322 | %endif |
323 | ||
a8e45d23 PZ |
324 | %files doc |
325 | %defattr(644,root,root,755) | |
326 | %{_gtkdocdir}/cogl | |
327 | %{_gtkdocdir}/cogl-2.0-experimental | |
f877413a | 328 | |
646b7883 JB |
329 | %if %{with gles2} |
330 | %files gles2 | |
331 | %defattr(644,root,root,755) | |
332 | %attr(755,root,root) %{_libdir}/libcogl-gles2.so.*.*.* | |
e3b17614 | 333 | %attr(755,root,root) %ghost %{_libdir}/libcogl-gles2.so.20 |
646b7883 JB |
334 | |
335 | %files gles2-devel | |
336 | %defattr(644,root,root,755) | |
337 | %attr(755,root,root) %{_libdir}/libcogl-gles2.so | |
338 | %{_includedir}/cogl/cogl-gles2 | |
07fb2d8c JR |
339 | %{_pkgconfigdir}/cogl-gles2-1.0.pc |
340 | %{_pkgconfigdir}/cogl-gles2-2.0-experimental.pc | |
646b7883 JB |
341 | |
342 | %if %{with static_libs} | |
343 | %files gles2-static | |
344 | %defattr(644,root,root,755) | |
345 | %{_libdir}/libcogl-gles2.a | |
346 | %endif | |
347 | %endif | |
348 | ||
f877413a JB |
349 | %if %{with gstreamer} |
350 | %files gst | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_libdir}/libcogl-gst.so.*.*.* | |
e3b17614 | 353 | %attr(755,root,root) %ghost %{_libdir}/libcogl-gst.so.20 |
f877413a JB |
354 | %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstcogl.so |
355 | ||
356 | %files gst-devel | |
357 | %defattr(644,root,root,755) | |
358 | %attr(755,root,root) %{_libdir}/libcogl-gst.so | |
359 | %{_includedir}/cogl/cogl-gst | |
07fb2d8c JR |
360 | %{_pkgconfigdir}/cogl-gst-1.0.pc |
361 | %{_pkgconfigdir}/cogl-gst-2.0-experimental.pc | |
f877413a JB |
362 | |
363 | %if %{with static_libs} | |
364 | %files gst-static | |
365 | %defattr(644,root,root,755) | |
366 | %{_libdir}/libcogl-gst.a | |
367 | %endif | |
368 | ||
369 | %files gst-apidocs | |
370 | %defattr(644,root,root,755) | |
371 | %{_gtkdocdir}/cogl-gst | |
372 | %endif |