1 |
%define major 12 |
2 |
%define pangomajor 1 |
3 |
%define gi_major 1.0 |
4 |
|
5 |
%define libname %mklibname %{name} %{major} |
6 |
%define libname_pango %mklibname %{name}-pango %{pangomajor} |
7 |
%define develname %mklibname -d %{name} |
8 |
%define girname %mklibname %{name}-gir %{gi_major} |
9 |
%define girname_pango %mklibname %{name}-pango-gir %{gi_major} |
10 |
|
11 |
%define url_ver %(echo %{version}|cut -d. -f1,2) |
12 |
|
13 |
Name: cogl |
14 |
Version: 1.14.0 |
15 |
Release: %mkrel 1 |
16 |
Summary: A library for using 3D graphics hardware to draw pretty pictures |
17 |
Group: System/Libraries |
18 |
License: LGPLv2+ |
19 |
URL: http://www.clutter-project.org/ |
20 |
Source0: http://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz |
21 |
BuildRequires: pkgconfig(gl) |
22 |
BuildRequires: pkgconfig(x11) |
23 |
BuildRequires: pkgconfig(xext) |
24 |
BuildRequires: pkgconfig(xfixes) >= 3 |
25 |
BuildRequires: pkgconfig(xdamage) |
26 |
BuildRequires: pkgconfig(xrandr) |
27 |
BuildRequires: pkgconfig(xcomposite) >= 0.4 |
28 |
BuildRequires: pkgconfig(gobject-2.0) >= 2.28.0 |
29 |
BuildRequires: pkgconfig(gmodule-no-export-2.0) |
30 |
BuildRequires: pkgconfig(gdk-pixbuf-2.0) |
31 |
BuildRequires: pkgconfig(cairo) >= 1.10 |
32 |
BuildRequires: pkgconfig(pangocairo) >= 1.20 |
33 |
BuildRequires: pkgconfig(gobject-introspection-1.0) |
34 |
BuildRequires: pkgconfig(gtk-doc) |
35 |
|
36 |
%description |
37 |
Cogl is a small open source library for using 3D graphics hardware to draw |
38 |
pretty pictures. The API departs from the flat state machine style of |
39 |
OpenGL and is designed to make it easy to write orthogonal components that |
40 |
can render without stepping on each others toes. |
41 |
|
42 |
As well aiming for a nice API, we think having a single library as opposed |
43 |
to an API specification like OpenGL has a few advantages too; like being |
44 |
able to paper over the inconsistencies/bugs of different OpenGL |
45 |
implementations in a centralized place, not to mention the myriad of OpenGL |
46 |
extensions. It also means we are in a better position to provide utility |
47 |
APIs that help software developers since they only need to be implemented |
48 |
once and there is no risk of inconsistency between implementations. |
49 |
|
50 |
Having other backends, besides OpenGL, such as drm, Gallium or D3D are |
51 |
options we are interested in for the future. |
52 |
|
53 |
#-------------------------------------------------------------------- |
54 |
|
55 |
%package i18n |
56 |
Summary: Translations for %{name} |
57 |
Group: System/Internationalization |
58 |
Obsoletes: %{name} < 1.9.2 |
59 |
BuildArch: noarch |
60 |
|
61 |
%description i18n |
62 |
This contains the translation data for %{name}. |
63 |
|
64 |
%files i18n -f %{name}.lang |
65 |
|
66 |
#-------------------------------------------------------------------- |
67 |
|
68 |
%package -n %{libname} |
69 |
Summary: A library for using 3D graphics hardware to draw pretty pictures |
70 |
Group: System/Libraries |
71 |
Requires: %{name}-i18n |
72 |
|
73 |
%description -n %{libname} |
74 |
Cogl is a small open source library for using 3D graphics hardware to draw |
75 |
pretty pictures. The API departs from the flat state machine style of |
76 |
OpenGL and is designed to make it easy to write orthogonal components that |
77 |
can render without stepping on each others toes. |
78 |
|
79 |
As well aiming for a nice API, we think having a single library as opposed |
80 |
to an API specification like OpenGL has a few advantages too; like being |
81 |
able to paper over the inconsistencies/bugs of different OpenGL |
82 |
implementations in a centralized place, not to mention the myriad of OpenGL |
83 |
extensions. It also means we are in a better position to provide utility |
84 |
APIs that help software developers since they only need to be implemented |
85 |
once and there is no risk of inconsistency between implementations. |
86 |
|
87 |
Having other backends, besides OpenGL, such as drm, Gallium or D3D are |
88 |
options we are interested in for the future. |
89 |
|
90 |
%files -n %{libname} |
91 |
%{_libdir}/libcogl.so.%{major}* |
92 |
|
93 |
#-------------------------------------------------------------------- |
94 |
|
95 |
%package -n %{libname_pango} |
96 |
Summary: A library for using 3D graphics hardware to draw pretty pictures |
97 |
Group: System/Libraries |
98 |
Requires: %{name}-i18n |
99 |
|
100 |
%description -n %{libname_pango} |
101 |
Cogl is a small open source library for using 3D graphics hardware to draw |
102 |
pretty pictures. The API departs from the flat state machine style of |
103 |
OpenGL and is designed to make it easy to write orthogonal components that |
104 |
can render without stepping on each others toes. |
105 |
|
106 |
As well aiming for a nice API, we think having a single library as opposed |
107 |
to an API specification like OpenGL has a few advantages too; like being |
108 |
able to paper over the inconsistencies/bugs of different OpenGL |
109 |
implementations in a centralized place, not to mention the myriad of OpenGL |
110 |
extensions. It also means we are in a better position to provide utility |
111 |
APIs that help software developers since they only need to be implemented |
112 |
once and there is no risk of inconsistency between implementations. |
113 |
|
114 |
Having other backends, besides OpenGL, such as drm, Gallium or D3D are |
115 |
options we are interested in for the future. |
116 |
|
117 |
%files -n %{libname_pango} |
118 |
%{_libdir}/libcogl-pango.so.%{pangomajor}* |
119 |
|
120 |
#-------------------------------------------------------------------- |
121 |
|
122 |
%package -n %{girname} |
123 |
Summary: GObject Introspection interface description for %{name} |
124 |
Group: System/Libraries |
125 |
Requires: %{libname} = %{version}-%{release} |
126 |
Conflicts: %{mklibname %{name}-gir 0.0} < %{version} |
127 |
Conflicts: %{mklibname clutter 1.0 0} < 1.7.2 |
128 |
|
129 |
%description -n %{girname} |
130 |
GObject Introspection interface description for %{name}. |
131 |
|
132 |
%files -n %{girname} |
133 |
%{_libdir}/girepository-1.0/Cogl-%{gi_major}.typelib |
134 |
|
135 |
#-------------------------------------------------------------------- |
136 |
|
137 |
%package -n %{girname_pango} |
138 |
Summary: GObject Introspection interface description for %{name}-pango |
139 |
Group: System/Libraries |
140 |
Requires: %{libname_pango} = %{version}-%{release} |
141 |
Conflicts: %{_lib}cogl-gir0.0 < %{version} |
142 |
|
143 |
%description -n %{girname_pango} |
144 |
GObject Introspection interface description for %{name}-pango. |
145 |
|
146 |
%files -n %{girname_pango} |
147 |
%{_libdir}/girepository-1.0/CoglPango-%{gi_major}.typelib |
148 |
|
149 |
#-------------------------------------------------------------------- |
150 |
|
151 |
%package -n %{develname} |
152 |
Summary: %{name} development environment |
153 |
Group: Development/C |
154 |
Provides: %{name}-devel = %{version}-%{release} |
155 |
Provides: lib%{name}-devel = %{version}-%{release} |
156 |
Requires: %{libname_pango} = %{version}-%{release} |
157 |
Requires: %{libname} = %{version}-%{release} |
158 |
Requires: pkgconfig(gl) |
159 |
Conflicts: %{mklibname -d clutter 1.0} <= 1.6.16 |
160 |
|
161 |
%description -n %{develname} |
162 |
Header files and libraries for building and developing apps with %{name}. |
163 |
|
164 |
%files -n %{develname} |
165 |
%doc NEWS README ChangeLog |
166 |
%{_includedir}/cogl |
167 |
%{_libdir}/libcogl*.so |
168 |
%{_libdir}/pkgconfig/*.pc |
169 |
%{_datadir}/gir-1.0/Cogl*-%{gi_major}.gir |
170 |
|
171 |
#-------------------------------------------------------------------- |
172 |
|
173 |
%package doc |
174 |
Summary: Documentation for %{name} |
175 |
Group: Documentation |
176 |
Requires: %{name}-devel = %{version}-%{release} |
177 |
BuildArch: noarch |
178 |
|
179 |
%description doc |
180 |
This package contains documentation for %{name}. |
181 |
|
182 |
%files doc |
183 |
%{_datadir}/gtk-doc/html/cogl |
184 |
%{_datadir}/gtk-doc/html/cogl-2.0-experimental |
185 |
|
186 |
#-------------------------------------------------------------------- |
187 |
|
188 |
%prep |
189 |
%setup -q |
190 |
|
191 |
%build |
192 |
CFLAGS="%{optflags} -fPIC" |
193 |
|
194 |
%configure2_5x \ |
195 |
--enable-cairo=yes \ |
196 |
--enable-gdk-pixbuf=yes \ |
197 |
--enable-cogl-pango=yes \ |
198 |
--enable-glx=yes \ |
199 |
--enable-gtk-doc \ |
200 |
--enable-introspection=yes \ |
201 |
--enable-examples-install=no |
202 |
%make |
203 |
|
204 |
%install |
205 |
%makeinstall_std |
206 |
|
207 |
#Remove examples |
208 |
rm -rf %{buildroot}%{_datadir}/%{name}/examples-data/ |
209 |
|
210 |
#Remove libtool archives. |
211 |
find %{buildroot} -name "*.la" -delete |
212 |
|
213 |
%find_lang %{name} |