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

  ViewVC Help
Powered by ViewVC 1.1.30