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 wxconfigstatic
%{portname}-unicode-release-static-%{ver2}
27 %define wxconfiglink wx
%{portname}u-%{ver2}-config
29 %define name wx
-%{portname}
30 %define wxconfig
%{portname}-ansi-release-%{ver2}
31 %define wxconfigstatic
%{portname}-ansi-release-static-%{ver2}
32 %define wxconfiglink wx
%{portname}-%{ver2}-config
36 %define wxbasename wx
-base
-unicode
37 %define wxbaseconfig base
-unicode
-release
-%{ver2}
38 %define wxbaseconfigstatic base
-unicode
-release
-static
-%{ver2}
39 %define wxbaseconfiglink wxbaseu
-%{ver2}-config
41 %define wxbasename wx
-base
-ansi
42 %define wxbaseconfig base
-ansi
-release
-%{ver2}
43 %define wxbaseconfigstatic base
-ansi
-release
-static
-%{ver2}
44 %define wxbaseconfiglink wxbase
-%{ver2}-config
47 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
51 License: wxWindows Licence
53 Source: wxGTK
-%{ver}.tar.gz
54 URL: http
://www.wxwidgets.org
55 Packager: Vadim Zeitlin
<vadim@wxwindows.org
>
57 BuildRoot: %{_tmppath}/%{name}-root
58 Requires: %{wxbasename} = %{ver}
59 %if %{portname} == gtk2
60 # BuildRequires: gtk+-2.0-devel
62 # BuildRequires: gtk+-devel >= 1.2.0
65 BuildRequires
: zlib
-devel
, libjpeg
-devel
, libpng
-devel
, libtiff
-devel
67 # all packages providing an implementation of wxWidgets library (regardless of
68 # the toolkit used) should provide the (virtual) wxwin package, this makes it
69 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
74 wxWidgets is a free C
++ library
for cross
-platform GUI development.
75 With wxWidgets
, you can create applications
for different GUIs
(GTK
+,
76 Motif
, MS Windows
, MacOS X
, Windows CE
, GPE
) from the same
source code.
79 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
81 Requires: %{name} = %{ver}
82 Requires: %{wxbasename}-devel = %{ver}
86 The GTK
+ %{gtkver} port of the wxWidgets library
, header files.
89 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, OpenGL add
-on.
91 Requires: %{name} = %{ver}
95 OpenGL add
-on library
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
97 %package -n
%{wxbasename}
98 Summary: wxBase library
- non
-GUI support classes of the wxWidgets toolkit
99 Group: Development
/Libraries
102 %description -n
%{wxbasename}
103 wxBase is a collection of C
++ classes providing basic data structures
(strings
,
104 lists
, arrays
), portable wrappers around many OS
-specific funstions
(file
105 operations
, time/date manipulations
, threads
, processes
, sockets
, shared
106 library loading
) as well as other utility classes
(streams
, archive and
107 compression
). wxBase currently supports Win32
, most Unix variants
(Linux
,
108 FreeBSD
, Solaris
, HP
-UX
) and MacOS X
10.3.
110 %package -n
%{wxbasename}-devel
111 Summary: wxBase library
, header files.
112 Group: Development
/Libraries
113 Provides: wxBase
-devel
115 %description -n
%{wxbasename}-devel
116 wxBase library
- non
-GUI support classes of the wxWidgets toolkit
,
120 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, contributed libraries.
122 Requires: %{name} = %{ver}
125 Contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
127 %package contrib
-devel
128 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
130 Requires: %{name}-contrib = %{ver}
131 Requires: %{name}-devel = %{ver}
133 %description contrib
-devel
134 Header files
for contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
137 %setup -q
-n wxGTK
-%{ver}
140 if [ "$SMP"
!= ""
]; then
141 export MAKE
="
make -j$SMP"
146 mkdir obj
-shared
-no
-gui
148 ..
/configure
--prefix
=%{pref} \
161 ..
/configure
--prefix
=%{pref} \
180 mkdir obj
-static
-no
-gui
182 ..
/configure
--prefix
=%{pref} \
196 ..
/configure
--prefix
=%{pref} \
217 rm -rf $RPM_BUILD_ROOT
218 (cd obj
-static
-no
-gui
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
219 (cd obj
-static
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
220 (cd obj
-shared
-no
-gui
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
221 (cd obj
-shared
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
223 # --- wxBase headers list begins here ---
224 cat
<<EOF
>wxbase
-headers.files
334 wx
/protocol
/protocol.h
346 # --- wxBase headers list ends here ---
347 cat
<<EOF
>wxbase
-headers.paths
348 %{_includedir}/wx-%{ver2}/wx
/afterstd.h
349 %{_includedir}/wx-%{ver2}/wx
/app.h
350 %{_includedir}/wx-%{ver2}/wx
/apptrait.h
351 %{_includedir}/wx-%{ver2}/wx
/archive.h
352 %{_includedir}/wx-%{ver2}/wx
/arrimpl.cpp
353 %{_includedir}/wx-%{ver2}/wx
/arrstr.h
354 %{_includedir}/wx-%{ver2}/wx
/beforestd.h
355 %{_includedir}/wx-%{ver2}/wx
/buffer.h
356 %{_includedir}/wx-%{ver2}/wx
/build.h
357 %{_includedir}/wx-%{ver2}/wx
/chkconf.h
358 %{_includedir}/wx-%{ver2}/wx
/clntdata.h
359 %{_includedir}/wx-%{ver2}/wx
/cmdline.h
360 %{_includedir}/wx-%{ver2}/wx
/confbase.h
361 %{_includedir}/wx-%{ver2}/wx
/config.h
362 %{_includedir}/wx-%{ver2}/wx
/containr.h
363 %{_includedir}/wx-%{ver2}/wx
/datetime.h
364 %{_includedir}/wx-%{ver2}/wx
/datetime.inl
365 %{_includedir}/wx-%{ver2}/wx
/datstrm.h
366 %{_includedir}/wx-%{ver2}/wx
/dde.h
367 %{_includedir}/wx-%{ver2}/wx
/debug.h
368 %{_includedir}/wx-%{ver2}/wx
/defs.h
369 %{_includedir}/wx-%{ver2}/wx
/dir.h
370 %{_includedir}/wx-%{ver2}/wx
/dlimpexp.h
371 %{_includedir}/wx-%{ver2}/wx
/dynarray.h
372 %{_includedir}/wx-%{ver2}/wx
/dynlib.h
373 %{_includedir}/wx-%{ver2}/wx
/dynload.h
374 %{_includedir}/wx-%{ver2}/wx
/encconv.h
375 %{_includedir}/wx-%{ver2}/wx
/event.h
376 %{_includedir}/wx-%{ver2}/wx
/except.h
377 %{_includedir}/wx-%{ver2}/wx
/features.h
378 %{_includedir}/wx-%{ver2}/wx
/ffile.h
379 %{_includedir}/wx-%{ver2}/wx
/file.h
380 %{_includedir}/wx-%{ver2}/wx
/fileconf.h
381 %{_includedir}/wx-%{ver2}/wx
/filefn.h
382 %{_includedir}/wx-%{ver2}/wx
/filename.h
383 %{_includedir}/wx-%{ver2}/wx
/filesys.h
384 %{_includedir}/wx-%{ver2}/wx
/fontenc.h
385 %{_includedir}/wx-%{ver2}/wx
/fontmap.h
386 %{_includedir}/wx-%{ver2}/wx
/fs_mem.h
387 %{_includedir}/wx-%{ver2}/wx
/fs_zip.h
388 %{_includedir}/wx-%{ver2}/wx
/hash.h
389 %{_includedir}/wx-%{ver2}/wx
/hashmap.h
390 %{_includedir}/wx-%{ver2}/wx
/hashset.h
391 %{_includedir}/wx-%{ver2}/wx
/html
/forcelnk.h
392 %{_includedir}/wx-%{ver2}/wx
/iconloc.h
393 %{_includedir}/wx-%{ver2}/wx
/init.h
394 %{_includedir}/wx-%{ver2}/wx
/intl.h
395 %{_includedir}/wx-%{ver2}/wx
/iosfwrap.h
396 %{_includedir}/wx-%{ver2}/wx
/ioswrap.h
397 %{_includedir}/wx-%{ver2}/wx
/ipc.h
398 %{_includedir}/wx-%{ver2}/wx
/ipcbase.h
399 %{_includedir}/wx-%{ver2}/wx
/isql.h
400 %{_includedir}/wx-%{ver2}/wx
/isqlext.h
401 %{_includedir}/wx-%{ver2}/wx
/list.h
402 %{_includedir}/wx-%{ver2}/wx
/listimpl.cpp
403 %{_includedir}/wx-%{ver2}/wx
/log.h
404 %{_includedir}/wx-%{ver2}/wx
/longlong.h
405 %{_includedir}/wx-%{ver2}/wx
/math.h
406 %{_includedir}/wx-%{ver2}/wx
/memconf.h
407 %{_includedir}/wx-%{ver2}/wx
/memory.h
408 %{_includedir}/wx-%{ver2}/wx
/memtext.h
409 %{_includedir}/wx-%{ver2}/wx
/mimetype.h
410 %{_includedir}/wx-%{ver2}/wx
/module.h
411 %{_includedir}/wx-%{ver2}/wx
/msgout.h
412 %{_includedir}/wx-%{ver2}/wx
/mstream.h
413 %{_includedir}/wx-%{ver2}/wx
/object.h
414 %{_includedir}/wx-%{ver2}/wx
/platform.h
415 %{_includedir}/wx-%{ver2}/wx
/process.h
416 %{_includedir}/wx-%{ver2}/wx
/ptr_scpd.h
417 %{_includedir}/wx-%{ver2}/wx
/regex.h
418 %{_includedir}/wx-%{ver2}/wx
/scopeguard.h
419 %{_includedir}/wx-%{ver2}/wx
/snglinst.h
420 %{_includedir}/wx-%{ver2}/wx
/sstream.h
421 %{_includedir}/wx-%{ver2}/wx
/stack.h
422 %{_includedir}/wx-%{ver2}/wx
/stackwalk.h
423 %{_includedir}/wx-%{ver2}/wx
/stdpaths.h
424 %{_includedir}/wx-%{ver2}/wx
/stockitem.h
425 %{_includedir}/wx-%{ver2}/wx
/stopwatch.h
426 %{_includedir}/wx-%{ver2}/wx
/strconv.h
427 %{_includedir}/wx-%{ver2}/wx
/stream.h
428 %{_includedir}/wx-%{ver2}/wx
/string.h
429 %{_includedir}/wx-%{ver2}/wx
/sysopt.h
430 %{_includedir}/wx-%{ver2}/wx
/textbuf.h
431 %{_includedir}/wx-%{ver2}/wx
/textfile.h
432 %{_includedir}/wx-%{ver2}/wx
/thread.h
433 %{_includedir}/wx-%{ver2}/wx
/thrimpl.cpp
434 %{_includedir}/wx-%{ver2}/wx
/timer.h
435 %{_includedir}/wx-%{ver2}/wx
/tokenzr.h
436 %{_includedir}/wx-%{ver2}/wx
/txtstrm.h
437 %{_includedir}/wx-%{ver2}/wx
/types.h
438 %{_includedir}/wx-%{ver2}/wx
/uri.h
439 %{_includedir}/wx-%{ver2}/wx
/utils.h
440 %{_includedir}/wx-%{ver2}/wx
/variant.h
441 %{_includedir}/wx-%{ver2}/wx
/vector.h
442 %{_includedir}/wx-%{ver2}/wx
/version.h
443 %{_includedir}/wx-%{ver2}/wx
/volume.h
444 %{_includedir}/wx-%{ver2}/wx
/wfstream.h
445 %{_includedir}/wx-%{ver2}/wx
/wx.h
446 %{_includedir}/wx-%{ver2}/wx
/wxchar.h
447 %{_includedir}/wx-%{ver2}/wx
/wxprec.h
448 %{_includedir}/wx-%{ver2}/wx
/xti.h
449 %{_includedir}/wx-%{ver2}/wx
/xtistrm.h
450 %{_includedir}/wx-%{ver2}/wx
/zipstrm.h
451 %{_includedir}/wx-%{ver2}/wx
/zstream.h
452 %{_includedir}/wx-%{ver2}/wx
/fs_inet.h
453 %{_includedir}/wx-%{ver2}/wx
/gsocket.h
454 %{_includedir}/wx-%{ver2}/wx
/protocol
/file.h
455 %{_includedir}/wx-%{ver2}/wx
/protocol
/ftp.h
456 %{_includedir}/wx-%{ver2}/wx
/protocol
/http.h
457 %{_includedir}/wx-%{ver2}/wx
/protocol
/protocol.h
458 %{_includedir}/wx-%{ver2}/wx
/sckaddr.h
459 %{_includedir}/wx-%{ver2}/wx
/sckipc.h
460 %{_includedir}/wx-%{ver2}/wx
/sckstrm.h
461 %{_includedir}/wx-%{ver2}/wx
/socket.h
462 %{_includedir}/wx-%{ver2}/wx
/url.h
463 %{_includedir}/wx-%{ver2}/wx
/xml
/xml.h
464 %{_includedir}/wx-%{ver2}/wx
/xtixml.h
465 %{_includedir}/wx-%{ver2}/wx
/db.h
466 %{_includedir}/wx-%{ver2}/wx
/dbkeyg.h
467 %{_includedir}/wx-%{ver2}/wx
/dbtable.h
469 # --- wxBase headers list ends here ---
471 # temporarily remove base headers
472 mkdir $RPM_BUILD_ROOT
/_save_dir
473 cp
-r $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT
/_save_dir
474 for f
in `cat wxbase
-headers.files`
; do
475 rm -f $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2}/$f
477 # list of all core headers:
478 find $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} -type f | sed
-e "s
,$RPM_BUILD_ROOT
,,g"
>core
-headers.files
479 # move base headers (actually all headers) back again
480 cp
-f
-r $RPM_BUILD_ROOT
/_save_dir
/* $RPM_BUILD_ROOT
%{_includedir}
481 rm -rf $RPM_BUILD_ROOT
/_save_dir
484 (cd obj
-shared
/contrib
/src
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
485 (cd obj
-shared
/utils
/wxrc
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
488 rm -rf $RPM_BUILD_ROOT
497 # link wx-config when you install RPM.
499 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx
-config
501 # link wx-config with explicit name.
502 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
509 if test -f
%{_bindir}/wx
-config
-a
-f
/usr
/bin
/md5sum
; then
510 SUM1
=`md5sum
%{_libdir}/wx/config/%{wxconfig} | cut
-c
0-32`
511 SUM2
=`md5sum
%{_bindir}/wx
-config | cut
-c
0-32`
512 if test "x$SUM1"
= "x$SUM2"
; then
513 rm -f
%{_bindir}/wx
-config
516 rm -f
%{_bindir}/%{wxconfiglink}
518 %post -n
%{wxbasename}
521 %postun -n
%{wxbasename}
524 %post -n
%{wxbasename}-devel
525 # link wx-config with explicit name.
526 ln
-sf
%{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
529 %postun -n
%{wxbasename}-devel
532 %preun -n
%{wxbasename}-devel
533 rm -f
%{_bindir}/%{wxbaseconfiglink}
550 %postun contrib
-devel
554 %defattr(-,root
,root
)
555 %doc COPYING.LIB
*.txt
556 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.
*
557 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.
*
559 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so.
*
561 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.
*
562 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.
*
563 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.
*
564 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.
*
567 %files devel
-f core
-headers.files
568 %defattr(-,root
,root
)
569 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
570 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so
572 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so
574 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
575 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so
576 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so
577 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
578 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
579 %{_libdir}/libwx_%{portname}*_*-%{ver2}.a
581 %{_libdir}/wx/config/%{wxconfig}
582 %{_libdir}/wx/include/%{wxconfig}/wx
/setup.h
583 %{_libdir}/wx/config/%{wxconfigstatic}
584 %{_libdir}/wx/include/%{wxconfigstatic}/wx
/setup.h
587 %files -n
%{wxbasename}
588 %defattr(-,root
,root
)
589 %{_libdir}/libwx_base*-%{ver2}.so.
*
590 #%{_datadir}/locale/*/*/*
592 %files -n
%{wxbasename}-devel
-f wxbase
-headers.paths
593 %defattr (-,root
,root
)
594 %dir %{_includedir}/wx-%{ver2}
595 %{_libdir}/libwx_base*-%{ver2}.so
596 %{_libdir}/libwx_base*-%{ver2}.a
599 %{_libdir}/libwxregexu-%{ver2}.a
602 %{_libdir}/wx/config/%{wxbaseconfig}
603 %{_libdir}/wx/include/%{wxbaseconfig}/wx
/setup.h
604 %{_libdir}/wx/config/%{wxbaseconfigstatic}
605 %{_libdir}/wx/include/%{wxbaseconfigstatic}/wx
/setup.h
606 %{_datadir}/aclocal
/*.m4
609 %defattr(-,root
,root
)
610 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.
*
613 %defattr(-,root
,root
)
614 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so.
*
615 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so.
*
616 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so.
*
617 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so.
*
618 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so.
*
619 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so.
*
620 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so.
*
621 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so.
*
622 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so.
*
625 %defattr(-,root
,root
)
626 %dir %{_includedir}/wx-%{ver2}/wx
/animate
627 %{_includedir}/wx-%{ver2}/wx
/animate
/*
628 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
630 %dir %{_includedir}/wx-%{ver2}/wx
/deprecated
631 %{_includedir}/wx-%{ver2}/wx
/deprecated
/*
632 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
634 %dir %{_includedir}/wx-%{ver2}/wx
/fl
635 %{_includedir}/wx-%{ver2}/wx
/fl
/*
636 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
638 %dir %{_includedir}/wx-%{ver2}/wx
/gizmos
639 %{_includedir}/wx-%{ver2}/wx
/gizmos
/*
640 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
642 %dir %{_includedir}/wx-%{ver2}/wx
/mmedia
643 %{_includedir}/wx-%{ver2}/wx
/mmedia
/*
644 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
646 %dir %{_includedir}/wx-%{ver2}/wx
/ogl
647 %{_includedir}/wx-%{ver2}/wx
/ogl
/*
648 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
650 %dir %{_includedir}/wx-%{ver2}/wx
/plot
651 %{_includedir}/wx-%{ver2}/wx
/plot
/*
652 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
654 %dir %{_includedir}/wx-%{ver2}/wx
/stc
655 %{_includedir}/wx-%{ver2}/wx
/stc
/*
656 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
658 %dir %{_includedir}/wx-%{ver2}/wx
/svg
659 %{_includedir}/wx-%{ver2}/wx
/svg
/*
660 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so