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