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}}
16 %{?_with_universal: %{expand: %%define universal 1}}
17 %{?_without_universal: %{expand: %%define universal 0}}
23 %define portname gtk2univ
31 %define portname gtkuniv
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
43 %define wxbasename wx
-base
44 %define name wx
-%{portname}
45 %define wxconfig
%{portname}-ansi-release-%{ver2}
46 %define wxconfiglink wx
%{portname}-%{ver2}-config
49 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
53 License: wxWindows Licence
55 Source: wxGTK
-%{ver}.tar.bz2
56 URL: http
://www.wxwidgets.org
57 Packager: Vadim Zeitlin
<vadim@wxwindows.org
>
59 BuildRoot: %{_tmppath}/%{name}-root
60 Requires: %{wxbasename} = %{ver}
62 # all packages providing an implementation of wxWidgets library (regardless of
63 # the toolkit used) should provide the (virtual) wxwin package, this makes it
64 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
69 wxWidgets is a free C
++ library
for cross
-platform GUI development.
70 With wxWidgets
, you can create applications
for different GUIs
(GTK
+,
71 Motif
/LessTif
, MS Windows
, Mac
) from the same
source code.
74 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
76 Requires: %{name} = %{ver}
77 Requires: %{wxbasename}-devel = %{ver}
81 Header files
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
84 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, OpenGL add
-on.
86 Requires: %{name} = %{ver}
90 OpenGL add
-on library
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
93 Summary: wxGTK static libraries
94 Group: Development
/Libraries
95 Requires: %{wxbasename}-static
96 Requires: %{name}-devel = %{ver}
99 Static libraries
for wxGTK. You need them
if you want to link statically against wxGTK.
102 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, contributed libraries.
104 Requires: %{name} = %{ver}
107 Contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
109 %package contrib
-devel
110 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
112 Requires: %{name}-contrib = %{ver}
113 Requires: %{name}-devel = %{ver}
115 %description contrib
-devel
116 Header files
for contributed libraries
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
119 %setup -q
-n wxGTK
-%{ver}
122 if [ "$SMP"
!= ""
]; then
123 export MAKE
="
make -j$SMP"
130 ..
/configure
--prefix
=%{pref} --with
-gtk \
151 ..
/configure
--prefix
=%{pref} --with
-gtk
--disable
-shared \
168 rm -rf $RPM_BUILD_ROOT
169 (cd obj
-static
; make prefix
=$RPM_BUILD_ROOT
%{pref} install)
170 (cd obj
-shared
; make prefix
=$RPM_BUILD_ROOT
%{pref} install)
172 # Remove headers that are part of wx-base-devel:
174 # --- wxBase headers list begins here ---
175 cat
<<EOF
>wxbase
-headers
-list
299 wx
/protocol
/protocol.h
312 # --- wxBase headers list ends here ---
313 for f
in `cat wxbase
-headers
-list`
; do
314 rm -f $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2}/$f
317 # list of all core headers:
318 find $RPM_BUILD_ROOT
%{_includedir}/wx-%{ver2} -type f | sed
-e "s
,$RPM_BUILD_ROOT
,,g"
>core
-headers.files
321 (cd obj
-shared
/contrib
/src
; make prefix
=$RPM_BUILD_ROOT
%{pref} install)
322 (cd obj
-shared
/utils
/wxrc
; make prefix
=$RPM_BUILD_ROOT
%{pref} install)
324 # remove wxBase files so that RPM doesn't complain about unpackaged files:
325 rm -f $RPM_BUILD_ROOT
%{_libdir}/libwx_base
*
327 rm -f $RPM_BUILD_ROOT
%{_libdir}/libwxregexu-%{ver2}.a
329 rm -f $RPM_BUILD_ROOT
%{_datadir}/aclocal
/*
330 rm -f $RPM_BUILD_ROOT
%{_datadir}/locale
/*/*/*
333 rm -rf $RPM_BUILD_ROOT
342 # link wx-config when you install RPM.
343 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx
-config
344 # link wx-config with explicit name.
345 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
352 if test -f
%{_bindir}/wx
-config
-a
-f
/usr
/bin
/md5sum
; then
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
359 rm -f
%{_bindir}/%{wxconfiglink}
376 %postun contrib
-devel
380 %defattr(-,root
,root
)
381 %doc COPYING.LIB
*.txt
382 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.
*
383 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.
*
385 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so.
*
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.
*
393 %files devel
-f core
-headers.files
394 %defattr(-,root
,root
)
395 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
396 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so
398 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so
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
410 %defattr(-,root
,root
)
411 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.
*
414 %defattr (-,root
,root
)
415 %{_libdir}/libwx_%{portname}*_*-%{ver2}.a
418 %defattr(-,root
,root
)
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.
*
430 %defattr(-,root
,root
)
431 %dir %{_includedir}/wx-%{ver2}/wx
/animate
432 %{_includedir}/wx-%{ver2}/wx
/animate
/*
433 %{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
435 %dir %{_includedir}/wx-%{ver2}/wx
/deprecated
436 %{_includedir}/wx-%{ver2}/wx
/deprecated
/*
437 %{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
439 %dir %{_includedir}/wx-%{ver2}/wx
/fl
440 %{_includedir}/wx-%{ver2}/wx
/fl
/*
441 %{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
443 %dir %{_includedir}/wx-%{ver2}/wx
/gizmos
444 %{_includedir}/wx-%{ver2}/wx
/gizmos
/*
445 %{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
447 %dir %{_includedir}/wx-%{ver2}/wx
/mmedia
448 %{_includedir}/wx-%{ver2}/wx
/mmedia
/*
449 %{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
451 %dir %{_includedir}/wx-%{ver2}/wx
/ogl
452 %{_includedir}/wx-%{ver2}/wx
/ogl
/*
453 %{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
455 %dir %{_includedir}/wx-%{ver2}/wx
/plot
456 %{_includedir}/wx-%{ver2}/wx
/plot
/*
457 %{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
459 %dir %{_includedir}/wx-%{ver2}/wx
/stc
460 %{_includedir}/wx-%{ver2}/wx
/stc
/*
461 %{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
463 %dir %{_includedir}/wx-%{ver2}/wx
/svg
464 %{_includedir}/wx-%{ver2}/wx
/svg
/*
465 %{_libdir}/libwx_%{portname}*_svg-%{ver2}.so