/[packages]/cauldron/gtk+2.0/current/SPECS/gtk+2.0.spec
ViewVC logotype

Contents of /cauldron/gtk+2.0/current/SPECS/gtk+2.0.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 119802 - (show annotations) (download)
Thu Jul 7 12:39:38 2011 UTC (12 years, 8 months ago) by dmorgan
File size: 14864 byte(s)
SILENT: Fix %%post
1 # enable_gtkdoc: Toggle if gtk-doc files should be rebuilt.
2 # 0 = no
3 # 1 = yes
4 %define enable_gtkdoc 1
5
6 # enable_bootstrap: Toggle if bootstrapping package
7 # 0 = no
8 # 1 = yes
9 # N.B. when disabling bootstrap, toggle enable_gtkdoc to 1, otherwise the build
10 # fails as autoreconf -fi exits with 1
11 %define enable_bootstrap 0
12
13 # enable_tests: Run test suite in build
14 # 0 = no
15 # 1 = yes
16 %define enable_tests 0
17
18 %{?_without_gtkdoc: %{expand: %%define enable_gtkdoc 0}}
19 %{?_without_bootstrap: %{expand: %%define enable_bootstrap 0}}
20 %{?_without_tests: %{expand: %%define enable_tests 0}}
21
22 %{?_with_gtkdoc: %{expand: %%define enable_gtkdoc 1}}
23 %{?_with_bootstrap: %{expand: %%define enable_bootstrap 1}}
24 %{?_with_tests: %{expand: %%define enable_tests 1}}
25
26
27 # required version of various libraries
28 %define req_glib_version 2.27.3
29 %define req_pango_version 1.20.0
30 %define req_atk_version 1.29.4
31 %define req_cairo_version 1.6.0
32 %define req_gdk_pixbuf_version 2.21.0
33
34 %define pkgname gtk+
35 %define api_version 2.0
36 %define binary_version 2.10
37 %define lib_major 0
38 %define libname %mklibname %{pkgname} %{api_version} %{lib_major}
39 %define libname_x11 %mklibname %{pkgname}-x11- %{api_version} %{lib_major}
40 %define develname %mklibname -d %pkgname %api_version
41
42 %define gail_major 18
43 %define gail_libname %mklibname gail %gail_major
44 %define gaildevelname %mklibname -d gail
45
46 %define git_url git://git.gnome.org/gtk+
47
48 %define major_url 2.24
49
50 %define gi_major 2.0
51 %define girname %mklibname %name-gir %gi_major
52
53 Summary: The GIMP ToolKit (GTK+), a library for creating GUIs
54 Name: %{pkgname}%{api_version}
55 Version: 2.24.5
56 Release: %mkrel 4
57 License: LGPLv2+
58 Group: System/Libraries
59 Source0: http://ftp.gnome.org/pub/gnome/sources/%{pkgname}/%{major_url}/%{pkgname}-%{version}.tar.xz
60 # extra IM modules (vietnamese and tamil) -- pablo
61 #gw TODO, needs to be fixed for 2.21.3
62 Patch4: gtk+-2.13.1-extra_im.patch
63 # (fc) 2.0.6-8mdk fix infinite loop and crash in file selector when / and $HOME are not readable (bug #90)
64 Patch5: gtk+-2.6.9-fileselectorfallback.patch
65 # (fc) 2.4.0-2mdk use Ia Ora theme by default if available
66 Patch12: gtk+-defaulttheme.patch
67 # (gb) 2.4.4-2mdk handle biarch
68 Patch13: gtk+-2.2.4-lib64.patch
69 # (fc) 2.18.2-2mdv fix nautilus crash (GNOME bug #596977) (pterjan)
70 Patch15: gtk+-2.18.1-fixnautiluscrash.patch
71 # (fc) 2.20.0-2mdv improve tooltip appareance (GNOME bug #599617) (Fedora)
72 Patch18: gtk+-2.21.1-fresh-tooltips.patch
73 # (fc) 2.20.0-2mdv improve tooltip positioning (GNOME bug #599618) (Fedora)
74 Patch19: gtk+-2.20.0-tooltip-positioning.patch
75 # (fc) 2.20.0-2mdv allow window dragging toolbars / menubar (GNOME bug #611313)
76 Patch20: gtk+-2.20.0-window-dragging.patch
77 # (fc) 2.20.0-3mdv allow specifying icon padding for tray icon (GNOME bug #583273) (Fedora)
78 Patch21: gtk+-2.20.0-icon-padding.patch
79
80 Conflicts: perl-Gtk2 < 1.113
81
82 URL: http://www.gtk.org
83 Requires: common-licenses
84 BuildRequires: gettext-devel
85 BuildRequires: libglib2.0-devel >= %{req_glib_version}
86 BuildRequires: libatk1.0-devel >= %{req_atk_version}
87 BuildRequires: cairo-devel >= %{req_cairo_version}
88 BuildRequires: pango-devel >= %{req_pango_version}
89 BuildRequires: gobject-introspection-devel >= 0.9.5
90 BuildRequires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version
91 BuildRequires: libx11-devel
92 BuildRequires: libxext-devel
93 BuildRequires: libxinerama-devel
94 BuildRequires: libxi-devel
95 BuildRequires: libxrender-devel
96 BuildRequires: libxrandr-devel
97 BuildRequires: libxcomposite-devel
98 BuildRequires: libxdamage-devel
99 BuildRequires: libxfixes-devel
100 BuildRequires: libxcursor-devel
101 BuildRequires: cups-devel
102 BuildRequires: fam-devel
103 %if %enable_tests
104 BuildRequires: x11-server-xvfb
105 %endif
106 %if %enable_gtkdoc
107 BuildRequires: gtk-doc >= 0.9
108 BuildRequires: sgml-tools
109 BuildRequires: texinfo
110 %endif
111 # gw tests will fail without this
112 BuildRequires: fonts-ttf-dejavu
113 # so that the demos don't fail to build
114 BuildRequires: shared-mime-info
115 %if !%{enable_bootstrap}
116 Suggests: xdg-user-dirs-gtk
117 Suggests: oxygen-gtk
118 %endif
119 Requires: %{libname} = %{version}
120 Provides: %{pkgname}2 = %{version}-%{release}
121 Obsoletes: %{pkgname}2
122 Provides: gail = %version-%release
123 Obsoletes: gail
124
125 %description
126 The gtk+ package contains the GIMP ToolKit (GTK+), a library for creating
127 graphical user interfaces for the X Window System. GTK+ was originally
128 written for the GIMP (GNU Image Manipulation Program) image processing
129 program, but is now used by several other programs as well.
130
131 If you are planning on using the GIMP or another program that uses GTK+,
132 you'll need to have the gtk+ package installed.
133
134
135 %post
136 if [ -d %{_datadir}/icons ]; then
137 for i in `/bin/ls %{_datadir}/icons` ; do
138 [ -d "%{_datadir}/icons/$i" -a -e "%{_datadir}/icons/$i/icon-theme.cache" -a -e "%{_datadir}/icons/$i/index.theme" ] && gtk-update-icon-cache --force --quiet %{_datadir}/icons/$i
139 done
140 exit 0
141 fi
142
143 %files -f gtk20.lang
144 %defattr(-, root, root)
145 %doc README
146 %{_bindir}/gtk-query-immodules-%{api_version}
147 %{_bindir}/gtk-update-icon-cache
148 %{_datadir}/themes
149 %dir %{_sysconfdir}/gtk-%{api_version}
150 %config(noreplace) %{_sysconfdir}/gtk-%{api_version}/im-multipress.conf
151
152 #--------------------------------------------------------------------
153
154 %package -n %{libname}
155 Summary: %{summary}
156 Group: %{group}
157 Obsoletes: lib%{pkgname}2
158 Provides: lib%{pkgname}2 = %{version}-%{release}
159 Provides: lib%{name} = %{version}-%{release}
160 Provides: gtk2 = %{version}-%{release}
161 Requires: libglib2.0 >= %{req_glib_version}
162 Requires: libpango1.0 >= %{req_pango_version}
163 Requires(post): %{libname_x11} = %{version}
164 %if !%{enable_bootstrap}
165 Suggests: %{_lib}ia_ora-gnome
166 %endif
167
168 %description -n %{libname}
169 This package contains the library needed to run programs dynamically
170 linked with gtk+.
171
172 %post -n %{libname}
173 if [ "$1" = "2" ]; then
174 if [ -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules ]; then
175 rm -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules
176 fi
177 fi
178
179 %{_libdir}/gtk-%{api_version}/bin/gtk-query-immodules-%{api_version} > %{_sysconfdir}/gtk-%{api_version}/gtk.immodules.%{_lib}
180
181 %files -n %{libname}
182 %defattr(-, root, root)
183 %doc README
184 %ghost %verify (not md5 mtime size) %config(noreplace) %{_sysconfdir}/gtk-%{api_version}/gtk.immodules.%{_lib}
185 %dir %{_libdir}/gtk-%{api_version}
186 %dir %{_libdir}/gtk-%{api_version}/bin
187 %{_libdir}/gtk-%{api_version}/bin/gtk-query-immodules-%{api_version}
188 %dir %{_libdir}/gtk-%{api_version}/modules
189 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}.*
190 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules
191 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-am-et.so
192 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-cedilla.so
193 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-cyrillic-translit.so
194 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-inuktitut.so
195 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-ipa.so
196 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-multipress.so
197 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-thai.so
198 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-ti-er.so
199 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-ti-et.so
200 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-viqr.so
201 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-xim.so
202 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-tamilvp-tsc.so
203 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-tamilvp-uni.so
204 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-telex.so
205 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-vni.so
206 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}.*/engines
207 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/engines/*.so
208 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/printbackends/*.so
209
210 #--------------------------------------------------------------------
211
212 %package -n %{develname}
213 Summary: Development files for GTK+ (GIMP ToolKit) applications
214 Group: Development/GNOME and GTK+
215 Obsoletes: %{libname_x11}-devel
216 Provides: %{libname_x11}-devel = %{version}-%{release}
217 Provides: gtk2-devel = %{version}-%{release}
218 Obsoletes: %{pkgname}2-devel
219 Obsoletes: lib%{pkgname}2-devel
220 Obsoletes: %mklibname -d %{pkgname} 2.0 0
221 Provides: %{pkgname}2-devel = %{version}-%{release}
222 Provides: lib%{pkgname}2-devel = %{version}-%{release}
223 Provides: lib%{pkgname}%{api_version}-devel = %{version}-%{release}
224 Provides: %{libname}-devel = %{version}-%{release}
225 Provides: lib%{pkgname}-x11-%{api_version}-devel = %{version}-%{release}
226 Requires: %{libname} = %{version}
227 Requires: %{libname_x11} = %{version}
228 Requires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version
229 Requires: libatk1.0-devel >= %{req_atk_version}
230 Requires: libpango1.0-devel >= %{req_pango_version}
231
232
233 %description -n %{develname}
234 The libgtk+-devel package contains the static libraries and header files
235 needed for developing GTK+ (GIMP ToolKit) applications. The libgtk+-devel
236 package contains GDK (the General Drawing Kit, which simplifies the interface
237 for writing GTK+ widgets and using GTK+ widgets in applications), and GTK+
238 (the widget set).
239
240 %files -n %develname
241 %defattr(-, root, root)
242 %doc docs/*.txt AUTHORS ChangeLog NEWS* README*
243 %doc %{_datadir}/gtk-doc/html/gdk
244 %doc %{_datadir}/gtk-doc/html/gtk
245 %{_bindir}/gtk-demo
246 %_bindir/gtk-builder-convert
247 %{_datadir}/aclocal/*
248 %{_datadir}/gtk-%{api_version}
249 %{_includedir}/gtk-unix-print-%{api_version}/
250 %{_includedir}/gtk-%{api_version}/gdk
251 %{_includedir}/gtk-%{api_version}/gtk
252 %{_libdir}/gtk-%{api_version}/include
253 %{_libdir}/pkgconfig/gdk-%{api_version}.pc
254 %{_libdir}/pkgconfig/gtk+-%{api_version}.pc
255 %{_libdir}/pkgconfig/gtk+-unix-print-%{api_version}.pc
256 %{_libdir}/*x11*.so
257 %_datadir/gir-1.0/Gdk-2.0.gir
258 %_datadir/gir-1.0/GdkX11-2.0.gir
259 %_datadir/gir-1.0/Gtk-2.0.gir
260 %attr(644,root,root) %{_libdir}/*x11*.la
261 %{_libdir}/pkgconfig/*x11*
262
263 #--------------------------------------------------------------------
264
265 %package -n %{libname_x11}
266 Summary: X11 backend of The GIMP ToolKit (GTK+)
267 Group: System/Libraries
268 Provides: lib%{pkgname}-x11-%{api_version} = %{version}-%{release}
269 Provides: %{name}-backend = %{version}-%{release}
270 Requires: %{libname} = %{version}
271 Requires: %{name} >= %{version}-%{release}
272 Requires: libatk1.0 >= %{req_atk_version}
273 Conflicts: gir-repository < 0.6.5-4
274
275 %description -n %{libname_x11}
276 This package contains the X11 version of library needed to run
277 programs dynamically linked with gtk+.
278
279 %files -n %{libname_x11}
280 %defattr(-, root, root)
281 %{_libdir}/*x11*.so.*
282
283 #--------------------------------------------------------------------
284
285 %package -n %{gail_libname}
286 Summary: GNOME Accessibility Implementation Library
287 Group: System/Libraries
288 Provides: libgail = %{version}-%{release}
289
290 %description -n %{gail_libname}
291 Gail is the GNOME Accessibility Implementation Library
292
293 %files -n %gail_libname
294 %defattr(-,root,root)
295 %{_libdir}/libgailutil.so.%{gail_major}*
296 %{_libdir}/gtk-2.0/modules/libferret.so
297 %{_libdir}/gtk-2.0/modules/libgail.so
298 %attr(644,root,root) %{_libdir}/libgailutil.la
299
300 #--------------------------------------------------------------------
301
302 %package -n %gaildevelname
303 Summary: Static libraries, include files for GAIL
304 Group: Development/GNOME and GTK+
305 Provides: gail-devel = %{version}-%{release}
306 Provides: libgail-devel = %{version}-%{release}
307 Requires: %{gail_libname} = %{version}
308 Conflicts: %{_lib}gail17-devel
309 Obsoletes: %mklibname -d gail 18
310
311 %description -n %gaildevelname
312 Gail is the GNOME Accessibility Implementation Library
313
314 %files -n %gaildevelname
315 %defattr(-,root,root)
316 %{_datadir}/gtk-doc/html/gail-libgail-util
317 %{_libdir}/libgailutil.so
318 %{_includedir}/gail-1.0
319 %{_libdir}/pkgconfig/gail.pc
320
321 #--------------------------------------------------------------------
322
323 %package -n %{girname}
324 Summary: GObject Introspection interface description for %name
325 Group: System/Libraries
326 Conflicts: %mklibname gdata 7
327 Requires: %{libname} = %{version}-%{release}
328
329 %description -n %{girname}
330 GObject Introspection interface description for %name.
331
332 %files -n %{girname}
333 %_libdir/girepository-1.0/Gdk-%{_gi_major}.typelib
334 %_libdir/girepository-1.0/GdkX11-%{_gi_major}.typelib
335 %_libdir/girepository-1.0/Gtk-%{_gi_major}.typelib
336
337 #--------------------------------------------------------------------
338
339 %prep
340 %setup -n %{pkgname}-%{version} -q
341 %patch4 -p1 -b .extra_im
342 %patch5 -p1 -b .fileselectorfallback
343 %patch12 -p1 -b .defaulttheme
344 %if !%{enable_bootstrap}
345 #gw disabled for bootstrapping
346 %patch13 -p1 -b .lib64
347 %endif
348 #patch15 -p1 -b .fixnautiluscrash
349 %patch18 -p1 -b .fresh-tooltips
350 #%patch19 -p1 -b .tooltip-positioning
351 %patch20 -p1 -b .window-dragging
352 %patch21 -p1 -b .icon-padding
353
354 #needed by patches 4 & 13
355 %if !%{enable_bootstrap}
356 #gw disabled for bootstrapping
357 mkdir -p m4
358 autoreconf -fi
359 %endif
360
361 %build
362 %ifarch ppc64
363 export CFLAGS="$RPM_OPT_FLAGS -mminimal-toc"
364 %endif
365
366 # Build X11 backend
367 #[ -d X11-build ] || mkdir X11-build
368 #cd X11-build
369
370 # fix crash in nautilus (GNOME bug #596977)
371 export CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-fomit-frame-pointer//g'`
372
373 #CONFIGURE_TOP=..
374 export CPPFLAGS="-DGTK_COMPILATION"
375 # --with-included-immodules=yes \
376 %configure2_5x --enable-xinerama \
377 --with-xinput=xfree \
378 %if !%enable_gtkdoc
379 --enable-gtk-doc=no
380 %endif
381
382 %make
383
384 %check
385 %if %enable_tests
386 #cd X11-build
387 XDISPLAY=$(i=1; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i)
388 %{_bindir}/Xvfb :$XDISPLAY &
389 export DISPLAY=:$XDISPLAY
390 make check
391 kill $(cat /tmp/.X$XDISPLAY-lock) ||:
392 #cd ..
393 %endif
394
395 %install
396 rm -rf $RPM_BUILD_ROOT
397
398 #cd X11-build
399 %makeinstall_std mandir=%{_mandir} RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
400
401
402 #cd ..
403
404 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-%{api_version}
405 touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-%{api_version}/gtk.immodules.%{_lib}
406 mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules
407
408 # handle biarch packages
409 progs="gtk-query-immodules-%{api_version}"
410 mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/bin
411 for f in $progs; do
412 mv -f $RPM_BUILD_ROOT%{_bindir}/$f $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/bin/
413 cat > $RPM_BUILD_ROOT%{_bindir}/$f << EOF
414 #!/bin/sh
415 lib=%{_lib}
416 case ":\$1:" in
417 :lib*:) lib="\$1"; shift 1;;
418 esac
419 exec %{_prefix}/\$lib/gtk-%{api_version}/bin/$f \${1+"\$@"}
420 EOF
421 chmod +x $RPM_BUILD_ROOT%{_bindir}/$f
422 done
423
424 %{find_lang} gtk20
425 %find_lang gtk20-properties
426 cat gtk20-properties.lang >> gtk20.lang
427
428 #remove not packaged files
429 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/*.la \
430 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}.*/loaders/*.la \
431 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}.*/engines/*.la \
432 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}.*/printbackends/*.la \
433 $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.la
434

  ViewVC Help
Powered by ViewVC 1.1.30