]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxGTK.spec
added a test for/example of assert dialog box
[wxWidgets.git] / wxGTK.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.5.4
3%define ver2 2.5
4%define rel 1
5
6# Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
7%define unicode 0
8%{?_with_unicode: %{expand: %%define unicode 1}}
9%{?_without_unicode: %{expand: %%define unicode 0}}
10
11%define gtk2 1
12%{?_with_gtk2: %{expand: %%define gtk2 1}}
13%{?_without_gtk2: %{expand: %%define gtk2 0}}
14
15%if %{gtk2}
16%define gtkver 2
17%define portname gtk2
18%else
19%define gtkver 1.2
20%define portname gtk
21%endif
22
23%if %{unicode}
24%define name wx-%{portname}-unicode
25%define wxbasename wx-base-unicode
26%else
27%define name wx-%{portname}
28%define wxbasename wx-base
29%endif
30
31%if %{unicode}
32%define wxconfigname %{portname}-unicode-release-%{ver2}
33%define wxconfiglinkname wx%{portname}u-%{ver2}-config
34%else
35%define wxconfigname %{portname}-ansi-release-%{ver2}
36%define wxconfiglinkname wx%{portname}-%{ver2}-config
37%endif
38
39Name: %{name}
40Summary: The GTK+ %{gtkver} port of the wxWindows library
41Version: %{ver}
42Release: %{rel}
43License: wxWindows Licence
44Group: X11/Libraries
45Source: wxGTK-%{ver}.tar.bz2
46URL: http://www.wxwindows.org
47Packager: Vadim Zeitlin <vadim@wxwindows.org>
48Prefix: %{pref}
49BuildRoot: /var/tmp/%{name}-root
50
51# all packages providing an implementation of wxWindows library (regardless of
52# the toolkit used) should provide the (virtual) wxwin package, this makes it
53# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
54Provides: wxwin
55Provides: wxGTK
56
57# in addition, we should provide libwx_gtk as automatic generator only notices
58# libwx_gtk-%{ver}-%{rel}
59Provides: libwx_gtk.so
60Provides: libwx_gtk-%{ver2}.so
61
62Requires: %{wxbasename} = %{ver}
63
64%description
65wxWindows is a free C++ library for cross-platform GUI development.
66With wxWindows, you can create applications for different GUIs (GTK+,
67Motif/LessTif, MS Windows, Mac) from the same source code.
68
69%package devel
70Summary: The GTK+ %{gtkver} port of the wxWindows library
71Group: X11/Libraries
72Requires: %{name} = %{ver}
73Requires: %{wxbasename}-devel = %{ver}
74Provides: wxGTK-devel
75
76%description devel
77Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
78
79%package gl
80Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on.
81Group: X11/Libraries
82Requires: %{name} = %{ver}
83
84%description gl
85OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
86
87%package static
88Summary: wxGTK static libraries
89Group: Development/Libraries
90Requires: %{wxbasename}-static
91
92%description static
93Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
94
95%package contrib
96Summary: The GTK+ %{gtkver} port of the wxWindows library, contributed libraries.
97Group: X11/Libraries
98Requires: %{name} = %{ver}
99
100%description contrib
101Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
102
103%package contrib-devel
104Summary: The GTK+ %{gtkver} port of the wxWindows library
105Group: X11/Libraries
106Requires: %{name}-contrib = %{ver}
107Requires: %{name}-devel = %{ver}
108
109%description contrib-devel
110Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
111
112%prep
113%setup -q -n wxGTK-%{ver}
114
115%build
116if [ "$SMP" != "" ]; then
117 export MAKE="make -j$SMP"
118else
119 export MAKE="make"
120fi
121
122mkdir obj-shared
123cd obj-shared
124../configure --prefix=%{pref} \
125%if %{unicode}
126 --enable-unicode \
127%else
128 --with-odbc \
129%endif
130%if ! %{gtk2}
131 --disable-gtk2 \
132%endif
133 --with-opengl
134$MAKE
135cd contrib/src
136$MAKE
137cd ../../..
138
139mkdir obj-static
140cd obj-static
141../configure --prefix=%{pref} --disable-shared \
142%if %{unicode}
143 --enable-unicode \
144%else
145 --with-odbc \
146%endif
147%if ! %{gtk2}
148 --disable-gtk2 \
149%endif
150 --with-opengl
151$MAKE
152cd ..
153
154%install
155rm -rf $RPM_BUILD_ROOT
156(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
157(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
158
159# Remove headers that are part of wx-base-devel:
160
161# --- wxBase headers list begins here ---
162cat <<EOF >wxbase-headers-list
163wx/afterstd.h
164wx/app.h
165wx/apptrait.h
166wx/archive.h
167wx/arrimpl.cpp
168wx/arrstr.h
169wx/beforestd.h
170wx/buffer.h
171wx/build.h
172wx/chkconf.h
173wx/clntdata.h
174wx/cmdline.h
175wx/confbase.h
176wx/config.h
177wx/containr.h
178wx/datetime.h
179wx/datetime.inl
180wx/datstrm.h
181wx/dde.h
182wx/debug.h
183wx/debugrpt.h
184wx/defs.h
185wx/dir.h
186wx/dlimpexp.h
187wx/dynarray.h
188wx/dynlib.h
189wx/dynload.h
190wx/encconv.h
191wx/event.h
192wx/except.h
193wx/features.h
194wx/ffile.h
195wx/file.h
196wx/fileconf.h
197wx/filefn.h
198wx/filename.h
199wx/filesys.h
200wx/fontenc.h
201wx/fontmap.h
202wx/fs_mem.h
203wx/fs_zip.h
204wx/hash.h
205wx/hashmap.h
206wx/hashset.h
207wx/html/forcelnk.h
208wx/iconloc.h
209wx/init.h
210wx/intl.h
211wx/iosfwrap.h
212wx/ioswrap.h
213wx/ipc.h
214wx/ipcbase.h
215wx/isql.h
216wx/isqlext.h
217wx/list.h
218wx/listimpl.cpp
219wx/log.h
220wx/longlong.h
221wx/math.h
222wx/memconf.h
223wx/memory.h
224wx/memtext.h
225wx/mimetype.h
226wx/module.h
227wx/msgout.h
228wx/msgout.h
229wx/mstream.h
230wx/object.h
231wx/platform.h
232wx/process.h
233wx/ptr_scpd.h
234wx/regex.h
235wx/scopeguard.h
236wx/snglinst.h
237wx/sstream.h
238wx/stack.h
239wx/stackwalk.h
240wx/stdpaths.h
241wx/stockitem.h
242wx/stopwatch.h
243wx/strconv.h
244wx/stream.h
245wx/string.h
246wx/sysopt.h
247wx/textbuf.h
248wx/textfile.h
249wx/thread.h
250wx/thrimpl.cpp
251wx/timer.h
252wx/tokenzr.h
253wx/txtstrm.h
254wx/types.h
255wx/uri.h
256wx/utils.h
257wx/variant.h
258wx/vector.h
259wx/version.h
260wx/volume.h
261wx/wfstream.h
262wx/wx.h
263wx/wxchar.h
264wx/wxprec.h
265wx/xti.h
266wx/xtistrm.h
267wx/zipstrm.h
268wx/zstream.h
269wx/msw/apptrait.h
270wx/msw/apptbase.h
271wx/msw/chkconf.h
272wx/msw/crashrpt.h
273wx/msw/dde.h
274wx/msw/debughlp.h
275wx/msw/gccpriv.h
276wx/msw/mimetype.h
277wx/msw/stackwalk.h
278wx/msw/winundef.h
279wx/msw/wrapcctl.h
280wx/msw/wrapwin.h
281wx/fs_inet.h
282wx/gsocket.h
283wx/protocol/file.h
284wx/protocol/ftp.h
285wx/protocol/http.h
286wx/protocol/protocol.h
287wx/sckaddr.h
288wx/sckipc.h
289wx/sckstrm.h
290wx/socket.h
291wx/url.h
292wx/msw/gsockmsw.h
293wx/xml/xml.h
294wx/xtixml.h
295wx/db.h
296wx/dbkeyg.h
297wx/dbtable.h
298EOF
299# --- wxBase headers list ends here ---
300for f in `cat wxbase-headers-list` ; do
301 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
302done
303
304# list of all core headers:
305find $RPM_BUILD_ROOT/usr/include/wx-* -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
306
307# contrib stuff:
308(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
309(cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
310
311# remove wxBase files so that RPM doesn't complain about unpackaged files:
312rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
313rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
314rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
315rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
316
317%clean
318rm -rf $RPM_BUILD_ROOT
319
320%post
321/sbin/ldconfig
322
323%postun
324/sbin/ldconfig
325
326%post gl
327/sbin/ldconfig
328
329%postun gl
330/sbin/ldconfig
331
332%post devel
333# link wx-config when you install RPM.
334ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/wx-config
335# link wx-config with explicit name.
336ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/%{wxconfiglinkname}
337
338%preun devel
339if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
340 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfigname} | cut -c 0-32`
341 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
342 if test "x$SUM1" = "x$SUM2" ; then
343 rm -f %{_bindir}/wx-config
344 fi
345fi
346
347rm -f %{_bindir}/%{wxconfiglinkname}
348
349%files
350%defattr(-,root,root)
351%doc COPYING.LIB *.txt
352%{_libdir}/libwx_%{portname}*_core*.so.*
353%{_libdir}/libwx_%{portname}*_html*.so.*
354%{_libdir}/libwx_%{portname}*_adv*.so.*
355%{_libdir}/libwx_%{portname}*_media*.so.*
356%if !%{unicode}
357%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
358%endif
359
360%files devel -f core-headers.files
361%defattr(-,root,root)
362%{_libdir}/libwx_%{portname}*_core*.so
363%{_libdir}/libwx_%{portname}*_html*.so
364%{_libdir}/libwx_%{portname}*_adv*.so
365%{_libdir}/libwx_%{portname}*_media*.so
366%if !%{unicode}
367%{_libdir}/libwx_%{portname}*_dbgrid*.so
368%endif
369%{_libdir}/libwx_%{portname}*_gl*.so
370%dir %{_libdir}/wx
371%{_libdir}/wx/*
372
373%files gl
374%defattr(-,root,root)
375%{_libdir}/libwx_%{portname}*_gl*.so.*
376
377%files static
378%defattr (-,root,root)
379%{_libdir}/libwx_gtk*.a
380
381%files contrib
382%defattr(-,root,root)
383%{_libdir}/libwx_%{portname}*_animate*.so.*
384%{_libdir}/libwx_%{portname}*_deprecated*.so.*
385%{_libdir}/libwx_%{portname}*_fl*.so.*
386%{_libdir}/libwx_%{portname}*_gizmos*.so.*
387%{_libdir}/libwx_%{portname}*_mmedia*.so.*
388%{_libdir}/libwx_%{portname}*_ogl*.so.*
389%{_libdir}/libwx_%{portname}*_plot*.so.*
390%{_libdir}/libwx_%{portname}*_stc*.so.*
391%{_libdir}/libwx_%{portname}*_svg*.so.*
392%{_libdir}/libwx_%{portname}*_xrc*.so.*
393
394%files contrib-devel
395%defattr(-,root,root)
396%{_bindir}/wxrc*
397%dir %{_includedir}/wx-*/wx/animate
398%{_includedir}/wx-*/wx/animate/*
399%{_libdir}/libwx_%{portname}*_animate*.so
400
401%dir %{_includedir}/wx-*/wx/deprecated
402%{_includedir}/wx-*/wx/deprecated/*
403%{_libdir}/libwx_%{portname}*_deprecated*.so
404
405%dir %{_includedir}/wx-*/wx/fl
406%{_includedir}/wx-*/wx/fl/*
407%{_libdir}/libwx_%{portname}*_fl*.so
408
409%dir %{_includedir}/wx-*/wx/gizmos
410%{_includedir}/wx-*/wx/gizmos/*
411%{_libdir}/libwx_%{portname}*_gizmos*.so
412
413%dir %{_includedir}/wx-*/wx/mmedia
414%{_includedir}/wx-*/wx/mmedia/*
415%{_libdir}/libwx_%{portname}*_mmedia*.so
416
417%dir %{_includedir}/wx-*/wx/ogl
418%{_includedir}/wx-*/wx/ogl/*
419%{_libdir}/libwx_%{portname}*_ogl*.so
420
421%dir %{_includedir}/wx-*/wx/plot
422%{_includedir}/wx-*/wx/plot/*
423%{_libdir}/libwx_%{portname}*_plot*.so
424
425%dir %{_includedir}/wx-*/wx/stc
426%{_includedir}/wx-*/wx/stc/*
427%{_libdir}/libwx_%{portname}*_stc*.so
428
429%dir %{_includedir}/wx-*/wx/svg
430%{_includedir}/wx-*/wx/svg/*
431%{_libdir}/libwx_%{portname}*_svg*.so
432
433%dir %{_includedir}/wx-*/wx/xrc
434%{_includedir}/wx-*/wx/xrc/*
435%{_libdir}/libwx_%{portname}*_xrc*.so