]> git.saurik.com Git - wxWidgets.git/blob - wxGTK.spec
more about GetRect() (patch 1158730)
[wxWidgets.git] / wxGTK.spec
1 %define pref /usr
2 %define ver 2.5.4
3 %define ver2 2.5
4 %define rel 1
5
6 # Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
7 %define unicode 0
8 %{?_with_unicode: %{expand: %%define unicode 1}}
9 %{?_without_unicode: %{expand: %%define unicode 0}}
10
11 %define gtk2 1
12 %{?_with_gtk2: %{expand: %%define gtk2 1}}
13 %{?_without_gtk2: %{expand: %%define gtk2 0}}
14
15 %if %{gtk2}
16 %define gtkver 2
17 %define portname gtk2
18 %else
19 %define gtkver 1.2
20 %define portname gtk
21 %endif
22
23 %if %{unicode}
24 %define name wx-%{portname}-unicode
25 %define wxbasename wx-base-unicode
26 %else
27 %define name wx-%{portname}
28 %define wxbasename wx-base
29 %endif
30
31 %if %{unicode}
32 %define wxconfigname %{portname}-unicode-release-%{ver2}
33 %define wxconfiglinkname wx%{portname}u-%{ver2}-config
34 %else
35 %define wxconfigname %{portname}-ansi-release-%{ver2}
36 %define wxconfiglinkname wx%{portname}-%{ver2}-config
37 %endif
38
39 Name: %{name}
40 Summary: The GTK+ %{gtkver} port of the wxWindows library
41 Version: %{ver}
42 Release: %{rel}
43 License: wxWindows Licence
44 Group: X11/Libraries
45 Source: wxGTK-%{ver}.tar.bz2
46 URL: http://www.wxwindows.org
47 Packager: Vadim Zeitlin <vadim@wxwindows.org>
48 Prefix: %{pref}
49 BuildRoot: /var/tmp/%{name}-root
50
51 # all packages providing an implementation of wxWindows library (regardless of
52 # the toolkit used) should provide the (virtual) wxwin package, this makes it
53 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
54 Provides: wxwin
55 Provides: wxGTK
56
57 # in addition, we should provide libwx_gtk as automatic generator only notices
58 # libwx_gtk-%{ver}-%{rel}
59 Provides: libwx_gtk.so
60 Provides: libwx_gtk-%{ver2}.so
61
62 Requires: %{wxbasename} = %{ver}
63
64 %description
65 wxWindows is a free C++ library for cross-platform GUI development.
66 With wxWindows, you can create applications for different GUIs (GTK+,
67 Motif/LessTif, MS Windows, Mac) from the same source code.
68
69 %package devel
70 Summary: The GTK+ %{gtkver} port of the wxWindows library
71 Group: X11/Libraries
72 Requires: %{name} = %{ver}
73 Requires: %{wxbasename}-devel = %{ver}
74 Provides: wxGTK-devel
75
76 %description devel
77 Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
78
79 %package gl
80 Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on.
81 Group: X11/Libraries
82 Requires: %{name} = %{ver}
83
84 %description gl
85 OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
86
87 %package static
88 Summary: wxGTK static libraries
89 Group: Development/Libraries
90 Requires: %{wxbasename}-static
91
92 %description static
93 Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
94
95 %package contrib
96 Summary: The GTK+ %{gtkver} port of the wxWindows library, contributed libraries.
97 Group: X11/Libraries
98 Requires: %{name} = %{ver}
99
100 %description contrib
101 Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
102
103 %package contrib-devel
104 Summary: The GTK+ %{gtkver} port of the wxWindows library
105 Group: X11/Libraries
106 Requires: %{name}-contrib = %{ver}
107 Requires: %{name}-devel = %{ver}
108
109 %description contrib-devel
110 Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
111
112 %prep
113 %setup -q -n wxGTK-%{ver}
114
115 %build
116 if [ "$SMP" != "" ]; then
117 export MAKE="make -j$SMP"
118 else
119 export MAKE="make"
120 fi
121
122 mkdir obj-shared
123 cd obj-shared
124 ../configure --prefix=%{pref} \
125 %if %{unicode}
126 --enable-unicode \
127 %else
128 --with-odbc \
129 %endif
130 %if ! %{gtk2}
131 --disable-gtk2 \
132 %endif
133 --with-opengl
134 $MAKE
135 cd contrib/src
136 $MAKE
137 cd ../../..
138
139 mkdir obj-static
140 cd obj-static
141 ../configure --prefix=%{pref} --disable-shared \
142 %if %{unicode}
143 --enable-unicode \
144 %else
145 --with-odbc \
146 %endif
147 %if ! %{gtk2}
148 --disable-gtk2 \
149 %endif
150 --with-opengl
151 $MAKE
152 cd ..
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156 (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
157 (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
158
159 # Remove headers that are part of wx-base-devel:
160
161 # --- wxBase headers list begins here ---
162 cat <<EOF >wxbase-headers-list
163 wx/afterstd.h
164 wx/app.h
165 wx/apptrait.h
166 wx/archive.h
167 wx/arrimpl.cpp
168 wx/arrstr.h
169 wx/beforestd.h
170 wx/buffer.h
171 wx/build.h
172 wx/chkconf.h
173 wx/clntdata.h
174 wx/cmdline.h
175 wx/confbase.h
176 wx/config.h
177 wx/containr.h
178 wx/datetime.h
179 wx/datetime.inl
180 wx/datstrm.h
181 wx/dde.h
182 wx/debug.h
183 wx/defs.h
184 wx/dir.h
185 wx/dlimpexp.h
186 wx/dynarray.h
187 wx/dynlib.h
188 wx/dynload.h
189 wx/encconv.h
190 wx/event.h
191 wx/except.h
192 wx/features.h
193 wx/ffile.h
194 wx/file.h
195 wx/fileconf.h
196 wx/filefn.h
197 wx/filename.h
198 wx/filesys.h
199 wx/fontenc.h
200 wx/fontmap.h
201 wx/fs_mem.h
202 wx/fs_zip.h
203 wx/hash.h
204 wx/hashmap.h
205 wx/hashset.h
206 wx/html/forcelnk.h
207 wx/iconloc.h
208 wx/init.h
209 wx/intl.h
210 wx/iosfwrap.h
211 wx/ioswrap.h
212 wx/ipc.h
213 wx/ipcbase.h
214 wx/isql.h
215 wx/isqlext.h
216 wx/list.h
217 wx/listimpl.cpp
218 wx/log.h
219 wx/longlong.h
220 wx/math.h
221 wx/memconf.h
222 wx/memory.h
223 wx/memtext.h
224 wx/mimetype.h
225 wx/module.h
226 wx/msgout.h
227 wx/msgout.h
228 wx/mstream.h
229 wx/object.h
230 wx/platform.h
231 wx/process.h
232 wx/ptr_scpd.h
233 wx/regex.h
234 wx/scopeguard.h
235 wx/snglinst.h
236 wx/sstream.h
237 wx/stack.h
238 wx/stackwalk.h
239 wx/stdpaths.h
240 wx/stockitem.h
241 wx/stopwatch.h
242 wx/strconv.h
243 wx/stream.h
244 wx/string.h
245 wx/sysopt.h
246 wx/textbuf.h
247 wx/textfile.h
248 wx/thread.h
249 wx/thrimpl.cpp
250 wx/timer.h
251 wx/tokenzr.h
252 wx/txtstrm.h
253 wx/types.h
254 wx/uri.h
255 wx/utils.h
256 wx/variant.h
257 wx/vector.h
258 wx/version.h
259 wx/volume.h
260 wx/wfstream.h
261 wx/wx.h
262 wx/wxchar.h
263 wx/wxprec.h
264 wx/xti.h
265 wx/xtistrm.h
266 wx/zipstrm.h
267 wx/zstream.h
268 wx/msw/apptrait.h
269 wx/msw/apptbase.h
270 wx/msw/chkconf.h
271 wx/msw/crashrpt.h
272 wx/msw/dde.h
273 wx/msw/debughlp.h
274 wx/msw/gccpriv.h
275 wx/msw/mimetype.h
276 wx/msw/stackwalk.h
277 wx/msw/winundef.h
278 wx/msw/wrapcctl.h
279 wx/msw/wrapwin.h
280 wx/fs_inet.h
281 wx/gsocket.h
282 wx/protocol/file.h
283 wx/protocol/ftp.h
284 wx/protocol/http.h
285 wx/protocol/protocol.h
286 wx/sckaddr.h
287 wx/sckipc.h
288 wx/sckstrm.h
289 wx/socket.h
290 wx/url.h
291 wx/msw/gsockmsw.h
292 wx/xml/xml.h
293 wx/xtixml.h
294 wx/db.h
295 wx/dbkeyg.h
296 wx/dbtable.h
297 EOF
298 # --- wxBase headers list ends here ---
299 for f in `cat wxbase-headers-list` ; do
300 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
301 done
302
303 # list of all core headers:
304 find $RPM_BUILD_ROOT/usr/include/wx-* -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
305
306 # contrib stuff:
307 (cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
308 (cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
309
310 # remove wxBase files so that RPM doesn't complain about unpackaged files:
311 rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
312 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
313 rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
314 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
315 %if !%{unicode}
316 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxodbc-2.5.a
317 %endif
318
319 %clean
320 rm -rf $RPM_BUILD_ROOT
321
322 %post
323 /sbin/ldconfig
324
325 %postun
326 /sbin/ldconfig
327
328 %post gl
329 /sbin/ldconfig
330
331 %postun gl
332 /sbin/ldconfig
333
334 %post devel
335 # link wx-config when you install RPM.
336 ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/wx-config
337 # link wx-config with explicit name.
338 ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/%{wxconfiglinkname}
339
340 %preun devel
341 if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
342 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfigname} | cut -c 0-32`
343 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
344 if test "x$SUM1" = "x$SUM2" ; then
345 rm -f %{_bindir}/wx-config
346 fi
347 fi
348
349 rm -f %{_bindir}/%{wxconfiglinkname}
350
351 %files
352 %defattr(-,root,root)
353 %doc COPYING.LIB *.txt
354 %{_libdir}/libwx_%{portname}*_core*.so.*
355 %{_libdir}/libwx_%{portname}*_html*.so.*
356 %{_libdir}/libwx_%{portname}*_adv*.so.*
357 %{_libdir}/libwx_%{portname}*_media*.so.*
358 %if !%{unicode}
359 %{_libdir}/libwx_%{portname}*_dbgrid*.so.*
360 %endif
361
362 %files devel -f core-headers.files
363 %defattr(-,root,root)
364 %{_libdir}/libwx_%{portname}*_core*.so
365 %{_libdir}/libwx_%{portname}*_html*.so
366 %{_libdir}/libwx_%{portname}*_adv*.so
367 %{_libdir}/libwx_%{portname}*_media*.so
368 %if !%{unicode}
369 %{_libdir}/libwx_%{portname}*_dbgrid*.so
370 %endif
371 %{_libdir}/libwx_%{portname}*_gl*.so
372 %dir %{_libdir}/wx
373 %{_libdir}/wx/*
374
375 %files gl
376 %defattr(-,root,root)
377 %{_libdir}/libwx_%{portname}*_gl*.so.*
378
379 %files static
380 %defattr (-,root,root)
381 %{_libdir}/libwx_gtk*.a
382
383 %files contrib
384 %defattr(-,root,root)
385 %{_libdir}/libwx_%{portname}*_animate*.so.*
386 %{_libdir}/libwx_%{portname}*_deprecated*.so.*
387 %{_libdir}/libwx_%{portname}*_fl*.so.*
388 %{_libdir}/libwx_%{portname}*_gizmos*.so.*
389 %{_libdir}/libwx_%{portname}*_mmedia*.so.*
390 %{_libdir}/libwx_%{portname}*_ogl*.so.*
391 %{_libdir}/libwx_%{portname}*_plot*.so.*
392 %{_libdir}/libwx_%{portname}*_stc*.so.*
393 %{_libdir}/libwx_%{portname}*_svg*.so.*
394 %{_libdir}/libwx_%{portname}*_xrc*.so.*
395
396 %files contrib-devel
397 %defattr(-,root,root)
398 %{_bindir}/wxrc*
399 %dir %{_includedir}/wx-*/wx/animate
400 %{_includedir}/wx-*/wx/animate/*
401 %{_libdir}/libwx_%{portname}*_animate*.so
402
403 %dir %{_includedir}/wx-*/wx/deprecated
404 %{_includedir}/wx-*/wx/deprecated/*
405 %{_libdir}/libwx_%{portname}*_deprecated*.so
406
407 %dir %{_includedir}/wx-*/wx/fl
408 %{_includedir}/wx-*/wx/fl/*
409 %{_libdir}/libwx_%{portname}*_fl*.so
410
411 %dir %{_includedir}/wx-*/wx/gizmos
412 %{_includedir}/wx-*/wx/gizmos/*
413 %{_libdir}/libwx_%{portname}*_gizmos*.so
414
415 %dir %{_includedir}/wx-*/wx/mmedia
416 %{_includedir}/wx-*/wx/mmedia/*
417 %{_libdir}/libwx_%{portname}*_mmedia*.so
418
419 %dir %{_includedir}/wx-*/wx/ogl
420 %{_includedir}/wx-*/wx/ogl/*
421 %{_libdir}/libwx_%{portname}*_ogl*.so
422
423 %dir %{_includedir}/wx-*/wx/plot
424 %{_includedir}/wx-*/wx/plot/*
425 %{_libdir}/libwx_%{portname}*_plot*.so
426
427 %dir %{_includedir}/wx-*/wx/stc
428 %{_includedir}/wx-*/wx/stc/*
429 %{_libdir}/libwx_%{portname}*_stc*.so
430
431 %dir %{_includedir}/wx-*/wx/svg
432 %{_includedir}/wx-*/wx/svg/*
433 %{_libdir}/libwx_%{portname}*_svg*.so
434
435 %dir %{_includedir}/wx-*/wx/xrc
436 %{_includedir}/wx-*/wx/xrc/*
437 %{_libdir}/libwx_%{portname}*_xrc*.so