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