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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 111553 - (hide annotations) (download)
Tue Jun 21 14:55:00 2011 UTC (12 years, 10 months ago) by ahmad
File size: 10125 byte(s)
- In the lib package, add a requires(pre) on the main package
1 saispo 93254 # 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 dmorgan 101505 %define enable_bootstrap 1
10 saispo 93254
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 dmorgan 101505 Version: 3.0.11
47 ahmad 111553 Release: %mkrel 8
48 saispo 93254 License: LGPLv2+
49     Group: System/Libraries
50 dmorgan 101505 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 saispo 93254 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 ahmad 111269 BuildRequires: x11-server-xvfb
79 saispo 93254 %endif
80     %if %enable_gtkdoc
81 ahmad 111269 BuildRequires: gtk-doc >= 0.9
82     BuildRequires: sgml-tools
83     BuildRequires: texinfo
84 saispo 93254 %endif
85     # gw tests will fail without this
86     BuildRequires: fonts-ttf-dejavu
87     %if !%{enable_bootstrap}
88 ahmad 111269 Suggests: xdg-user-dirs-gtk
89     Suggests: oxygen-gtk3
90 saispo 93254 %endif
91 ahmad 111268 Requires: %{libname} = %{version}
92 saispo 93254 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 dmorgan 101505 %files -f gtk30.lang
105     %defattr(-, root, root)
106     %doc README
107 ahmad 105931 %{_bindir}/gtk-query-immodules-%{api_version}-*
108 dmorgan 101505 %_mandir/man1/gtk-query-immodules-%{api_version}.1*
109     %{_datadir}/themes
110     %{_datadir}/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml
111     %dir %{_sysconfdir}/gtk-%{api_version}
112     %config(noreplace) %{_sysconfdir}/gtk-%{api_version}/im-multipress.conf
113     %{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
114    
115     #--------------------------------------------------------------------
116    
117 saispo 93254 %package -n %{libname}
118     Summary: %{summary}
119     Group: %{group}
120     Provides: lib%{pkgname}%{api} = %{version}-%{release}
121     Provides: lib%{name} = %{version}-%{release}
122     Obsoletes: %{_lib}gtk+3.0_0 < 3.0.0
123     Obsoletes: %{_lib}gtk+-x11-3.0_0 < 3.0.0
124     Obsoletes: %{_lib}gtk-engines3 < 3.0.0
125 ahmad 111269 Requires: libglib2.0 >= %{req_glib_version}
126     Requires: libpango1.0 >= %{req_pango_version}
127     Requires: libatk1.0 >= %{req_atk_version}
128 cjw 103472 Requires: gtk+3.0 = %{version}-%{release}
129 ahmad 111553 Requires(pre): gtk+3.0 = %{version}-%{release}
130 saispo 93254
131     %description -n %{libname}
132     This package contains the library needed to run programs dynamically
133     linked with gtk+.
134    
135 dmorgan 101505 %post -n %{libname}
136     if [ "$1" = "2" ]; then
137     if [ -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules ]; then
138     rm -f %{_sysconfdir}/gtk-%{api_version}/gtk.immodules
139     fi
140     fi
141     gtk-query-immodules-3.0-%{__isa_bits} --update-cache
142    
143     %files -n %{libname}
144     %defattr(-, root, root)
145     %doc README
146     %ghost %verify (not md5 mtime size) %_libdir/gtk-%{api_version}/3.0.0/immodules.cache
147     %dir %{_libdir}/gtk-%{api_version}
148     %dir %{_libdir}/gtk-%{api_version}/modules
149     %dir %{_libdir}/gtk-%{api_version}/%{binary_version}
150     %dir %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules
151     %{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.so
152     %dir %{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends
153     %{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends/*.so
154     %{_libdir}/libgtk-3.so.%{lib_major}
155     %{_libdir}/libgtk-3.so.%{lib_major}.*
156     %{_libdir}/libgdk-3.so.%{lib_major}
157     %{_libdir}/libgdk-3.so.%{lib_major}.*
158     %_libdir/girepository-1.0/Gdk-%{api_version}.typelib
159     %_libdir/girepository-1.0/GdkX11-%{api_version}.typelib
160     %_libdir/girepository-1.0/Gtk-%{api_version}.typelib
161    
162     #--------------------------------------------------------------------
163    
164 saispo 93254 %package -n %{develname}
165     Summary: Development files for GTK+ (GIMP ToolKit) applications
166     Group: Development/GNOME and GTK+
167     Provides: %{pkgname}%{api}-devel = %{version}-%{release}
168     Provides: lib%{pkgname}%{api}-devel = %{version}-%{release}
169     Provides: lib%{pkgname}%{api_version}-devel = %{version}-%{release}
170     Provides: lib%{pkgname}-x11-%{api_version}-devel = %{version}-%{release}
171     Provides: %{name}-devel = %{version}-%{release}
172     Requires: %{libname} = %{version}
173     Requires: libgdk_pixbuf2.0-devel >= %req_gdk_pixbuf_version
174     Requires: libatk1.0-devel >= %{req_atk_version}
175     Requires: libpango1.0-devel >= %{req_pango_version}
176    
177     %description -n %{develname}
178     The libgtk+-devel package contains the static libraries and header files
179     needed for developing GTK+ (GIMP ToolKit) applications. The libgtk+-devel
180     package contains GDK (the General Drawing Kit, which simplifies the interface
181     for writing GTK+ widgets and using GTK+ widgets in applications), and GTK+
182     (the widget set).
183    
184 dmorgan 101505 %files -n %{develname}
185     %defattr(-, root, root)
186     %doc docs/*.txt AUTHORS ChangeLog NEWS* README*
187     %doc %{_datadir}/gtk-doc/html/gdk3
188     %doc %{_datadir}/gtk-doc/html/gtk3
189     %{_bindir}/gtk3-demo
190     %{_datadir}/aclocal/*
191     %{_datadir}/gtk-%{api_version}
192     %{_includedir}/gtk-%{api_version}
193     %{_libdir}/libgtk-%{api}.so
194     %{_libdir}/libgtk-%{api}.la
195     %{_libdir}/libgdk-%{api}.so
196     %{_libdir}/libgdk-%{api}.la
197     %{_libdir}/pkgconfig/gdk-*%{api_version}.pc
198     %{_libdir}/pkgconfig/gtk+-*%{api_version}.pc
199     %_datadir/gir-1.0/Gdk-%{api_version}.gir
200     %_datadir/gir-1.0/GdkX11-%{api_version}.gir
201     %_datadir/gir-1.0/Gtk-%{api_version}.gir
202    
203     #--------------------------------------------------------------------
204    
205 saispo 93254 %package -n %{gail_libname}
206     Summary: GNOME Accessibility Implementation Library
207     Group: System/Libraries
208     Provides: libgail = %{version}-%{release}
209     Obsoletes: %{_lib}gail3.0_0 < 3.0.0
210    
211     %description -n %{gail_libname}
212     Gail is the GNOME Accessibility Implementation Library
213    
214 dmorgan 101505 %files -n %gail_libname
215     %defattr(-,root,root)
216     %{_libdir}/libgailutil-%{api}.so.%{gail_major}*
217     %{_libdir}/gtk-%{api_version}/modules/libferret.so
218     %{_libdir}/gtk-%{api_version}/modules/libgail.so
219    
220     #--------------------------------------------------------------------
221    
222 saispo 93254 %package -n %gaildevelname
223     Summary: Static libraries, include files for GAIL
224     Group: Development/GNOME and GTK+
225     Provides: libgail-%{api_version}-devel = %{version}-%{release}
226     Requires: %{gail_libname} = %{version}
227    
228     %description -n %gaildevelname
229     Gail is the GNOME Accessibility Implementation Library
230    
231 dmorgan 101505 %files -n %gaildevelname
232     %defattr(-,root,root)
233     %{_datadir}/gtk-doc/html/gail-libgail-util3
234     %{_libdir}/libgailutil-%{api}.so
235     %{_includedir}/gail-%{api_version}
236     %{_libdir}/pkgconfig/gail-%{api_version}.pc
237    
238     #--------------------------------------------------------------------
239    
240 saispo 93254 %prep
241     %setup -qn %{pkgname}-%{version}
242     %apply_patches
243    
244     %build
245    
246 dmorgan 101505 (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
247     %configure $CONFIGFLAGS \
248     --enable-gtk2-dependency \
249     --enable-xkb \
250     --enable-xinerama \
251     --enable-xinput \
252     --enable-xrandr \
253     --enable-xfixes \
254     --enable-xcomposite \
255     --enable-xdamage \
256     --enable-x11-backend \
257     )
258 saispo 93254
259 dmorgan 101505 # fight unused direct deps
260     sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
261 saispo 93254
262     %make
263    
264     %check
265     %if %enable_tests
266     XDISPLAY=$(i=1; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i)
267     %{_bindir}/Xvfb :$XDISPLAY &
268     export DISPLAY=:$XDISPLAY
269     make check
270     kill $(cat /tmp/.X$XDISPLAY-lock) ||:
271     %endif
272    
273     %install
274     rm -rf $RPM_BUILD_ROOT
275    
276     %makeinstall_std RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
277    
278     touch $RPM_BUILD_ROOT%_libdir/gtk-%{api_version}/%{binary_version}/immodules.cache
279     mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules
280    
281 dmorgan 101505 (cd $RPM_BUILD_ROOT%{_bindir}
282     mv gtk-query-immodules-3.0 gtk-query-immodules-3.0-%{__isa_bits}
283     )
284 saispo 93254
285 dmorgan 101505 # Input method frameworks want this
286     install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
287 saispo 93254 %{find_lang} gtk30 gtk30 gtk30-properties
288    
289     #remove not packaged files
290     rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/immodules/*.la \
291     $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/loaders/*.la \
292     $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/engines/*.la \
293     $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/%{binary_version}/printbackends/*.la \
294     $RPM_BUILD_ROOT%{_libdir}/gtk-%{api_version}/modules/*.la \
295     $RPM_BUILD_ROOT%_mandir/man1/gtk-update-icon-cache.1*
296 dmorgan 102517 rm -f $RPM_BUILD_ROOT%{_libdir}/libgailutil-%{api}.la
297 saispo 93254
298     %clean
299     rm -rf $RPM_BUILD_ROOT

  ViewVC Help
Powered by ViewVC 1.1.30