/[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 200697 - (show annotations) (download)
Wed Jan 25 02:51:24 2012 UTC (8 years, 10 months ago) by fwang
File size: 14588 byte(s)
new version 2.24.9
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 %(echo %{version}|cut -d. -f1,2)
49
50 %define gi_major 2.0
51 %define girname %mklibname gtk-gir %gi_major
52
53 Summary: The GIMP ToolKit (GTK+), a library for creating GUIs
54 Name: %{pkgname}%{api_version}
55 Version: 2.24.9
56 Release: %mkrel 1
57 License: LGPLv2+
58 Group: System/Libraries
59 Source0: http://download.gnome.org/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.24.7-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 Requires: xdg-user-dirs-gtk
117 Requires: 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: glib2.0-common
164 Requires(post): %{libname_x11} = %{version}
165 %if !%{enable_bootstrap}
166 Suggests: %{_lib}ia_ora-gnome
167 %endif
168
169 %description -n %{libname}
170 This package contains the library needed to run programs dynamically
171 linked with gtk+.
172
173 %post -n %{libname}
174 if [ "$1" = "2" ]; then
175 if [ -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules ]; then
176 rm -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules
177 fi
178 fi
179
180 %{_libdir}/gtk-%{api_version}/bin/gtk-query-immodules-%{api_version} > %{_sysconfdir}/gtk-%{api_version}/gtk.immodules.%{_lib}
181
182 %files -n %{libname}
183 %defattr(-, root, root)
184 %doc README
185 %ghost %verify (not md5 mtime size) %config(noreplace) %{_sysconfdir}/gtk-%{api_version}/gtk.immodules.%{_lib}
186 %dir %{_libdir}/gtk-%{api_version}
187 %dir %{_libdir}/gtk-%{api_version}/bin
188 %{_libdir}/gtk-%{api_version}/bin/gtk-query-immodules-%{api_version}
189 %dir %{_libdir}/gtk-%{api_version}/modules
190 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}.*
191 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules
192 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-am-et.so
193 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-cedilla.so
194 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-cyrillic-translit.so
195 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-inuktitut.so
196 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-ipa.so
197 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-multipress.so
198 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-thai.so
199 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-ti-er.so
200 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-ti-et.so
201 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-viqr.so
202 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-xim.so
203 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-tamilvp-tsc.so
204 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-tamilvp-uni.so
205 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-telex.so
206 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/immodules/im-vni.so
207 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}.*/engines
208 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/engines/*.so
209 %{_libdir}/gtk-%{api_version}/%{binary_version}.*/printbackends/*.so
210
211 #--------------------------------------------------------------------
212
213 %package -n %{develname}
214 Summary: Development files for GTK+ (GIMP ToolKit) applications
215 Group: Development/GNOME and GTK+
216 Obsoletes: %{libname_x11}-devel
217 Provides: %{libname_x11}-devel = %{version}-%{release}
218 Provides: gtk2-devel = %{version}-%{release}
219 Obsoletes: %{pkgname}2-devel
220 Obsoletes: lib%{pkgname}2-devel
221 Obsoletes: %mklibname -d %{pkgname} 2.0 0
222 Provides: %{pkgname}2-devel = %{version}-%{release}
223 Provides: lib%{pkgname}2-devel = %{version}-%{release}
224 Provides: lib%{pkgname}%{api_version}-devel = %{version}-%{release}
225 Provides: %{libname}-devel = %{version}-%{release}
226 Provides: lib%{pkgname}-x11-%{api_version}-devel = %{version}-%{release}
227 Requires: %{libname} = %{version}
228 Requires: %{libname_x11} = %{version}
229 Requires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version
230 Requires: libatk1.0-devel >= %{req_atk_version}
231 Requires: libpango1.0-devel >= %{req_pango_version}
232
233
234 %description -n %{develname}
235 The libgtk+-devel package contains the static libraries and header files
236 needed for developing GTK+ (GIMP ToolKit) applications. The libgtk+-devel
237 package contains GDK (the General Drawing Kit, which simplifies the interface
238 for writing GTK+ widgets and using GTK+ widgets in applications), and GTK+
239 (the widget set).
240
241 %files -n %develname
242 %defattr(-, root, root)
243 %doc docs/*.txt AUTHORS ChangeLog NEWS* README*
244 %doc %{_datadir}/gtk-doc/html/gdk
245 %doc %{_datadir}/gtk-doc/html/gtk
246 %{_bindir}/gtk-demo
247 %_bindir/gtk-builder-convert
248 %{_datadir}/aclocal/*
249 %{_datadir}/gtk-%{api_version}
250 %{_includedir}/gtk-unix-print-%{api_version}/
251 %{_includedir}/gtk-%{api_version}/gdk
252 %{_includedir}/gtk-%{api_version}/gtk
253 %{_libdir}/gtk-%{api_version}/include
254 %{_libdir}/pkgconfig/gdk-%{api_version}.pc
255 %{_libdir}/pkgconfig/gtk+-%{api_version}.pc
256 %{_libdir}/pkgconfig/gtk+-unix-print-%{api_version}.pc
257 %{_libdir}/*x11*.so
258 %_datadir/gir-1.0/Gdk-2.0.gir
259 %_datadir/gir-1.0/GdkX11-2.0.gir
260 %_datadir/gir-1.0/Gtk-2.0.gir
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
299 #--------------------------------------------------------------------
300
301 %package -n %gaildevelname
302 Summary: Static libraries, include files for GAIL
303 Group: Development/GNOME and GTK+
304 Provides: gail-devel = %{version}-%{release}
305 Provides: libgail-devel = %{version}-%{release}
306 Requires: %{gail_libname} = %{version}
307 Conflicts: %{_lib}gail17-devel
308 Obsoletes: %mklibname -d gail 18
309
310 %description -n %gaildevelname
311 Gail is the GNOME Accessibility Implementation Library
312
313 %files -n %gaildevelname
314 %defattr(-,root,root)
315 %{_datadir}/gtk-doc/html/gail-libgail-util
316 %{_libdir}/libgailutil.so
317 %{_includedir}/gail-1.0
318 %{_libdir}/pkgconfig/gail.pc
319
320 #--------------------------------------------------------------------
321
322 %package -n %{girname}
323 Summary: GObject Introspection interface description for %name
324 Group: System/Libraries
325 Requires: %{libname} = %{version}-%{release}
326 Requires: %{libname_x11} = %{version}-%{release}
327 Conflicts: %{mklibname %{name}-gir 2.0} < 2.24.5-5
328 Conflicts: %{mklibname %{pkgname}-x11- 2.0 0} < 2.24.5-3
329
330 %description -n %{girname}
331 GObject Introspection interface description for %name.
332
333 %files -n %{girname}
334 %_libdir/girepository-1.0/Gdk-%{gi_major}.typelib
335 %_libdir/girepository-1.0/GdkX11-%{gi_major}.typelib
336 %_libdir/girepository-1.0/Gtk-%{gi_major}.typelib
337
338 #--------------------------------------------------------------------
339
340 %prep
341 %setup -n %{pkgname}-%{version} -q
342 %patch4 -p1 -b .extra_im
343 %patch5 -p1 -b .fileselectorfallback
344 %patch12 -p1 -b .defaulttheme
345 %if !%{enable_bootstrap}
346 #gw disabled for bootstrapping
347 %patch13 -p1 -b .lib64
348 %endif
349 #patch15 -p1 -b .fixnautiluscrash
350 %patch18 -p1 -b .fresh-tooltips
351 #%patch19 -p1 -b .tooltip-positioning
352 %patch20 -p1 -b .window-dragging
353 %patch21 -p1 -b .icon-padding
354
355 %build
356 #needed by patches 4 & 13
357 %if !%{enable_bootstrap}
358 #gw disabled for bootstrapping
359 mkdir -p m4
360 autoreconf -fi
361 %endif
362
363 %ifarch ppc64
364 export CFLAGS="$RPM_OPT_FLAGS -mminimal-toc"
365 %endif
366
367 # Build X11 backend
368 #[ -d X11-build ] || mkdir X11-build
369 #cd X11-build
370
371 # fix crash in nautilus (GNOME bug #596977)
372 export CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-fomit-frame-pointer//g'`
373
374 #CONFIGURE_TOP=..
375 export CPPFLAGS="-DGTK_COMPILATION"
376 # --with-included-immodules=yes \
377 %configure2_5x --enable-xinerama \
378 --with-xinput=xfree \
379 %if !%enable_gtkdoc
380 --enable-gtk-doc=no
381 %endif
382
383 %make
384
385 %check
386 %if %enable_tests
387 #cd X11-build
388 XDISPLAY=$(i=1; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i)
389 %{_bindir}/Xvfb :$XDISPLAY &
390 export DISPLAY=:$XDISPLAY
391 make check
392 kill $(cat /tmp/.X$XDISPLAY-lock) ||:
393 #cd ..
394 %endif
395
396 %install
397 rm -rf $RPM_BUILD_ROOT
398
399 #cd X11-build
400 %makeinstall_std mandir=%{_mandir} RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
401
402
403 #cd ..
404
405 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-%{api_version}
406 touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-%{api_version}/gtk.immodules.%{_lib}
407 mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules
408
409 # handle biarch packages
410 progs="gtk-query-immodules-%{api_version}"
411 mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/bin
412 for f in $progs; do
413 mv -f $RPM_BUILD_ROOT%{_bindir}/$f $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/bin/
414 cat > $RPM_BUILD_ROOT%{_bindir}/$f << EOF
415 #!/bin/sh
416 lib=%{_lib}
417 case ":\$1:" in
418 :lib*:) lib="\$1"; shift 1;;
419 esac
420 exec %{_prefix}/\$lib/gtk-%{api_version}/bin/$f \${1+"\$@"}
421 EOF
422 chmod +x $RPM_BUILD_ROOT%{_bindir}/$f
423 done
424
425 %{find_lang} gtk20
426 %find_lang gtk20-properties
427 cat gtk20-properties.lang >> gtk20.lang
428
429 #remove not packaged files
430 find %{buildroot} -name *.la | xargs rm

  ViewVC Help
Powered by ViewVC 1.1.28