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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103472 - (show annotations) (download)
Sat Jun 11 13:04:37 2011 UTC (10 years, 3 months ago) by cjw
File size: 10222 byte(s)
- add missing dep on gtk+3.0 to library package

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.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.11
47 Release: %mkrel 5
48 License: LGPLv2+
49 Group: System/Libraries
50 Source0: http://ftp.gnome.org/pub/GNOME/sources/%pkgname/%{pkgname}-%{version}.tar.xz
51 Source1: im-cedilla.conf
52 %if !%{enable_bootstrap}
53 # use oxygen gtk3 theme by default if available
54 Patch12: gtk+-defaulttheme.patch
55 %endif
56 URL: http://www.gtk.org
57 Requires: common-licenses
58 BuildRequires: gettext-devel
59 BuildRequires: libglib2-devel >= %{req_glib_version}
60 BuildRequires: libatk1.0-devel >= %{req_atk_version}
61 BuildRequires: cairo-devel >= %{req_cairo_version}
62 BuildRequires: pango-devel >= %{req_pango_version}
63 BuildRequires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version
64 BuildRequires: gobject-introspection-devel >= 0.10.1
65 BuildRequires: cups-devel
66 BuildRequires: libx11-devel
67 BuildRequires: libxrandr-devel
68 BuildRequires: libxrender-devel
69 BuildRequires: libxcursor-devel
70 BuildRequires: libxfixes-devel
71 BuildRequires: libxinerama-devel
72 BuildRequires: libxcomposite-devel
73 BuildRequires: libxdamage-devel
74 BuildRequires: libxi-devel
75 #gw needed for gtk-update-icon-cache in gtk+3.0 3.0.9
76 BuildRequires: gtk+2.0
77 %if %enable_tests
78 BuildRequires: x11-server-xvfb
79 %endif
80 %if %enable_gtkdoc
81 BuildRequires: gtk-doc >= 0.9
82 BuildRequires: sgml-tools
83 BuildRequires: texinfo
84 %endif
85 # gw tests will fail without this
86 BuildRequires: fonts-ttf-dejavu
87 %if !%{enable_bootstrap}
88 Suggests: xdg-user-dirs-gtk
89 Suggests: oxygen-gtk3
90 %endif
91 Requires: %{libname} = %{version}
92 Obsoletes: gtk-engines3 < 3.0.0
93 Provides: %{pkgname}%{api} = %{version}-%{release}
94
95 %description
96 The gtk+ package contains the GIMP ToolKit (GTK+), a library for creating
97 graphical user interfaces for the X Window System. GTK+ was originally
98 written for the GIMP (GNU Image Manipulation Program) image processing
99 program, but is now used by several other programs as well.
100
101 If you are planning on using the GIMP or another program that uses GTK+,
102 you'll need to have the gtk+ package installed.
103
104 %post
105 gtk-query-immodules-3.0-%{__isa_bits} --update-cache
106 glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
107
108 %files -f gtk30.lang
109 %defattr(-, root, root)
110 %doc README
111 %_mandir/man1/gtk-query-immodules-%{api_version}.1*
112 %{_datadir}/themes
113 %{_datadir}/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml
114 %dir %{_sysconfdir}/gtk-%{api_version}
115 %config(noreplace) %{_sysconfdir}/gtk-%{api_version}/im-multipress.conf
116 %{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
117
118 #--------------------------------------------------------------------
119
120 %package -n %{libname}
121 Summary: %{summary}
122 Group: %{group}
123 Provides: lib%{pkgname}%{api} = %{version}-%{release}
124 Provides: lib%{name} = %{version}-%{release}
125 Obsoletes: %{_lib}gtk+3.0_0 < 3.0.0
126 Obsoletes: %{_lib}gtk+-x11-3.0_0 < 3.0.0
127 Obsoletes: %{_lib}gtk-engines3 < 3.0.0
128 Requires: libglib2.0 >= %{req_glib_version}
129 Requires: libpango1.0 >= %{req_pango_version}
130 Requires: libatk1.0 >= %{req_atk_version}
131 Requires: gtk+3.0 = %{version}-%{release}
132
133 %description -n %{libname}
134 This package contains the library needed to run programs dynamically
135 linked with gtk+.
136
137 %post -n %{libname}
138 if [ "$1" = "2" ]; then
139 if [ -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules ]; then
140 rm -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules
141 fi
142 fi
143 gtk-query-immodules-3.0-%{__isa_bits} --update-cache
144
145 %files -n %{libname}
146 %defattr(-, root, root)
147 %doc README
148 %{_bindir}/gtk-query-immodules-%{api_version}-*
149 %ghost %verify (not md5 mtime size) %_libdir/gtk-%{api_version}/3.0.0/immodules.cache
150 %dir %{_libdir}/gtk-%{api_version}
151 %dir %{_libdir}/gtk-%{api_version}/modules
152 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}
153 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules
154 %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.so
155 %dir %{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends
156 %{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends/*.so
157 %{_libdir}/libgtk-3.so.%{lib_major}
158 %{_libdir}/libgtk-3.so.%{lib_major}.*
159 %{_libdir}/libgdk-3.so.%{lib_major}
160 %{_libdir}/libgdk-3.so.%{lib_major}.*
161 %_libdir/girepository-1.0/Gdk-%{api_version}.typelib
162 %_libdir/girepository-1.0/GdkX11-%{api_version}.typelib
163 %_libdir/girepository-1.0/Gtk-%{api_version}.typelib
164
165 #--------------------------------------------------------------------
166
167 %package -n %{develname}
168 Summary: Development files for GTK+ (GIMP ToolKit) applications
169 Group: Development/GNOME and GTK+
170 Provides: %{pkgname}%{api}-devel = %{version}-%{release}
171 Provides: lib%{pkgname}%{api}-devel = %{version}-%{release}
172 Provides: lib%{pkgname}%{api_version}-devel = %{version}-%{release}
173 Provides: lib%{pkgname}-x11-%{api_version}-devel = %{version}-%{release}
174 Provides: %{name}-devel = %{version}-%{release}
175 Requires: %{libname} = %{version}
176 Requires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version
177 Requires: libatk1.0-devel >= %{req_atk_version}
178 Requires: libpango1.0-devel >= %{req_pango_version}
179
180 %description -n %{develname}
181 The libgtk+-devel package contains the static libraries and header files
182 needed for developing GTK+ (GIMP ToolKit) applications. The libgtk+-devel
183 package contains GDK (the General Drawing Kit, which simplifies the interface
184 for writing GTK+ widgets and using GTK+ widgets in applications), and GTK+
185 (the widget set).
186
187 %files -n %{develname}
188 %defattr(-, root, root)
189 %doc docs/*.txt AUTHORS ChangeLog NEWS* README*
190 %doc %{_datadir}/gtk-doc/html/gdk3
191 %doc %{_datadir}/gtk-doc/html/gtk3
192 %{_bindir}/gtk3-demo
193 %{_datadir}/aclocal/*
194 %{_datadir}/gtk-%{api_version}
195 %{_includedir}/gtk-%{api_version}
196 %{_libdir}/libgtk-%{api}.so
197 %{_libdir}/libgtk-%{api}.la
198 %{_libdir}/libgdk-%{api}.so
199 %{_libdir}/libgdk-%{api}.la
200 %{_libdir}/pkgconfig/gdk-*%{api_version}.pc
201 %{_libdir}/pkgconfig/gtk+-*%{api_version}.pc
202 %_datadir/gir-1.0/Gdk-%{api_version}.gir
203 %_datadir/gir-1.0/GdkX11-%{api_version}.gir
204 %_datadir/gir-1.0/Gtk-%{api_version}.gir
205
206 #--------------------------------------------------------------------
207
208 %package -n %{gail_libname}
209 Summary: GNOME Accessibility Implementation Library
210 Group: System/Libraries
211 Provides: libgail = %{version}-%{release}
212 Obsoletes: %{_lib}gail3.0_0 < 3.0.0
213
214 %description -n %{gail_libname}
215 Gail is the GNOME Accessibility Implementation Library
216
217 %files -n %gail_libname
218 %defattr(-,root,root)
219 %{_libdir}/libgailutil-%{api}.so.%{gail_major}*
220 %{_libdir}/gtk-%{api_version}/modules/libferret.so
221 %{_libdir}/gtk-%{api_version}/modules/libgail.so
222
223 #--------------------------------------------------------------------
224
225 %package -n %gaildevelname
226 Summary: Static libraries, include files for GAIL
227 Group: Development/GNOME and GTK+
228 Provides: libgail-%{api_version}-devel = %{version}-%{release}
229 Requires: %{gail_libname} = %{version}
230
231 %description -n %gaildevelname
232 Gail is the GNOME Accessibility Implementation Library
233
234 %files -n %gaildevelname
235 %defattr(-,root,root)
236 %{_datadir}/gtk-doc/html/gail-libgail-util3
237 %{_libdir}/libgailutil-%{api}.so
238 %{_includedir}/gail-%{api_version}
239 %{_libdir}/pkgconfig/gail-%{api_version}.pc
240
241 #--------------------------------------------------------------------
242
243 %prep
244 %setup -qn %{pkgname}-%{version}
245 %apply_patches
246
247 %build
248
249 (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
250 %configure $CONFIGFLAGS \
251 --enable-gtk2-dependency \
252 --enable-xkb \
253 --enable-xinerama \
254 --enable-xinput \
255 --enable-xrandr \
256 --enable-xfixes \
257 --enable-xcomposite \
258 --enable-xdamage \
259 --enable-x11-backend \
260 )
261
262 # fight unused direct deps
263 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
264
265 %make
266
267 %check
268 %if %enable_tests
269 XDISPLAY=$(i=1; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i)
270 %{_bindir}/Xvfb :$XDISPLAY &
271 export DISPLAY=:$XDISPLAY
272 make check
273 kill $(cat /tmp/.X$XDISPLAY-lock) ||:
274 %endif
275
276 %install
277 rm -rf $RPM_BUILD_ROOT
278
279 %makeinstall_std RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
280
281 touch $RPM_BUILD_ROOT%_libdir/gtk-%{api_version}/%{binary_version}/immodules.cache
282 mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules
283
284 (cd $RPM_BUILD_ROOT%{_bindir}
285 mv gtk-query-immodules-3.0 gtk-query-immodules-3.0-%{__isa_bits}
286 )
287
288 # Input method frameworks want this
289 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
290 %{find_lang} gtk30 gtk30 gtk30-properties
291
292 #remove not packaged files
293 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.la \
294 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/loaders/*.la \
295 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/engines/*.la \
296 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends/*.la \
297 $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules/*.la \
298 $RPM_BUILD_ROOT%_mandir/man1/gtk-update-icon-cache.1*
299 rm -f $RPM_BUILD_ROOT%{_libdir}/libgailutil-%{api}.la
300
301 %clean
302 rm -rf $RPM_BUILD_ROOT
303

  ViewVC Help
Powered by ViewVC 1.1.28