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

  ViewVC Help
Powered by ViewVC 1.1.30