5 # version for package name according to OpenSuse policy:
6 # http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
9 # Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
11 %{?_with_unicode: %{expand: %%define unicode 1}}
12 %{?_without_unicode: %{expand: %%define unicode 0}}
15 %{?_with_gtk2: %{expand: %%define gtk2 1}}
16 %{?_without_gtk2: %{expand: %%define gtk2 0}}
18 # "buildname" needs to be e.g. gtk2ud for debug builds
23 %define buildname gtk2u
25 %define buildname gtk2
34 %define name wx
-%{portname}-unicode
35 %define wxconfig
%{portname}-unicode-%{ver2}
36 %define wxconfigstatic
%{portname}-unicode-static-%{ver2}
37 %define wxconfiglink wx
%{portname}u-%{ver2}-config
39 %define name wx
-%{portname}-ansi
40 %define wxconfig
%{portname}-ansi-%{ver2}
41 %define wxconfigstatic
%{portname}-ansi-static-%{ver2}
42 %define wxconfiglink wx
%{portname}-%{ver2}-config
46 %define wxbasename wx
-base
-unicode
47 %define wxbaseconfig base
-unicode
-%{ver2}
48 %define wxbaseconfiglink wxbaseu
-%{ver2}-config
50 %define wxbasename wx
-base
-ansi
51 %define wxbaseconfig base
-ansi
-%{ver2}
52 %define wxbaseconfiglink wxbase
-%{ver2}-config
56 # avoiding shlib-policy-name-error: Your package contains a single shared
57 # library but is not named after its SONAME.
58 %define glname libwx_
%{buildname}_gl-%{sver}
60 %define glname
%{name}-gl
63 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
67 License: wxWindows Licence
68 Group: System
/Libraries
69 Source: wxWidgets
-%{ver}.tar.bz2
70 URL: http
://www.wxwidgets.org
72 BuildRoot: %{_tmppath}/%{name}-root
73 Requires: %{wxbasename} = %{ver}
74 %if %{portname} == gtk2
75 BuildRequires
: gtk2
-devel
77 BuildRequires
: gtk
+-devel
>= 1.2.0
80 BuildRequires
: zlib
-devel
, libjpeg
-devel
, libpng
-devel
, libtiff
-devel
81 # on RedHat 5 default GCC 4.1.2 crashes during compilation
83 BuildRequires
: gcc44
-c
++
85 BuildRequires
: gcc
-c
++
89 BuildRequires
: libexpat
-devel
, Mesa
-devel
, xorg
-x11
-libSM
-devel
90 BuildRequires
: gstreamer
-0_10
-devel
, gstreamer
-0_10
-plugins
-base
-devel
92 %if 0%{?mandriva_version}
93 BuildRequires
: libexpat
-devel
, libmesaglu
-devel
, libsm
-devel
94 # For now disabling mediactrl
95 # FIXME: How to resolve OBS Mandriva dependecies for these?
96 #BuildRequires: libgstreamer-devel, libgstreamer-plugins-base-devel
98 BuildRequires
: expat
-devel
, libGLU
-devel
, libSM
-devel
99 BuildRequires
: gstreamer
-devel
, gstreamer
-plugins
-base
-devel
103 # all packages providing an implementation of wxWidgets library (regardless of
104 # the toolkit used) should provide the (virtual) wxwin package, this makes it
105 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
106 Provides: wxwin
= %{version}
107 Provides: wxGTK
= %{version}
110 wxWidgets is a free C
++ library
for cross
-platform GUI development.
111 With wxWidgets
, you can create applications
for different GUIs
(GTK
+,
112 Motif
, MS Windows
, MacOS X
, Windows CE
, GPE
) from the same
source code.
115 Summary: The translations
for the wxWidgets library
116 Group: System
/Libraries
118 %description -n wx
-i18n
119 The translations files
for the wxWidgets library.
122 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
123 Group: Development
/Libraries
124 Requires: %{name} = %{ver}
125 Requires: %{glname} = %{ver}
126 Requires: %{wxbasename}-devel = %{ver}
127 Provides: wxGTK
-devel
= %{version}
130 The GTK
+ %{gtkver} port of the wxWidgets library
, header files.
132 %package -n
%{glname}
133 Summary: The GTK
+ %{gtkver} port of the wxWidgets library
, OpenGL add
-on
134 Group: System
/Libraries
135 Requires: %{name} = %{ver}
136 Provides: wxGTK
-gl
= %{version}
138 %description -n
%{glname}
139 OpenGL add
-on library
for wxGTK
, the GTK
+ %{gtkver} port of the wxWidgets library.
141 %package -n
%{wxbasename}
142 Summary: wxBase library
- non
-GUI support classes of the wxWidgets toolkit
143 Group: Development
/Libraries
144 Provides: wxBase
= %{version}
146 %description -n
%{wxbasename}
147 wxBase is a collection of C
++ classes providing basic data structures
(strings
,
148 lists
, arrays
), portable wrappers around many OS
-specific funstions
(file
149 operations
, time/date manipulations
, threads
, processes
, sockets
, shared
150 library loading
) as well as other utility classes
(streams
, archive and
151 compression
). wxBase currently supports Win32
, most Unix variants
(Linux
,
152 FreeBSD
, Solaris
, HP
-UX
) and MacOS X
(Carbon and Mach
-0).
154 %package -n
%{wxbasename}-devel
155 Summary: wxBase library
, header files
156 Group: Development
/Libraries
157 Provides: wxBase
-devel
= %{version}
159 %description -n
%{wxbasename}-devel
160 wxBase library
- non
-GUI support classes of the wxWidgets toolkit
,
164 %setup -q
-n wxWidgets
-%{ver}
172 # if it's not set OpenSuse warns: "compiled without RPM_OPT_FLAGS"
173 export CFLAGS
="$RPM_OPT_FLAGS
-fno
-strict
-aliasing"
174 export CXXFLAGS
="$RPM_OPT_FLAGS
-fno
-strict
-aliasing"
178 ..
/configure
--prefix
=%{_prefix} --libdir=%{_libdir} --disable
-rpath \
189 %if ! 0%{?mandriva_version}
199 ..
/configure
--prefix
=%{_prefix} --libdir=%{_libdir} --disable
-rpath \
211 %if ! 0%{?mandriva_version}
222 rm -rf $RPM_BUILD_ROOT
223 (cd obj
-static
; make DESTDIR
=$RPM_BUILD_ROOT prefix
=%{_prefix} install)
224 (cd obj
-shared
; make DESTDIR
=$RPM_BUILD_ROOT prefix
=%{_prefix} install)
226 # --- wxBase headers list begins here ---
227 cat
<<EOF
>wxbase
-headers.files
383 wx
/meta
/convertible.h
385 wx
/meta
/implicitconversion.h
391 wx
/generic
/fswatcher.h
402 wx
/unix
/fswatcher_kqueue.h
405 wx
/unix
/fswatcher_inotify.h
411 wx
/protocol
/protocol.h
420 # --- wxBase headers list ends here ---
422 # --- wxBase headers list with paths ---
423 sed
-e 's@^@
%{_includedir}/wx-%{ver2}/@' wxbase
-headers.files
> wxbase
-headers.paths
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
/utils
/wxrc
; make DESTDIR
=$RPM_BUILD_ROOT prefix
=%{_prefix} install)
441 # wx-config link is created during package installation, remove it for now
442 rm -f $RPM_BUILD_ROOT
%{_bindir}/wx
-config
445 rm -rf $RPM_BUILD_ROOT
454 # link wx-config when you install RPM.
456 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx
-config
458 # link wx-config with explicit name.
459 ln
-sf
%{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
467 rm -f
%{_bindir}/wx
-config
469 rm -f
%{_bindir}/%{wxconfiglink}
471 %post -n
%{wxbasename}
474 %postun -n
%{wxbasename}
477 %post -n
%{wxbasename}-devel
478 # link wx-config with explicit name.
479 ln
-sf
%{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
482 %postun -n
%{wxbasename}-devel
485 %preun -n
%{wxbasename}-devel
486 rm -f
%{_bindir}/%{wxbaseconfiglink}
495 %defattr(-,root
,root
)
496 #doc COPYING.LIB *.txt
497 %{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.
*
498 %{_libdir}/libwx_%{buildname}_aui-%{ver2}.so.
*
499 %{_libdir}/libwx_%{buildname}_core-%{ver2}.so.
*
500 %{_libdir}/libwx_%{buildname}_html-%{ver2}.so.
*
501 %if ! 0%{?mandriva_version}
502 %{_libdir}/libwx_%{buildname}_media-%{ver2}.so.
*
504 %{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so.
*
505 %{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.
*
506 %{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so.
*
507 %{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so.
*
508 %{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.
*
509 %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.
*
512 %defattr(-,root
,root
)
513 %{_datadir}/locale
/*/LC_MESSAGES
/*.mo
515 %files devel
-f core
-headers.files
516 %defattr(-,root
,root
)
517 %dir %{_includedir}/wx-%{ver2}/wx
/aui
518 %dir %{_includedir}/wx-%{ver2}/wx
/gtk
519 %dir %{_includedir}/wx-%{ver2}/wx
/gtk
/gnome
520 %dir %{_includedir}/wx-%{ver2}/wx
/gtk
/hildon
521 %dir %{_includedir}/wx-%{ver2}/wx
/persist
522 %dir %{_includedir}/wx-%{ver2}/wx
/propgrid
523 %dir %{_includedir}/wx-%{ver2}/wx
/ribbon
524 %dir %{_includedir}/wx-%{ver2}/wx
/richtext
525 %dir %{_includedir}/wx-%{ver2}/wx
/stc
526 %dir %{_includedir}/wx-%{ver2}/wx
/unix
527 %dir %{_includedir}/wx-%{ver2}/wx
/xrc
529 %{_libdir}/libwx_%{buildname}_adv-%{ver2}.so
530 %{_libdir}/libwx_%{buildname}_aui-%{ver2}.so
531 %{_libdir}/libwx_%{buildname}_core-%{ver2}.so
532 %{_libdir}/libwx_%{buildname}_gl-%{ver2}.so
533 %{_libdir}/libwx_%{buildname}_html-%{ver2}.so
534 %if ! 0%{?mandriva_version}
535 %{_libdir}/libwx_%{buildname}_media-%{ver2}.so
537 %{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so
538 %{_libdir}/libwx_%{buildname}_qa-%{ver2}.so
539 %{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so
540 %{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so
541 %{_libdir}/libwx_%{buildname}_stc-%{ver2}.so
542 %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so
544 %{_libdir}/libwx_%{buildname}_adv-%{ver2}.a
545 %{_libdir}/libwx_%{buildname}_aui-%{ver2}.a
546 %{_libdir}/libwx_%{buildname}_core-%{ver2}.a
547 %{_libdir}/libwx_%{buildname}_gl-%{ver2}.a
548 %{_libdir}/libwx_%{buildname}_html-%{ver2}.a
549 %if ! 0%{?mandriva_version}
550 %{_libdir}/libwx_%{buildname}_media-%{ver2}.a
552 %{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.a
553 %{_libdir}/libwx_%{buildname}_qa-%{ver2}.a
554 %{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.a
555 %{_libdir}/libwx_%{buildname}_richtext-%{ver2}.a
556 %{_libdir}/libwx_%{buildname}_stc-%{ver2}.a
557 %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a
559 %dir %{_libdir}/wx
/config
560 %dir %{_libdir}/wx
/include
561 %dir %{_libdir}/wx/include/%{wxconfig}
562 %dir %{_libdir}/wx/include/%{wxconfig}/wx
563 %dir %{_libdir}/wx/include/%{wxconfigstatic}
564 %dir %{_libdir}/wx/include/%{wxconfigstatic}/wx
565 %{_libdir}/wx/config/%{wxconfig}
566 %{_libdir}/wx/include/%{wxconfig}/wx
/setup.h
567 %{_libdir}/wx/config/%{wxconfigstatic}
568 %{_libdir}/wx/include/%{wxconfigstatic}/wx
/setup.h
571 %files -n
%{wxbasename}
572 %defattr(-,root
,root
)
573 %{_libdir}/libwx_base*-%{ver2}.so.
*
575 %files -n
%{wxbasename}-devel
-f wxbase
-headers.paths
576 %defattr (-,root
,root
)
577 %dir %{_includedir}/wx-%{ver2}
578 %dir %{_includedir}/wx-%{ver2}/wx
579 %dir %{_includedir}/wx-%{ver2}/wx
/generic
580 %dir %{_includedir}/wx-%{ver2}/wx
/html
581 %dir %{_includedir}/wx-%{ver2}/wx
/meta
582 %dir %{_includedir}/wx-%{ver2}/wx
/protocol
583 %dir %{_includedir}/wx-%{ver2}/wx
/unix
584 %dir %{_includedir}/wx-%{ver2}/wx
/xml
585 %dir %{_datadir}/bakefile
/presets
586 %{_libdir}/libwx_base*-%{ver2}.so
587 %{_libdir}/libwx_base*-%{ver2}.a
589 %{_libdir}/libwxregexu-%{ver2}.a
591 %{_libdir}/libwxscintilla-%{ver2}.a
593 %dir %{_datadir}/bakefile
594 %dir %{_datadir}/bakefile
/presets
595 %{_datadir}/aclocal
/*.m4
596 %{_datadir}/bakefile
/presets
/*
599 %defattr(-,root
,root
)
600 %{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.
*