1 %define pref
/opt
/gnome
6 # Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
8 %{?_with_unicode: %{expand: %%define unicode 1}}
9 %{?_without_unicode: %{expand: %%define unicode 0}}
12 %{?_with_gtk2: %{expand: %%define gtk2 1}}
13 %{?_without_gtk2: %{expand: %%define gtk2 0}}
24 %define name wx
-%{portname}-unicode
25 %define wxconfig
%{portname}-unicode-release-%{ver2}
26 %define wxconfiglink wx
%{portname}u-%{ver2}-config
28 %define wxbasename wx
-base
29 %define name wx
-%{portname}
30 %define wxconfig
%{portname}-ansi-release-%{ver2}
31 %define wxconfiglink wx
%{portname}-%{ver2}-config
35 %define wxbasename wx
-base
-unicode
36 %define wxbaseconfig base
-unicode
-release
-%{ver2}
37 %define wxbaseconfiglink wxbaseu
-%{ver2}-config
39 %define wxbasename wx
-base
-ansi
40 %define wxbaseconfig base
-ansi
-release
-%{ver2}
41 %define wxbaseconfiglink wxbase
-%{ver2}-config
44 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
48 License: wxWindows Licence
50 Source: wxGTK
-%{ver}.tar.gz
51 URL: http
://www.wxwidgets.org
52 Packager: Vadim Zeitlin
<vadim@wxwindows.org
>
54 BuildRoot: %{_tmppath}/%{name}-root
55 Requires: %{wxbasename} = %{ver}
57 # all packages providing an implementation of wxWidgets library (regardless of
58 # the toolkit used) should provide the (virtual) wxwin package, this makes it
59 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
64 wxWidgets is a free C
++ library
for cross
-platform GUI development.
65 With wxWidgets
, you can create applications
for different GUIs
(GTK
+,
66 Motif
, MS Windows
, MacOS X
) from the same
source code.
69 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
71 Requires: %{name} = %{ver}
72 Requires: %{wxbasename}-devel = %{ver}
76 Header files
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
79 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, OpenGL add
-on.
81 Requires: %{name} = %{ver}
85 OpenGL add
-on library
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
87 %package -n
%{wxbasename}
88 Summary: The base classes
89 Group: Development
/Libraries
92 %description -n
%{wxbasename}
93 A collection of GUI independent classes
95 %package -n
%{wxbasename}-devel
96 Summary: The base classes header files
97 Group: Development
/Libraries
98 Provides: wxBase
-devel
100 %description -n
%{wxbasename}-devel
101 A collection of GUI independent classes. Header files.
104 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, contributed libraries.
106 Requires: %{name} = %{ver}
109 Contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
111 %package contrib
-devel
112 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
114 Requires: %{name}-contrib = %{ver}
115 Requires: %{name}-devel = %{ver}
117 %description contrib
-devel
118 Header files
for contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
121 %setup -q
-n wxGTK
-%{ver}
124 if [ "$SMP"
!= ""
]; then
125 export MAKE
="
make -j$SMP"
132 ..
/configure
--prefix
=%{pref} \
150 rm -rf $RPM_BUILD_ROOT
151 (cd obj
-shared
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
153 # --- wxBase headers list begins here ---
154 cat
<<EOF
>wxbase
-headers.files
264 wx
/protocol
/protocol.h
276 # --- wxBase headers list ends here ---
277 cat
<<EOF
>wxbase
-headers.paths
278 %{_includedir}/wx-%{ver2}/wx
/afterstd.h
279 %{_includedir}/wx-%{ver2}/wx
/app.h
280 %{_includedir}/wx-%{ver2}/wx
/apptrait.h
281 %{_includedir}/wx-%{ver2}/wx
/archive.h
282 %{_includedir}/wx-%{ver2}/wx
/arrimpl.cpp
283 %{_includedir}/wx-%{ver2}/wx
/arrstr.h
284 %{_includedir}/wx-%{ver2}/wx
/beforestd.h
285 %{_includedir}/wx-%{ver2}/wx
/buffer.h
286 %{_includedir}/wx-%{ver2}/wx
/build.h
287 %{_includedir}/wx-%{ver2}/wx
/chkconf.h
288 %{_includedir}/wx-%{ver2}/wx
/clntdata.h
289 %{_includedir}/wx-%{ver2}/wx
/cmdline.h
290 %{_includedir}/wx-%{ver2}/wx
/confbase.h
291 %{_includedir}/wx-%{ver2}/wx
/config.h
292 %{_includedir}/wx-%{ver2}/wx
/containr.h
293 %{_includedir}/wx-%{ver2}/wx
/datetime.h
294 %{_includedir}/wx-%{ver2}/wx
/datetime.inl
295 %{_includedir}/wx-%{ver2}/wx
/datstrm.h
296 %{_includedir}/wx-%{ver2}/wx
/dde.h
297 %{_includedir}/wx-%{ver2}/wx
/debug.h
298 %{_includedir}/wx-%{ver2}/wx
/defs.h
299 %{_includedir}/wx-%{ver2}/wx
/dir.h
300 %{_includedir}/wx-%{ver2}/wx
/dlimpexp.h
301 %{_includedir}/wx-%{ver2}/wx
/dynarray.h
302 %{_includedir}/wx-%{ver2}/wx
/dynlib.h
303 %{_includedir}/wx-%{ver2}/wx
/dynload.h
304 %{_includedir}/wx-%{ver2}/wx
/encconv.h
305 %{_includedir}/wx-%{ver2}/wx
/event.h
306 %{_includedir}/wx-%{ver2}/wx
/except.h
307 %{_includedir}/wx-%{ver2}/wx
/features.h
308 %{_includedir}/wx-%{ver2}/wx
/ffile.h
309 %{_includedir}/wx-%{ver2}/wx
/file.h
310 %{_includedir}/wx-%{ver2}/wx
/fileconf.h
311 %{_includedir}/wx-%{ver2}/wx
/filefn.h
312 %{_includedir}/wx-%{ver2}/wx
/filename.h
313 %{_includedir}/wx-%{ver2}/wx
/filesys.h
314 %{_includedir}/wx-%{ver2}/wx
/fontenc.h
315 %{_includedir}/wx-%{ver2}/wx
/fontmap.h
316 %{_includedir}/wx-%{ver2}/wx
/fs_mem.h
317 %{_includedir}/wx-%{ver2}/wx
/fs_zip.h
318 %{_includedir}/wx-%{ver2}/wx
/hash.h
319 %{_includedir}/wx-%{ver2}/wx
/hashmap.h
320 %{_includedir}/wx-%{ver2}/wx
/hashset.h
321 %{_includedir}/wx-%{ver2}/wx
/html
/forcelnk.h
322 %{_includedir}/wx-%{ver2}/wx
/iconloc.h
323 %{_includedir}/wx-%{ver2}/wx
/init.h
324 %{_includedir}/wx-%{ver2}/wx
/intl.h
325 %{_includedir}/wx-%{ver2}/wx
/iosfwrap.h
326 %{_includedir}/wx-%{ver2}/wx
/ioswrap.h
327 %{_includedir}/wx-%{ver2}/wx
/ipc.h
328 %{_includedir}/wx-%{ver2}/wx
/ipcbase.h
329 %{_includedir}/wx-%{ver2}/wx
/isql.h
330 %{_includedir}/wx-%{ver2}/wx
/isqlext.h
331 %{_includedir}/wx-%{ver2}/wx
/list.h
332 %{_includedir}/wx-%{ver2}/wx
/listimpl.cpp
333 %{_includedir}/wx-%{ver2}/wx
/log.h
334 %{_includedir}/wx-%{ver2}/wx
/longlong.h
335 %{_includedir}/wx-%{ver2}/wx
/math.h
336 %{_includedir}/wx-%{ver2}/wx
/memconf.h
337 %{_includedir}/wx-%{ver2}/wx
/memory.h
338 %{_includedir}/wx-%{ver2}/wx
/memtext.h
339 %{_includedir}/wx-%{ver2}/wx
/mimetype.h
340 %{_includedir}/wx-%{ver2}/wx
/module.h
341 %{_includedir}/wx-%{ver2}/wx
/msgout.h
342 %{_includedir}/wx-%{ver2}/wx
/mstream.h
343 %{_includedir}/wx-%{ver2}/wx
/object.h
344 %{_includedir}/wx-%{ver2}/wx
/platform.h
345 %{_includedir}/wx-%{ver2}/wx
/process.h
346 %{_includedir}/wx-%{ver2}/wx
/ptr_scpd.h
347 %{_includedir}/wx-%{ver2}/wx
/regex.h
348 %{_includedir}/wx-%{ver2}/wx
/scopeguard.h
349 %{_includedir}/wx-%{ver2}/wx
/snglinst.h
350 %{_includedir}/wx-%{ver2}/wx
/sstream.h
351 %{_includedir}/wx-%{ver2}/wx
/stack.h
352 %{_includedir}/wx-%{ver2}/wx
/stackwalk.h
353 %{_includedir}/wx-%{ver2}/wx
/stdpaths.h
354 %{_includedir}/wx-%{ver2}/wx
/stockitem.h
355 %{_includedir}/wx-%{ver2}/wx
/stopwatch.h
356 %{_includedir}/wx-%{ver2}/wx
/strconv.h
357 %{_includedir}/wx-%{ver2}/wx
/stream.h
358 %{_includedir}/wx-%{ver2}/wx
/string.h
359 %{_includedir}/wx-%{ver2}/wx
/sysopt.h
360 %{_includedir}/wx-%{ver2}/wx
/textbuf.h
361 %{_includedir}/wx-%{ver2}/wx
/textfile.h
362 %{_includedir}/wx-%{ver2}/wx
/thread.h
363 %{_includedir}/wx-%{ver2}/wx
/thrimpl.cpp
364 %{_includedir}/wx-%{ver2}/wx
/timer.h
365 %{_includedir}/wx-%{ver2}/wx
/tokenzr.h
366 %{_includedir}/wx-%{ver2}/wx
/txtstrm.h
367 %{_includedir}/wx-%{ver2}/wx
/types.h
368 %{_includedir}/wx-%{ver2}/wx
/uri.h
369 %{_includedir}/wx-%{ver2}/wx
/utils.h
370 %{_includedir}/wx-%{ver2}/wx
/variant.h
371 %{_includedir}/wx-%{ver2}/wx
/vector.h
372 %{_includedir}/wx-%{ver2}/wx
/version.h
373 %{_includedir}/wx-%{ver2}/wx
/volume.h
374 %{_includedir}/wx-%{ver2}/wx
/wfstream.h
375 %{_includedir}/wx-%{ver2}/wx
/wx.h
376 %{_includedir}/wx-%{ver2}/wx
/wxchar.h
377 %{_includedir}/wx-%{ver2}/wx
/wxprec.h
378 %{_includedir}/wx-%{ver2}/wx
/xti.h
379 %{_includedir}/wx-%{ver2}/wx
/xtistrm.h
380 %{_includedir}/wx-%{ver2}/wx
/zipstrm.h
381 %{_includedir}/wx-%{ver2}/wx
/zstream.h
382 %{_includedir}/wx-%{ver2}/wx
/fs_inet.h
383 %{_includedir}/wx-%{ver2}/wx
/gsocket.h
384 %{_includedir}/wx-%{ver2}/wx
/protocol
/file.h
385 %{_includedir}/wx-%{ver2}/wx
/protocol
/ftp.h
386 %{_includedir}/wx-%{ver2}/wx
/protocol
/http.h
387 %{_includedir}/wx-%{ver2}/wx
/protocol
/protocol.h
388 %{_includedir}/wx-%{ver2}/wx
/sckaddr.h
389 %{_includedir}/wx-%{ver2}/wx
/sckipc.h
390 %{_includedir}/wx-%{ver2}/wx
/sckstrm.h
391 %{_includedir}/wx-%{ver2}/wx
/socket.h
392 %{_includedir}/wx-%{ver2}/wx
/url.h
393 %{_includedir}/wx-%{ver2}/wx
/xml
/xml.h
394 %{_includedir}/wx-%{ver2}/wx
/xtixml.h
395 %{_includedir}/wx-%{ver2}/wx
/db.h
396 %{_includedir}/wx-%{ver2}/wx
/dbkeyg.h
397 %{_includedir}/wx-%{ver2}/wx
/dbtable.h
399 # --- wxBase headers list ends here ---
401 # temporarily remove base headers
402 mkdir $RPM_BUILD_ROOT
/_save_dir
403 cp
-r $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT
/_save_dir
404 for f
in `cat wxbase
-headers.files`
; do
405 rm -f $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2}/$f
407 # list of all core headers:
408 find $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} -type f | sed
-e "s
,$RPM_BUILD_ROOT
,,g"
>core
-headers.files
409 # move base headers (actually all headers) back again
410 cp
-f
-r $RPM_BUILD_ROOT
/_save_dir
/* $RPM_BUILD_ROOT
%{_includedir}
411 rm -rf $RPM_BUILD_ROOT
/_save_dir
414 (cd obj
-shared
/contrib
/src
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
415 (cd obj
-shared
/utils
/wxrc
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
418 rm -rf $RPM_BUILD_ROOT
427 # link wx-config when you install RPM.
428 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx
-config
429 # link wx-config with explicit name.
430 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
437 if test -f
%{_bindir}/wx
-config
-a
-f
/usr
/bin
/md5sum
; then
438 SUM1
=`md5sum
%{_libdir}/wx/config/%{wxconfig} | cut
-c
0-32`
439 SUM2
=`md5sum
%{_bindir}/wx
-config | cut
-c
0-32`
440 if test "x$SUM1"
= "x$SUM2"
; then
441 rm -f
%{_bindir}/wx
-config
444 rm -f
%{_bindir}/%{wxconfiglink}
446 %post -n
%{wxbasename}
449 %postun -n
%{wxbasename}
452 %post -n
%{wxbasename}-devel
453 # link wx-config with explicit name.
454 ln
-sf
%{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
457 %postun -n
%{wxbasename}-devel
460 %preun -n
%{wxbasename}-devel
461 rm -f
%{_bindir}/%{wxbaseconfiglink}
478 %postun contrib
-devel
482 %defattr(-,root
,root
)
483 %doc COPYING.LIB
*.txt
484 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.
*
485 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.
*
487 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so.
*
489 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.
*
490 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.
*
491 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.
*
492 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.
*
495 %files devel
-f core
-headers.files
496 %defattr(-,root
,root
)
497 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
498 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so
500 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so
502 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
503 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so
504 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so
505 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
506 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
508 %{_libdir}/wx/config/%{wxconfig}
509 %{_libdir}/wx/include/%{wxconfig}/wx
/setup.h
512 %files -n
%{wxbasename}
513 %defattr(-,root
,root
)
514 %{_libdir}/libwx_base*-%{ver2}.so.
*
515 #%{_datadir}/locale/*/*/*
517 # %{_libdir}/libwxregexu-%{ver2}.a
520 %files -n
%{wxbasename}-devel
-f wxbase
-headers.paths
521 %defattr (-,root
,root
)
522 %dir %{_includedir}/wx-%{ver2}
523 %{_libdir}/libwx_base*-%{ver2}.so
525 #%{_libdir}/wx/config/%{wxbaseconfig}
526 #%{_libdir}/wx/include/%{wxbaseconfig}/wx/setup.h
527 %{_datadir}/aclocal
/*.m4
530 %defattr(-,root
,root
)
531 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.
*
534 %defattr(-,root
,root
)
535 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so.
*
536 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so.
*
537 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so.
*
538 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so.
*
539 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so.
*
540 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so.
*
541 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so.
*
542 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so.
*
543 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so.
*
546 %defattr(-,root
,root
)
547 %dir %{_includedir}/wx-%{ver2}/wx
/animate
548 %{_includedir}/wx-%{ver2}/wx
/animate
/*
549 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
551 %dir %{_includedir}/wx-%{ver2}/wx
/deprecated
552 %{_includedir}/wx-%{ver2}/wx
/deprecated
/*
553 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
555 %dir %{_includedir}/wx-%{ver2}/wx
/fl
556 %{_includedir}/wx-%{ver2}/wx
/fl
/*
557 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
559 %dir %{_includedir}/wx-%{ver2}/wx
/gizmos
560 %{_includedir}/wx-%{ver2}/wx
/gizmos
/*
561 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
563 %dir %{_includedir}/wx-%{ver2}/wx
/mmedia
564 %{_includedir}/wx-%{ver2}/wx
/mmedia
/*
565 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
567 %dir %{_includedir}/wx-%{ver2}/wx
/ogl
568 %{_includedir}/wx-%{ver2}/wx
/ogl
/*
569 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
571 %dir %{_includedir}/wx-%{ver2}/wx
/plot
572 %{_includedir}/wx-%{ver2}/wx
/plot
/*
573 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
575 %dir %{_includedir}/wx-%{ver2}/wx
/stc
576 %{_includedir}/wx-%{ver2}/wx
/stc
/*
577 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
579 %dir %{_includedir}/wx-%{ver2}/wx
/svg
580 %{_includedir}/wx-%{ver2}/wx
/svg
/*
581 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so