]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxGTK.spec
Check the number of points in the image map in wxHTML.
[wxWidgets.git] / wxGTK.spec
... / ...
CommitLineData
1%define _prefix /usr
2%define ver 2.9.5
3%define ver2 2.9
4%define rel 1
5# version for package name according to OpenSuse policy:
6# http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
7%define sver 2_9-5
8
9# Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
10%define unicode 1
11%{?_with_unicode: %{expand: %%define unicode 1}}
12%{?_without_unicode: %{expand: %%define unicode 0}}
13
14%define gtk2 1
15%{?_with_gtk2: %{expand: %%define gtk2 1}}
16%{?_without_gtk2: %{expand: %%define gtk2 0}}
17
18# "buildname" needs to be e.g. gtk2ud for debug builds
19%if %{gtk2}
20 %define gtkver 2
21 %define portname gtk2
22%if %{unicode}
23 %define buildname gtk2u
24%else
25 %define buildname gtk2
26%endif
27%else
28 %define gtkver 1.2
29 %define portname gtk
30 %define buildname gtk
31%endif
32
33%if %{unicode}
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
38%else
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
43%endif
44
45%if %{unicode}
46 %define wxbasename wx-base-unicode
47 %define wxbaseconfig base-unicode-%{ver2}
48 %define wxbaseconfiglink wxbaseu-%{ver2}-config
49%else
50 %define wxbasename wx-base-ansi
51 %define wxbaseconfig base-ansi-%{ver2}
52 %define wxbaseconfiglink wxbase-%{ver2}-config
53%endif
54
55%if 0%{?suse_version}
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}
59%else
60 %define glname %{name}-gl
61%endif
62
63Summary: The GTK+ %{gtkver} port of the wxWidgets library
64Name: %{name}
65Version: %{ver}
66Release: %{rel}
67License: wxWindows Licence
68Group: System/Libraries
69Source: wxWidgets-%{ver}.tar.bz2
70URL: http://www.wxwidgets.org
71Prefix: %{_prefix}
72BuildRoot: %{_tmppath}/%{name}-root
73Requires: %{wxbasename} = %{ver}
74%if %{portname} == gtk2
75BuildRequires: gtk2-devel
76%else
77BuildRequires: gtk+-devel >= 1.2.0
78%endif
79
80BuildRequires: zlib-devel, libjpeg-devel, libpng-devel, libtiff-devel
81# on RedHat 5 default GCC 4.1.2 crashes during compilation
82%if 0%{?rhel} == 5
83BuildRequires: gcc44-c++
84%else
85BuildRequires: gcc-c++
86%endif
87
88%if 0%{?suse_version}
89BuildRequires: libexpat-devel, Mesa-devel, xorg-x11-libSM-devel
90BuildRequires: gstreamer-0_10-devel, gstreamer-0_10-plugins-base-devel
91%else
92%if 0%{?mandriva_version}
93BuildRequires: 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
97%else
98BuildRequires: expat-devel, libGLU-devel, libSM-devel
99BuildRequires: gstreamer-devel, gstreamer-plugins-base-devel
100%endif
101%endif
102
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..."
106Provides: wxwin = %{version}
107Provides: wxGTK = %{version}
108
109%description
110wxWidgets is a free C++ library for cross-platform GUI development.
111With wxWidgets, you can create applications for different GUIs (GTK+,
112Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.
113
114%package -n wx-i18n
115Summary: The translations for the wxWidgets library
116Group: System/Libraries
117
118%description -n wx-i18n
119The translations files for the wxWidgets library.
120
121%package devel
122Summary: The GTK+ %{gtkver} port of the wxWidgets library
123Group: Development/Libraries
124Requires: %{name} = %{ver}
125Requires: %{glname} = %{ver}
126Requires: %{wxbasename}-devel = %{ver}
127Provides: wxGTK-devel = %{version}
128
129%description devel
130The GTK+ %{gtkver} port of the wxWidgets library, header files.
131
132%package -n %{glname}
133Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on
134Group: System/Libraries
135Requires: %{name} = %{ver}
136Provides: wxGTK-gl = %{version}
137
138%description -n %{glname}
139OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
140
141%package -n %{wxbasename}
142Summary: wxBase library - non-GUI support classes of the wxWidgets toolkit
143Group: Development/Libraries
144Provides: wxBase = %{version}
145
146%description -n %{wxbasename}
147wxBase is a collection of C++ classes providing basic data structures (strings,
148lists, arrays), portable wrappers around many OS-specific funstions (file
149operations, time/date manipulations, threads, processes, sockets, shared
150library loading) as well as other utility classes (streams, archive and
151compression). wxBase currently supports Win32, most Unix variants (Linux,
152FreeBSD, Solaris, HP-UX) and MacOS X (Carbon and Mach-0).
153
154%package -n %{wxbasename}-devel
155Summary: wxBase library, header files
156Group: Development/Libraries
157Provides: wxBase-devel = %{version}
158
159%description -n %{wxbasename}-devel
160wxBase library - non-GUI support classes of the wxWidgets toolkit,
161header files.
162
163%prep
164%setup -q -n wxWidgets-%{ver}
165
166%build
167
168%if 0%{?rhel} == 5
169export CC=gcc44
170export CXX=g++44
171%endif
172# if it's not set OpenSuse warns: "compiled without RPM_OPT_FLAGS"
173export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
174export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
175
176mkdir obj-shared
177cd obj-shared
178../configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-rpath \
179%if ! %{gtk2}
180 --with-gtk=1 \
181%else
182 --with-gtk=2 \
183%endif
184%if %{unicode}
185 --enable-unicode \
186%else
187 --disable-unicode \
188%endif
189%if ! 0%{?mandriva_version}
190 --enable-mediactrl \
191%endif
192 --with-opengl
193make %{?_smp_mflags}
194
195cd ..
196
197mkdir obj-static
198cd obj-static
199../configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-rpath \
200%if ! %{gtk2}
201 --with-gtk=1 \
202%else
203 --with-gtk=2 \
204%endif
205 --disable-shared \
206%if %{unicode}
207 --enable-unicode \
208%else
209 --disable-unicode \
210%endif
211%if ! 0%{?mandriva_version}
212 --enable-mediactrl \
213%endif
214 --with-opengl
215make %{?_smp_mflags}
216
217cd ..
218
219make -C locale allmo
220
221%install
222rm -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)
225
226# --- wxBase headers list begins here ---
227cat <<EOF >wxbase-headers.files
228wx/afterstd.h
229wx/any.h
230wx/anystr.h
231wx/app.h
232wx/apptrait.h
233wx/archive.h
234wx/arrimpl.cpp
235wx/arrstr.h
236wx/atomic.h
237wx/base64.h
238wx/beforestd.h
239wx/buffer.h
240wx/build.h
241wx/chartype.h
242wx/checkeddelete.h
243wx/chkconf.h
244wx/clntdata.h
245wx/cmdargs.h
246wx/cmdline.h
247wx/compiler.h
248wx/confbase.h
249wx/config.h
250wx/convauto.h
251wx/containr.h
252wx/cpp.h
253wx/crt.h
254wx/datetime.h
255wx/datstrm.h
256wx/dde.h
257wx/debug.h
258wx/defs.h
259wx/dir.h
260wx/dlimpexp.h
261wx/dlist.h
262wx/dynarray.h
263wx/dynlib.h
264wx/dynload.h
265wx/encconv.h
266wx/event.h
267wx/eventfilter.h
268wx/evtloop.h
269wx/except.h
270wx/features.h
271wx/flags.h
272wx/ffile.h
273wx/file.h
274wx/fileconf.h
275wx/filefn.h
276wx/filename.h
277wx/filesys.h
278wx/fontenc.h
279wx/fontmap.h
280wx/fs_arc.h
281wx/fs_filter.h
282wx/fs_mem.h
283wx/fs_zip.h
284wx/hash.h
285wx/hashmap.h
286wx/hashset.h
287wx/html/forcelnk.h
288wx/iconloc.h
289wx/init.h
290wx/intl.h
291wx/iosfwrap.h
292wx/ioswrap.h
293wx/ipc.h
294wx/ipcbase.h
295wx/kbdstate.h
296wx/language.h
297wx/link.h
298wx/list.h
299wx/listimpl.cpp
300wx/log.h
301wx/longlong.h
302wx/math.h
303wx/memconf.h
304wx/memory.h
305wx/memtext.h
306wx/mimetype.h
307wx/module.h
308wx/mousestate.h
309wx/msgout.h
310wx/msgqueue.h
311wx/mstream.h
312wx/numformatter.h
313wx/object.h
314wx/platform.h
315wx/platinfo.h
316wx/power.h
317wx/process.h
318wx/ptr_scpd.h
319wx/ptr_shrd.h
320wx/recguard.h
321wx/regex.h
322wx/rtti.h
323wx/scopedarray.h
324wx/scopedptr.h
325wx/scopeguard.h
326wx/sharedptr.h
327wx/snglinst.h
328wx/sstream.h
329wx/stack.h
330wx/stackwalk.h
331wx/stdpaths.h
332wx/stdstream.h
333wx/stockitem.h
334wx/stopwatch.h
335wx/strconv.h
336wx/stream.h
337wx/string.h
338wx/stringimpl.h
339wx/stringops.h
340wx/strvararg.h
341wx/sysopt.h
342wx/tarstrm.h
343wx/textbuf.h
344wx/textfile.h
345wx/thread.h
346wx/thrimpl.cpp
347wx/time.h
348wx/timer.h
349wx/tls.h
350wx/tokenzr.h
351wx/tracker.h
352wx/translation.h
353wx/txtstrm.h
354wx/typeinfo.h
355wx/types.h
356wx/unichar.h
357wx/uri.h
358wx/ustring.h
359wx/utils.h
360wx/variant.h
361wx/vector.h
362wx/version.h
363wx/versioninfo.h
364wx/volume.h
365wx/weakref.h
366wx/wfstream.h
367wx/wx.h
368wx/wxchar.h
369wx/wxcrt.h
370wx/wxcrtbase.h
371wx/wxcrtvararg.h
372wx/wxprec.h
373wx/xlocale.h
374wx/xti.h
375wx/xti2.h
376wx/xtistrm.h
377wx/xtictor.h
378wx/xtihandler.h
379wx/xtiprop.h
380wx/xtitypes.h
381wx/zipstrm.h
382wx/zstream.h
383wx/meta/convertible.h
384wx/meta/if.h
385wx/meta/implicitconversion.h
386wx/meta/int2type.h
387wx/meta/movable.h
388wx/meta/pod.h
389wx/meta/removeref.h
390wx/fswatcher.h
391wx/generic/fswatcher.h
392wx/unix/app.h
393wx/unix/apptbase.h
394wx/unix/apptrait.h
395wx/unix/chkconf.h
396wx/unix/evtloop.h
397wx/unix/evtloopsrc.h
398wx/unix/pipe.h
399wx/unix/stdpaths.h
400wx/unix/stackwalk.h
401wx/unix/tls.h
402wx/unix/fswatcher_kqueue.h
403wx/unix/execute.h
404wx/unix/mimetype.h
405wx/unix/fswatcher_inotify.h
406wx/fs_inet.h
407wx/protocol/file.h
408wx/protocol/ftp.h
409wx/protocol/http.h
410wx/protocol/log.h
411wx/protocol/protocol.h
412wx/sckaddr.h
413wx/sckipc.h
414wx/sckstrm.h
415wx/socket.h
416wx/url.h
417wx/xml/xml.h
418wx/xtixml.h
419EOF
420# --- wxBase headers list ends here ---
421
422# --- wxBase headers list with paths ---
423sed -e 's@^@%{_includedir}/wx-%{ver2}/@' wxbase-headers.files > wxbase-headers.paths
424
425
426# temporarily remove base headers
427mkdir $RPM_BUILD_ROOT/_save_dir
428cp -r $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT/_save_dir
429for f in `cat wxbase-headers.files` ; do
430 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
431done
432# list of all core headers:
433find $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
435cp -f -r $RPM_BUILD_ROOT/_save_dir/* $RPM_BUILD_ROOT%{_includedir}
436rm -rf $RPM_BUILD_ROOT/_save_dir
437
438# utils:
439(cd obj-shared/utils/wxrc; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
440
441# wx-config link is created during package installation, remove it for now
442rm -f $RPM_BUILD_ROOT%{_bindir}/wx-config
443
444%clean
445rm -rf $RPM_BUILD_ROOT
446
447%post
448/sbin/ldconfig
449
450%postun
451/sbin/ldconfig
452
453%post devel
454# link wx-config when you install RPM.
455%if %{unicode}
456 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
457%endif
458# link wx-config with explicit name.
459ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
460/sbin/ldconfig
461
462%postun devel
463/sbin/ldconfig
464
465%preun devel
466%if %{unicode}
467 rm -f %{_bindir}/wx-config
468%endif
469rm -f %{_bindir}/%{wxconfiglink}
470
471%post -n %{wxbasename}
472/sbin/ldconfig
473
474%postun -n %{wxbasename}
475/sbin/ldconfig
476
477%post -n %{wxbasename}-devel
478# link wx-config with explicit name.
479ln -sf %{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
480/sbin/ldconfig
481
482%postun -n %{wxbasename}-devel
483/sbin/ldconfig
484
485%preun -n %{wxbasename}-devel
486rm -f %{_bindir}/%{wxbaseconfiglink}
487
488%post -n %{glname}
489/sbin/ldconfig
490
491%postun -n %{glname}
492/sbin/ldconfig
493
494%files
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.*
503%endif
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.*
510
511%files -n wx-i18n
512%defattr(-,root,root)
513%{_datadir}/locale/*/LC_MESSAGES/*.mo
514
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
528# shared libs
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
536%endif
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
543# static libs
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
551%endif
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
558%dir %{_libdir}/wx
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
569%{_bindir}/wxrc*
570
571%files -n %{wxbasename}
572%defattr(-,root,root)
573%{_libdir}/libwx_base*-%{ver2}.so.*
574
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
588%if %{unicode}
589 %{_libdir}/libwxregexu-%{ver2}.a
590%endif
591%{_libdir}/libwxscintilla-%{ver2}.a
592%dir %{_libdir}/wx
593%dir %{_datadir}/bakefile
594%dir %{_datadir}/bakefile/presets
595%{_datadir}/aclocal/*.m4
596%{_datadir}/bakefile/presets/*
597
598%files -n %{glname}
599%defattr(-,root,root)
600%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.*