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