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}
56 %if %{portname} == gtk2
57 # BuildRequires: gtk+-2.0-devel
59 # BuildRequires: gtk+-devel >= 1.2.0
62 BuildRequires
: zlib
-devel
, libjpeg
-devel
, libpng
-devel
, libtiff
-devel
64 # all packages providing an implementation of wxWidgets library (regardless of
65 # the toolkit used) should provide the (virtual) wxwin package, this makes it
66 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
71 wxWidgets is a free C
++ library
for cross
-platform GUI development.
72 With wxWidgets
, you can create applications
for different GUIs
(GTK
+,
73 Motif
, MS Windows
, MacOS X
, Windows CE
, GPE
) from the same
source code.
76 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
78 Requires: %{name} = %{ver}
79 Requires: %{wxbasename}-devel = %{ver}
83 The GTK
+ %{gtkver} port of the wxWidgets library
, header files.
86 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, OpenGL add
-on.
88 Requires: %{name} = %{ver}
92 OpenGL add
-on library
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
94 %package -n
%{wxbasename}
95 Summary: wxBase library
- non
-GUI support classes of the wxWidgets toolkit
96 Group: Development
/Libraries
99 %description -n
%{wxbasename}
100 wxBase is a collection of C
++ classes providing basic data structures
(strings
,
101 lists
, arrays
), portable wrappers around many OS
-specific funstions
(file
102 operations
, time/date manipulations
, threads
, processes
, sockets
, shared
103 library loading
) as well as other utility classes
(streams
, archive and
104 compression
). wxBase currently supports Win32
, most Unix variants
(Linux
,
105 FreeBSD
, Solaris
, HP
-UX
) and MacOS X
10.3.
107 %package -n
%{wxbasename}-devel
108 Summary: wxBase library
, header files.
109 Group: Development
/Libraries
110 Provides: wxBase
-devel
112 %description -n
%{wxbasename}-devel
113 wxBase library
- non
-GUI support classes of the wxWidgets toolkit
,
117 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, contributed libraries.
119 Requires: %{name} = %{ver}
122 Contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
124 %package contrib
-devel
125 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
127 Requires: %{name}-contrib = %{ver}
128 Requires: %{name}-devel = %{ver}
130 %description contrib
-devel
131 Header files
for contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
134 %setup -q
-n wxGTK
-%{ver}
137 if [ "$SMP"
!= ""
]; then
138 export MAKE
="
make -j$SMP"
143 mkdir obj
-shared
-no
-gui
145 ..
/configure
--prefix
=%{pref} \
156 ..
/configure
--prefix
=%{pref} \
174 rm -rf $RPM_BUILD_ROOT
175 (cd obj
-shared
-no
-gui
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
176 (cd obj
-shared
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
178 # --- wxBase headers list begins here ---
179 cat
<<EOF
>wxbase
-headers.files
289 wx
/protocol
/protocol.h
301 # --- wxBase headers list ends here ---
302 cat
<<EOF
>wxbase
-headers.paths
303 %{_includedir}/wx-%{ver2}/wx
/afterstd.h
304 %{_includedir}/wx-%{ver2}/wx
/app.h
305 %{_includedir}/wx-%{ver2}/wx
/apptrait.h
306 %{_includedir}/wx-%{ver2}/wx
/archive.h
307 %{_includedir}/wx-%{ver2}/wx
/arrimpl.cpp
308 %{_includedir}/wx-%{ver2}/wx
/arrstr.h
309 %{_includedir}/wx-%{ver2}/wx
/beforestd.h
310 %{_includedir}/wx-%{ver2}/wx
/buffer.h
311 %{_includedir}/wx-%{ver2}/wx
/build.h
312 %{_includedir}/wx-%{ver2}/wx
/chkconf.h
313 %{_includedir}/wx-%{ver2}/wx
/clntdata.h
314 %{_includedir}/wx-%{ver2}/wx
/cmdline.h
315 %{_includedir}/wx-%{ver2}/wx
/confbase.h
316 %{_includedir}/wx-%{ver2}/wx
/config.h
317 %{_includedir}/wx-%{ver2}/wx
/containr.h
318 %{_includedir}/wx-%{ver2}/wx
/datetime.h
319 %{_includedir}/wx-%{ver2}/wx
/datetime.inl
320 %{_includedir}/wx-%{ver2}/wx
/datstrm.h
321 %{_includedir}/wx-%{ver2}/wx
/dde.h
322 %{_includedir}/wx-%{ver2}/wx
/debug.h
323 %{_includedir}/wx-%{ver2}/wx
/defs.h
324 %{_includedir}/wx-%{ver2}/wx
/dir.h
325 %{_includedir}/wx-%{ver2}/wx
/dlimpexp.h
326 %{_includedir}/wx-%{ver2}/wx
/dynarray.h
327 %{_includedir}/wx-%{ver2}/wx
/dynlib.h
328 %{_includedir}/wx-%{ver2}/wx
/dynload.h
329 %{_includedir}/wx-%{ver2}/wx
/encconv.h
330 %{_includedir}/wx-%{ver2}/wx
/event.h
331 %{_includedir}/wx-%{ver2}/wx
/except.h
332 %{_includedir}/wx-%{ver2}/wx
/features.h
333 %{_includedir}/wx-%{ver2}/wx
/ffile.h
334 %{_includedir}/wx-%{ver2}/wx
/file.h
335 %{_includedir}/wx-%{ver2}/wx
/fileconf.h
336 %{_includedir}/wx-%{ver2}/wx
/filefn.h
337 %{_includedir}/wx-%{ver2}/wx
/filename.h
338 %{_includedir}/wx-%{ver2}/wx
/filesys.h
339 %{_includedir}/wx-%{ver2}/wx
/fontenc.h
340 %{_includedir}/wx-%{ver2}/wx
/fontmap.h
341 %{_includedir}/wx-%{ver2}/wx
/fs_mem.h
342 %{_includedir}/wx-%{ver2}/wx
/fs_zip.h
343 %{_includedir}/wx-%{ver2}/wx
/hash.h
344 %{_includedir}/wx-%{ver2}/wx
/hashmap.h
345 %{_includedir}/wx-%{ver2}/wx
/hashset.h
346 %{_includedir}/wx-%{ver2}/wx
/html
/forcelnk.h
347 %{_includedir}/wx-%{ver2}/wx
/iconloc.h
348 %{_includedir}/wx-%{ver2}/wx
/init.h
349 %{_includedir}/wx-%{ver2}/wx
/intl.h
350 %{_includedir}/wx-%{ver2}/wx
/iosfwrap.h
351 %{_includedir}/wx-%{ver2}/wx
/ioswrap.h
352 %{_includedir}/wx-%{ver2}/wx
/ipc.h
353 %{_includedir}/wx-%{ver2}/wx
/ipcbase.h
354 %{_includedir}/wx-%{ver2}/wx
/isql.h
355 %{_includedir}/wx-%{ver2}/wx
/isqlext.h
356 %{_includedir}/wx-%{ver2}/wx
/list.h
357 %{_includedir}/wx-%{ver2}/wx
/listimpl.cpp
358 %{_includedir}/wx-%{ver2}/wx
/log.h
359 %{_includedir}/wx-%{ver2}/wx
/longlong.h
360 %{_includedir}/wx-%{ver2}/wx
/math.h
361 %{_includedir}/wx-%{ver2}/wx
/memconf.h
362 %{_includedir}/wx-%{ver2}/wx
/memory.h
363 %{_includedir}/wx-%{ver2}/wx
/memtext.h
364 %{_includedir}/wx-%{ver2}/wx
/mimetype.h
365 %{_includedir}/wx-%{ver2}/wx
/module.h
366 %{_includedir}/wx-%{ver2}/wx
/msgout.h
367 %{_includedir}/wx-%{ver2}/wx
/mstream.h
368 %{_includedir}/wx-%{ver2}/wx
/object.h
369 %{_includedir}/wx-%{ver2}/wx
/platform.h
370 %{_includedir}/wx-%{ver2}/wx
/process.h
371 %{_includedir}/wx-%{ver2}/wx
/ptr_scpd.h
372 %{_includedir}/wx-%{ver2}/wx
/regex.h
373 %{_includedir}/wx-%{ver2}/wx
/scopeguard.h
374 %{_includedir}/wx-%{ver2}/wx
/snglinst.h
375 %{_includedir}/wx-%{ver2}/wx
/sstream.h
376 %{_includedir}/wx-%{ver2}/wx
/stack.h
377 %{_includedir}/wx-%{ver2}/wx
/stackwalk.h
378 %{_includedir}/wx-%{ver2}/wx
/stdpaths.h
379 %{_includedir}/wx-%{ver2}/wx
/stockitem.h
380 %{_includedir}/wx-%{ver2}/wx
/stopwatch.h
381 %{_includedir}/wx-%{ver2}/wx
/strconv.h
382 %{_includedir}/wx-%{ver2}/wx
/stream.h
383 %{_includedir}/wx-%{ver2}/wx
/string.h
384 %{_includedir}/wx-%{ver2}/wx
/sysopt.h
385 %{_includedir}/wx-%{ver2}/wx
/textbuf.h
386 %{_includedir}/wx-%{ver2}/wx
/textfile.h
387 %{_includedir}/wx-%{ver2}/wx
/thread.h
388 %{_includedir}/wx-%{ver2}/wx
/thrimpl.cpp
389 %{_includedir}/wx-%{ver2}/wx
/timer.h
390 %{_includedir}/wx-%{ver2}/wx
/tokenzr.h
391 %{_includedir}/wx-%{ver2}/wx
/txtstrm.h
392 %{_includedir}/wx-%{ver2}/wx
/types.h
393 %{_includedir}/wx-%{ver2}/wx
/uri.h
394 %{_includedir}/wx-%{ver2}/wx
/utils.h
395 %{_includedir}/wx-%{ver2}/wx
/variant.h
396 %{_includedir}/wx-%{ver2}/wx
/vector.h
397 %{_includedir}/wx-%{ver2}/wx
/version.h
398 %{_includedir}/wx-%{ver2}/wx
/volume.h
399 %{_includedir}/wx-%{ver2}/wx
/wfstream.h
400 %{_includedir}/wx-%{ver2}/wx
/wx.h
401 %{_includedir}/wx-%{ver2}/wx
/wxchar.h
402 %{_includedir}/wx-%{ver2}/wx
/wxprec.h
403 %{_includedir}/wx-%{ver2}/wx
/xti.h
404 %{_includedir}/wx-%{ver2}/wx
/xtistrm.h
405 %{_includedir}/wx-%{ver2}/wx
/zipstrm.h
406 %{_includedir}/wx-%{ver2}/wx
/zstream.h
407 %{_includedir}/wx-%{ver2}/wx
/fs_inet.h
408 %{_includedir}/wx-%{ver2}/wx
/gsocket.h
409 %{_includedir}/wx-%{ver2}/wx
/protocol
/file.h
410 %{_includedir}/wx-%{ver2}/wx
/protocol
/ftp.h
411 %{_includedir}/wx-%{ver2}/wx
/protocol
/http.h
412 %{_includedir}/wx-%{ver2}/wx
/protocol
/protocol.h
413 %{_includedir}/wx-%{ver2}/wx
/sckaddr.h
414 %{_includedir}/wx-%{ver2}/wx
/sckipc.h
415 %{_includedir}/wx-%{ver2}/wx
/sckstrm.h
416 %{_includedir}/wx-%{ver2}/wx
/socket.h
417 %{_includedir}/wx-%{ver2}/wx
/url.h
418 %{_includedir}/wx-%{ver2}/wx
/xml
/xml.h
419 %{_includedir}/wx-%{ver2}/wx
/xtixml.h
420 %{_includedir}/wx-%{ver2}/wx
/db.h
421 %{_includedir}/wx-%{ver2}/wx
/dbkeyg.h
422 %{_includedir}/wx-%{ver2}/wx
/dbtable.h
424 # --- wxBase headers list ends here ---
426 # temporarily remove base headers
427 mkdir $RPM_BUILD_ROOT
/_save_dir
428 cp
-r $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT
/_save_dir
429 for f
in `cat wxbase
-headers.files`
; do
430 rm -f $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2}/$f
432 # list of all core headers:
433 find $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} -type f | sed
-e "s
,$RPM_BUILD_ROOT
,,g"
>core
-headers.files
434 # move base headers (actually all headers) back again
435 cp
-f
-r $RPM_BUILD_ROOT
/_save_dir
/* $RPM_BUILD_ROOT
%{_includedir}
436 rm -rf $RPM_BUILD_ROOT
/_save_dir
439 (cd obj
-shared
/contrib
/src
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
440 (cd obj
-shared
/utils
/wxrc
; make prefix
=$RPM_BUILD_ROOT
/usr
install)
443 rm -rf $RPM_BUILD_ROOT
452 # link wx-config when you install RPM.
454 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx
-config
456 # link wx-config with explicit name.
457 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
464 if test -f
%{_bindir}/wx
-config
-a
-f
/usr
/bin
/md5sum
; then
465 SUM1
=`md5sum
%{_libdir}/wx/config/%{wxconfig} | cut
-c
0-32`
466 SUM2
=`md5sum
%{_bindir}/wx
-config | cut
-c
0-32`
467 if test "x$SUM1"
= "x$SUM2"
; then
468 rm -f
%{_bindir}/wx
-config
471 rm -f
%{_bindir}/%{wxconfiglink}
473 %post -n
%{wxbasename}
476 %postun -n
%{wxbasename}
479 %post -n
%{wxbasename}-devel
480 # link wx-config with explicit name.
481 ln
-sf
%{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
484 %postun -n
%{wxbasename}-devel
487 %preun -n
%{wxbasename}-devel
488 rm -f
%{_bindir}/%{wxbaseconfiglink}
505 %postun contrib
-devel
509 %defattr(-,root
,root
)
510 %doc COPYING.LIB
*.txt
511 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.
*
512 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.
*
514 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so.
*
516 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.
*
517 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.
*
518 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.
*
519 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.
*
522 %files devel
-f core
-headers.files
523 %defattr(-,root
,root
)
524 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
525 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so
527 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so
529 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
530 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so
531 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so
532 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
533 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
535 %{_libdir}/wx/config/%{wxconfig}
536 %{_libdir}/wx/include/%{wxconfig}/wx
/setup.h
539 %files -n
%{wxbasename}
540 %defattr(-,root
,root
)
541 %{_libdir}/libwx_base*-%{ver2}.so.
*
542 #%{_datadir}/locale/*/*/*
544 # %{_libdir}/libwxregexu-%{ver2}.a
547 %files -n
%{wxbasename}-devel
-f wxbase
-headers.paths
548 %defattr (-,root
,root
)
549 %dir %{_includedir}/wx-%{ver2}
550 %{_libdir}/libwx_base*-%{ver2}.so
552 %{_libdir}/wx/config/%{wxbaseconfig}
553 %{_libdir}/wx/include/%{wxbaseconfig}/wx
/setup.h
554 %{_datadir}/aclocal
/*.m4
557 %defattr(-,root
,root
)
558 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.
*
561 %defattr(-,root
,root
)
562 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so.
*
563 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so.
*
564 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so.
*
565 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so.
*
566 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so.
*
567 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so.
*
568 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so.
*
569 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so.
*
570 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so.
*
573 %defattr(-,root
,root
)
574 %dir %{_includedir}/wx-%{ver2}/wx
/animate
575 %{_includedir}/wx-%{ver2}/wx
/animate
/*
576 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
578 %dir %{_includedir}/wx-%{ver2}/wx
/deprecated
579 %{_includedir}/wx-%{ver2}/wx
/deprecated
/*
580 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
582 %dir %{_includedir}/wx-%{ver2}/wx
/fl
583 %{_includedir}/wx-%{ver2}/wx
/fl
/*
584 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
586 %dir %{_includedir}/wx-%{ver2}/wx
/gizmos
587 %{_includedir}/wx-%{ver2}/wx
/gizmos
/*
588 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
590 %dir %{_includedir}/wx-%{ver2}/wx
/mmedia
591 %{_includedir}/wx-%{ver2}/wx
/mmedia
/*
592 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
594 %dir %{_includedir}/wx-%{ver2}/wx
/ogl
595 %{_includedir}/wx-%{ver2}/wx
/ogl
/*
596 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
598 %dir %{_includedir}/wx-%{ver2}/wx
/plot
599 %{_includedir}/wx-%{ver2}/wx
/plot
/*
600 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
602 %dir %{_includedir}/wx-%{ver2}/wx
/stc
603 %{_includedir}/wx-%{ver2}/wx
/stc
/*
604 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
606 %dir %{_includedir}/wx-%{ver2}/wx
/svg
607 %{_includedir}/wx-%{ver2}/wx
/svg
/*
608 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so