1 |
# enable_gtkdoc: Toggle if gtk-doc files should be rebuilt. |
2 |
# 0 = no |
3 |
# 1 = yes |
4 |
%define enable_gtkdoc 0 |
5 |
|
6 |
# enable_bootstrap: Toggle if bootstrapping package |
7 |
# 0 = no |
8 |
# 1 = yes |
9 |
%define enable_bootstrap 0 |
10 |
|
11 |
# enable_tests: Run test suite in build |
12 |
# 0 = no |
13 |
# 1 = yes |
14 |
%define enable_tests 0 |
15 |
|
16 |
%{?_without_gtkdoc: %{expand: %%define enable_gtkdoc 0}} |
17 |
%{?_without_bootstrap: %{expand: %%define enable_bootstrap 0}} |
18 |
%{?_without_tests: %{expand: %%define enable_tests 0}} |
19 |
|
20 |
%{?_with_gtkdoc: %{expand: %%define enable_gtkdoc 1}} |
21 |
%{?_with_bootstrap: %{expand: %%define enable_bootstrap 1}} |
22 |
%{?_with_tests: %{expand: %%define enable_tests 1}} |
23 |
|
24 |
|
25 |
# required version of various libraries |
26 |
%define req_glib_version 2.28.0 |
27 |
%define req_pango_version 1.24.0 |
28 |
%define req_atk_version 1.30 |
29 |
%define req_cairo_version 1.10.0 |
30 |
%define req_gdk_pixbuf_version 2.22.0 |
31 |
|
32 |
%define pkgname gtk+ |
33 |
%define api 3 |
34 |
%define api_version 3.0 |
35 |
%define binary_version 3.0.0 |
36 |
%define lib_major 0 |
37 |
%define libname %mklibname %{pkgname} %{api} %{lib_major} |
38 |
%define develname %mklibname -d %pkgname %api_version |
39 |
|
40 |
%define gail_major 0 |
41 |
%define gail_libname %mklibname gail %{api} %gail_major |
42 |
%define gaildevelname %mklibname -d gail %api_version |
43 |
|
44 |
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs |
45 |
Name: %{pkgname}%{api_version} |
46 |
Version: 3.0.9 |
47 |
Release: %mkrel 1 |
48 |
License: LGPLv2+ |
49 |
Group: System/Libraries |
50 |
Source0: http://ftp.gnome.org/pub/GNOME/sources/%pkgname/%{pkgname}-%{version}.tar.bz2 |
51 |
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
52 |
URL: http://www.gtk.org |
53 |
Requires: common-licenses |
54 |
BuildRequires: gettext-devel |
55 |
BuildRequires: libglib2-devel >= %{req_glib_version} |
56 |
BuildRequires: libatk1.0-devel >= %{req_atk_version} |
57 |
BuildRequires: cairo-devel >= %{req_cairo_version} |
58 |
BuildRequires: pango-devel >= %{req_pango_version} |
59 |
BuildRequires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version |
60 |
BuildRequires: gobject-introspection-devel >= 0.10.1 |
61 |
BuildRequires: cups-devel |
62 |
BuildRequires: libx11-devel |
63 |
BuildRequires: libxrandr-devel |
64 |
BuildRequires: libxrender-devel |
65 |
BuildRequires: libxcursor-devel |
66 |
BuildRequires: libxfixes-devel |
67 |
BuildRequires: libxinerama-devel |
68 |
BuildRequires: libxcomposite-devel |
69 |
BuildRequires: libxdamage-devel |
70 |
BuildRequires: libxi-devel |
71 |
#gw needed for gtk-update-icon-cache in gtk+3.0 3.0.9 |
72 |
BuildRequires: gtk+2.0 |
73 |
%if %enable_tests |
74 |
BuildRequires: x11-server-xvfb |
75 |
%endif |
76 |
%if %enable_gtkdoc |
77 |
BuildRequires: gtk-doc >= 0.9 |
78 |
BuildRequires: sgml-tools |
79 |
BuildRequires: texinfo |
80 |
%endif |
81 |
# gw tests will fail without this |
82 |
BuildRequires: fonts-ttf-dejavu |
83 |
%if !%{enable_bootstrap} |
84 |
Suggests: xdg-user-dirs-gtk |
85 |
%endif |
86 |
Requires: %{libname} = %{version} |
87 |
Obsoletes: gtk-engines3 < 3.0.0 |
88 |
Provides: %{pkgname}%{api} = %{version}-%{release} |
89 |
|
90 |
%description |
91 |
The gtk+ package contains the GIMP ToolKit (GTK+), a library for creating |
92 |
graphical user interfaces for the X Window System. GTK+ was originally |
93 |
written for the GIMP (GNU Image Manipulation Program) image processing |
94 |
program, but is now used by several other programs as well. |
95 |
|
96 |
If you are planning on using the GIMP or another program that uses GTK+, |
97 |
you'll need to have the gtk+ package installed. |
98 |
|
99 |
%package -n %{libname} |
100 |
Summary: %{summary} |
101 |
Group: %{group} |
102 |
Provides: lib%{pkgname}%{api} = %{version}-%{release} |
103 |
Provides: lib%{name} = %{version}-%{release} |
104 |
Obsoletes: %{_lib}gtk+3.0_0 < 3.0.0 |
105 |
Obsoletes: %{_lib}gtk+-x11-3.0_0 < 3.0.0 |
106 |
Obsoletes: %{_lib}gtk-engines3 < 3.0.0 |
107 |
Requires: libglib2.0 >= %{req_glib_version} |
108 |
Requires: libpango1.0 >= %{req_pango_version} |
109 |
Requires: libatk1.0 >= %{req_atk_version} |
110 |
|
111 |
%description -n %{libname} |
112 |
This package contains the library needed to run programs dynamically |
113 |
linked with gtk+. |
114 |
|
115 |
%package -n %{develname} |
116 |
Summary: Development files for GTK+ (GIMP ToolKit) applications |
117 |
Group: Development/GNOME and GTK+ |
118 |
Provides: %{pkgname}%{api}-devel = %{version}-%{release} |
119 |
Provides: lib%{pkgname}%{api}-devel = %{version}-%{release} |
120 |
Provides: lib%{pkgname}%{api_version}-devel = %{version}-%{release} |
121 |
Provides: lib%{pkgname}-x11-%{api_version}-devel = %{version}-%{release} |
122 |
Provides: %{name}-devel = %{version}-%{release} |
123 |
Requires: %{libname} = %{version} |
124 |
Requires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version |
125 |
Requires: libatk1.0-devel >= %{req_atk_version} |
126 |
Requires: libpango1.0-devel >= %{req_pango_version} |
127 |
|
128 |
%description -n %{develname} |
129 |
The libgtk+-devel package contains the static libraries and header files |
130 |
needed for developing GTK+ (GIMP ToolKit) applications. The libgtk+-devel |
131 |
package contains GDK (the General Drawing Kit, which simplifies the interface |
132 |
for writing GTK+ widgets and using GTK+ widgets in applications), and GTK+ |
133 |
(the widget set). |
134 |
|
135 |
%package -n %{gail_libname} |
136 |
Summary: GNOME Accessibility Implementation Library |
137 |
Group: System/Libraries |
138 |
Provides: libgail = %{version}-%{release} |
139 |
Obsoletes: %{_lib}gail3.0_0 < 3.0.0 |
140 |
|
141 |
%description -n %{gail_libname} |
142 |
Gail is the GNOME Accessibility Implementation Library |
143 |
|
144 |
%package -n %gaildevelname |
145 |
Summary: Static libraries, include files for GAIL |
146 |
Group: Development/GNOME and GTK+ |
147 |
Provides: libgail-%{api_version}-devel = %{version}-%{release} |
148 |
Requires: %{gail_libname} = %{version} |
149 |
|
150 |
%description -n %gaildevelname |
151 |
Gail is the GNOME Accessibility Implementation Library |
152 |
|
153 |
%prep |
154 |
%setup -qn %{pkgname}-%{version} |
155 |
%apply_patches |
156 |
|
157 |
%build |
158 |
%ifarch ppc64 |
159 |
export CFLAGS="$RPM_OPT_FLAGS -mminimal-toc" |
160 |
%endif |
161 |
|
162 |
# fix crash in nautilus (GNOME bug #596977) |
163 |
export CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-fomit-frame-pointer//g'` |
164 |
|
165 |
export CPPFLAGS="-DGTK_COMPILATION" |
166 |
%configure2_5x --enable-xinerama \ |
167 |
--enable-gtk2-dependency |
168 |
|
169 |
%make |
170 |
|
171 |
%check |
172 |
%if %enable_tests |
173 |
XDISPLAY=$(i=1; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i) |
174 |
%{_bindir}/Xvfb :$XDISPLAY & |
175 |
export DISPLAY=:$XDISPLAY |
176 |
make check |
177 |
kill $(cat /tmp/.X$XDISPLAY-lock) ||: |
178 |
%endif |
179 |
|
180 |
%install |
181 |
rm -rf $RPM_BUILD_ROOT |
182 |
|
183 |
%makeinstall_std RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false |
184 |
|
185 |
touch $RPM_BUILD_ROOT%_libdir/gtk-%{api_version}/%{binary_version}/immodules.cache |
186 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules |
187 |
|
188 |
%if %_lib != lib |
189 |
mv %{buildroot}%{_bindir}/gtk-query-immodules-%{api_version} %{buildroot}%{_bindir}/gtk-query-immodules-%{api_version}-64 |
190 |
%else |
191 |
mv %{buildroot}%{_bindir}/gtk-query-immodules-%{api_version} %{buildroot}%{_bindir}/gtk-query-immodules-%{api_version}-32 |
192 |
%endif |
193 |
|
194 |
%{find_lang} gtk30 gtk30 gtk30-properties |
195 |
|
196 |
#remove not packaged files |
197 |
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.la \ |
198 |
$RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/loaders/*.la \ |
199 |
$RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/engines/*.la \ |
200 |
$RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends/*.la \ |
201 |
$RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules/*.la \ |
202 |
$RPM_BUILD_ROOT%_mandir/man1/gtk-update-icon-cache.1* |
203 |
|
204 |
%clean |
205 |
rm -rf $RPM_BUILD_ROOT |
206 |
|
207 |
%post -n %{libname} |
208 |
if [ "$1" = "2" ]; then |
209 |
if [ -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules ]; then |
210 |
rm -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules |
211 |
fi |
212 |
fi |
213 |
%if %_lib != lib |
214 |
%{_bindir}/gtk-query-immodules-%{api_version}-64 --update-cache |
215 |
%else |
216 |
%{_bindir}/gtk-query-immodules-%{api_version}-32 --update-cache |
217 |
%endif |
218 |
|
219 |
%triggerin -n %{libname} -- %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.so |
220 |
%if %_lib != lib |
221 |
%{_bindir}/gtk-query-immodules-%{api_version}-64 --update-cache |
222 |
%else |
223 |
%{_bindir}/gtk-query-immodules-%{api_version}-32 --update-cache |
224 |
%endif |
225 |
|
226 |
%triggerpostun -n %{libname} -- %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.so |
227 |
%if %_lib != lib |
228 |
%{_bindir}/gtk-query-immodules-%{api_version}-64 --update-cache |
229 |
%else |
230 |
%{_bindir}/gtk-query-immodules-%{api_version}-32 --update-cache |
231 |
%endif |
232 |
|
233 |
%files -f gtk30.lang |
234 |
%defattr(-, root, root) |
235 |
%doc README |
236 |
%_mandir/man1/gtk-query-immodules-%{api_version}.1* |
237 |
%{_datadir}/themes |
238 |
%{_datadir}/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml |
239 |
%dir %{_sysconfdir}/gtk-%{api_version} |
240 |
%config(noreplace) %{_sysconfdir}/gtk-%{api_version}/im-multipress.conf |
241 |
|
242 |
%files -n %{libname} |
243 |
%defattr(-, root, root) |
244 |
%doc README |
245 |
%{_bindir}/gtk-query-immodules-%{api_version}-* |
246 |
%ghost %verify (not md5 mtime size) %_libdir/gtk-%{api_version}/3.0.0/immodules.cache |
247 |
%dir %{_libdir}/gtk-%{api_version} |
248 |
%dir %{_libdir}/gtk-%{api_version}/modules |
249 |
%dir %{_libdir}/gtk-%{api_version}/%{binary_version} |
250 |
%dir %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules |
251 |
%{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.so |
252 |
%dir %{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends |
253 |
%{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends/*.so |
254 |
%{_libdir}/libgtk-3.so.%{lib_major} |
255 |
%{_libdir}/libgtk-3.so.%{lib_major}.* |
256 |
%{_libdir}/libgdk-3.so.%{lib_major} |
257 |
%{_libdir}/libgdk-3.so.%{lib_major}.* |
258 |
%_libdir/girepository-1.0/Gdk-%{api_version}.typelib |
259 |
%_libdir/girepository-1.0/GdkX11-%{api_version}.typelib |
260 |
%_libdir/girepository-1.0/Gtk-%{api_version}.typelib |
261 |
|
262 |
%files -n %{develname} |
263 |
%defattr(-, root, root) |
264 |
%doc docs/*.txt AUTHORS ChangeLog NEWS* README* |
265 |
%doc %{_datadir}/gtk-doc/html/gdk3 |
266 |
%doc %{_datadir}/gtk-doc/html/gtk3 |
267 |
%{_bindir}/gtk3-demo |
268 |
%{_datadir}/aclocal/* |
269 |
%{_datadir}/gtk-%{api_version} |
270 |
%{_includedir}/gtk-%{api_version} |
271 |
%{_libdir}/libgtk-%{api}.so |
272 |
%{_libdir}/libgtk-%{api}.la |
273 |
%{_libdir}/libgdk-%{api}.so |
274 |
%{_libdir}/libgdk-%{api}.la |
275 |
%{_libdir}/pkgconfig/gdk-*%{api_version}.pc |
276 |
%{_libdir}/pkgconfig/gtk+-*%{api_version}.pc |
277 |
%_datadir/gir-1.0/Gdk-%{api_version}.gir |
278 |
%_datadir/gir-1.0/GdkX11-%{api_version}.gir |
279 |
%_datadir/gir-1.0/Gtk-%{api_version}.gir |
280 |
|
281 |
%files -n %gail_libname |
282 |
%defattr(-,root,root) |
283 |
%{_libdir}/libgailutil-%{api}.so.%{gail_major}* |
284 |
%{_libdir}/gtk-%{api_version}/modules/libferret.so |
285 |
%{_libdir}/gtk-%{api_version}/modules/libgail.so |
286 |
|
287 |
%files -n %gaildevelname |
288 |
%defattr(-,root,root) |
289 |
%{_datadir}/gtk-doc/html/gail-libgail-util3 |
290 |
%{_libdir}/libgailutil-%{api}.so |
291 |
%{_libdir}/libgailutil-%{api}.la |
292 |
%{_includedir}/gail-%{api_version} |
293 |
%{_libdir}/pkgconfig/gail-%{api_version}.pc |