]> git.saurik.com Git - wxWidgets.git/blame - wxGTK.spec
Corrected wxComboBox::GetValue() after a
[wxWidgets.git] / wxGTK.spec
CommitLineData
e5ea3f7a 1%define pref /usr
927330ab 2%define ver 2.5.3
c31752da 3%define ver2 2.5
acea2a0b 4%define rel 1
e5ea3f7a 5
4eba1840
VS
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
e5ea3f7a
RR
39Version: %{ver}
40Release: %{rel}
4eba1840 41License: wxWindows Licence
f14a5b55 42Group: X11/Libraries
b5fa0a3e
VZ
43Source: wxGTK-%{ver}.tar.bz2
44URL: http://www.wxwindows.org
31fe72b6
VZ
45Packager: Vadim Zeitlin <vadim@wxwindows.org>
46Prefix: %{pref}
47BuildRoot: /var/tmp/%{name}-root
f14a5b55 48
212d0bb3
VZ
49# all packages providing an implementation of wxWindows library (regardless of
50# the toolkit used) should provide the (virtual) wxwin package, this makes it
6e711d5c 51# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
212d0bb3 52Provides: wxwin
4eba1840 53Provides: wxGTK
212d0bb3 54
31fe72b6
VZ
55# in addition, we should provide libwx_gtk as automatic generator only notices
56# libwx_gtk-%{ver}-%{rel}
57Provides: libwx_gtk.so
8c8fb2f6 58Provides: libwx_gtk-%{ver2}.so
31fe72b6 59
4eba1840 60Requires: %{wxbasename} = %{ver}
4eba1840 61
f14a5b55 62%description
212d0bb3
VZ
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.
f14a5b55 66
641d87d8 67%package devel
4eba1840 68Summary: The GTK+ %{gtkver} port of the wxWindows library
641d87d8 69Group: X11/Libraries
4eba1840
VS
70Requires: %{name} = %{ver}
71Requires: %{wxbasename}-devel = %{ver}
72Provides: wxGTK-devel
641d87d8
RR
73
74%description devel
4eba1840 75Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
c661ecca
RR
76
77%package gl
4eba1840 78Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on.
c661ecca 79Group: X11/Libraries
4eba1840 80Requires: %{name} = %{ver}
c661ecca
RR
81
82%description gl
4eba1840 83OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
5dcf9614
VS
84
85%package static
86Summary: wxGTK static libraries
87Group: Development/Libraries
4eba1840 88Requires: %{wxbasename}-static
5dcf9614
VS
89
90%description static
91Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
641d87d8 92
4eba1840
VS
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
f14a5b55 110%prep
4eba1840 111%setup -q -n wxGTK-%{ver}
f14a5b55
RR
112
113%build
103aab26
RR
114if [ "$SMP" != "" ]; then
115 export MAKE="make -j$SMP"
116else
117 export MAKE="make"
118fi
5dcf9614 119
5dcf9614
VS
120mkdir obj-shared
121cd obj-shared
4eba1840
VS
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
5dcf9614 132$MAKE
4eba1840
VS
133cd contrib/src
134$MAKE
135cd ../../..
5dcf9614
VS
136
137mkdir obj-static
138cd obj-static
4eba1840
VS
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
103aab26 149$MAKE
5dcf9614 150cd ..
f14a5b55
RR
151
152%install
31fe72b6 153rm -rf $RPM_BUILD_ROOT
5dcf9614
VS
154(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
155(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
f14a5b55 156
4eba1840 157# Remove headers that are part of wx-base-devel:
d10382ab
VS
158
159# --- wxBase headers list begins here ---
160cat <<EOF >wxbase-headers-list
161wx/afterstd.h
162wx/app.h
163wx/apptrait.h
8329fea8 164wx/archive.h
d10382ab
VS
165wx/arrimpl.cpp
166wx/arrstr.h
167wx/beforestd.h
168wx/buffer.h
169wx/build.h
170wx/chkconf.h
82b0b7f6 171wx/clntdata.h
d10382ab
VS
172wx/cmdline.h
173wx/confbase.h
174wx/config.h
175wx/containr.h
176wx/datetime.h
177wx/datetime.inl
178wx/datstrm.h
179wx/dde.h
180wx/debug.h
181wx/defs.h
182wx/dir.h
20b35a69 183wx/dlimpexp.h
d10382ab
VS
184wx/dynarray.h
185wx/dynlib.h
186wx/dynload.h
187wx/encconv.h
188wx/event.h
671a85ea 189wx/except.h
d10382ab
VS
190wx/features.h
191wx/ffile.h
192wx/file.h
193wx/fileconf.h
194wx/filefn.h
195wx/filename.h
196wx/filesys.h
197wx/fontenc.h
198wx/fontmap.h
199wx/fs_mem.h
200wx/fs_zip.h
201wx/hash.h
202wx/hashmap.h
203wx/hashset.h
204wx/iconloc.h
205wx/init.h
206wx/intl.h
207wx/iosfwrap.h
208wx/ioswrap.h
209wx/ipc.h
210wx/ipcbase.h
211wx/isql.h
212wx/isqlext.h
213wx/list.h
214wx/listimpl.cpp
215wx/log.h
216wx/longlong.h
217wx/math.h
218wx/memconf.h
219wx/memory.h
220wx/memtext.h
221wx/mimetype.h
222wx/module.h
223wx/msgout.h
224wx/msgout.h
225wx/mstream.h
226wx/object.h
227wx/platform.h
228wx/process.h
229wx/ptr_scpd.h
230wx/regex.h
231wx/scopeguard.h
232wx/snglinst.h
c33fae85 233wx/sstream.h
b71531ad 234wx/stack.h
dd65d8c8 235wx/stdpaths.h
ef335a4f 236wx/stockitem.h
d10382ab
VS
237wx/stopwatch.h
238wx/strconv.h
239wx/stream.h
240wx/string.h
241wx/sysopt.h
242wx/textbuf.h
243wx/textfile.h
244wx/thread.h
245wx/thrimpl.cpp
246wx/timer.h
247wx/tokenzr.h
248wx/txtstrm.h
249wx/types.h
dd65d8c8 250wx/uri.h
d10382ab
VS
251wx/utils.h
252wx/variant.h
253wx/vector.h
254wx/version.h
255wx/volume.h
256wx/wfstream.h
257wx/wx.h
258wx/wxchar.h
259wx/wxprec.h
260wx/xti.h
261wx/xtistrm.h
262wx/zipstrm.h
263wx/zstream.h
264wx/msw/apptrait.h
265wx/msw/apptbase.h
266wx/msw/chkconf.h
267wx/msw/crashrpt.h
268wx/msw/dde.h
269wx/msw/gccpriv.h
270wx/msw/mimetype.h
271wx/msw/winundef.h
272wx/msw/wrapcctl.h
273wx/msw/wrapwin.h
274wx/fs_inet.h
275wx/gsocket.h
276wx/protocol/file.h
277wx/protocol/ftp.h
278wx/protocol/http.h
279wx/protocol/protocol.h
280wx/sckaddr.h
281wx/sckipc.h
282wx/sckstrm.h
283wx/socket.h
284wx/url.h
285wx/msw/gsockmsw.h
286wx/xml/xml.h
287wx/xtixml.h
288wx/db.h
289wx/dbkeyg.h
290wx/dbtable.h
291EOF
292# --- wxBase headers list ends here ---
293for f in `cat wxbase-headers-list` ; do
68b47b2f 294 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
4eba1840 295done
4eba1840
VS
296
297# list of all core headers:
298find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
299
300# contrib stuff:
301(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
302(cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
acea2a0b 303
88e3652f
VS
304# remove wxBase files so that RPM doesn't complain about unpackaged files:
305rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
306rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
307rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
308
c16d2763
VS
309%clean
310rm -rf $RPM_BUILD_ROOT
311
f14a5b55
RR
312%post
313/sbin/ldconfig
314
315%postun
316/sbin/ldconfig
317
81edbb3f
VS
318%post gl
319/sbin/ldconfig
320
321%postun gl
322/sbin/ldconfig
323
81edbb3f 324
4eba1840 325%files
81edbb3f
VS
326%defattr(-,root,root)
327%doc COPYING.LIB *.txt
328%dir %{_datadir}/wx
329%{_datadir}/wx/*
4eba1840
VS
330%{_libdir}/libwx_%{portname}*_core*.so.*
331%{_libdir}/libwx_%{portname}*_html*.so.*
332%{_libdir}/libwx_%{portname}*_adv*.so.*
333%if !%{unicode}
334%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
335%endif
641d87d8 336
4eba1840 337%files devel -f core-headers.files
0f7deca9 338%defattr(-,root,root)
4eba1840
VS
339%{_libdir}/libwx_%{portname}*_core*.so
340%{_libdir}/libwx_%{portname}*_html*.so
341%{_libdir}/libwx_%{portname}*_adv*.so
342%if !%{unicode}
343%{_libdir}/libwx_%{portname}*_dbgrid*.so
344%endif
345%{_libdir}/libwx_%{portname}*_gl*.so
81edbb3f
VS
346%dir %{_libdir}/wx
347%{_libdir}/wx/*
4eba1840 348%{_bindir}/%{wxconfigname}
2a29700e 349
c661ecca 350%files gl
81edbb3f 351%defattr(-,root,root)
4eba1840 352%{_libdir}/libwx_%{portname}*_gl*.so.*
0f7deca9 353
5dcf9614
VS
354%files static
355%defattr (-,root,root)
4eba1840
VS
356%{_libdir}/libwx_gtk*.a
357
358%files contrib
359%defattr(-,root,root)
360%{_libdir}/libwx_%{portname}*_animate*.so.*
361%{_libdir}/libwx_%{portname}*_deprecated*.so.*
362%{_libdir}/libwx_%{portname}*_fl*.so.*
363%{_libdir}/libwx_%{portname}*_gizmos*.so.*
364%{_libdir}/libwx_%{portname}*_mmedia*.so.*
4eba1840 365%{_libdir}/libwx_%{portname}*_ogl*.so.*
4eba1840
VS
366%{_libdir}/libwx_%{portname}*_plot*.so.*
367%{_libdir}/libwx_%{portname}*_stc*.so.*
368%{_libdir}/libwx_%{portname}*_svg*.so.*
369%{_libdir}/libwx_%{portname}*_xrc*.so.*
370
371%files contrib-devel
372%defattr(-,root,root)
373%{_bindir}/wxrc
68b47b2f
VS
374%dir %{_includedir}/wx-*/wx/animate
375%{_includedir}/wx-*/wx/animate/*
4eba1840
VS
376%{_libdir}/libwx_%{portname}*_animate*.so
377
68b47b2f
VS
378%dir %{_includedir}/wx-*/wx/deprecated
379%{_includedir}/wx-*/wx/deprecated/*
4eba1840
VS
380%{_libdir}/libwx_%{portname}*_deprecated*.so
381
68b47b2f
VS
382%dir %{_includedir}/wx-*/wx/fl
383%{_includedir}/wx-*/wx/fl/*
4eba1840
VS
384%{_libdir}/libwx_%{portname}*_fl*.so
385
68b47b2f
VS
386%dir %{_includedir}/wx-*/wx/gizmos
387%{_includedir}/wx-*/wx/gizmos/*
4eba1840
VS
388%{_libdir}/libwx_%{portname}*_gizmos*.so
389
68b47b2f
VS
390%dir %{_includedir}/wx-*/wx/mmedia
391%{_includedir}/wx-*/wx/mmedia/*
4eba1840
VS
392%{_libdir}/libwx_%{portname}*_mmedia*.so
393
68b47b2f
VS
394%dir %{_includedir}/wx-*/wx/ogl
395%{_includedir}/wx-*/wx/ogl/*
4eba1840 396%{_libdir}/libwx_%{portname}*_ogl*.so
4eba1840 397
68b47b2f
VS
398%dir %{_includedir}/wx-*/wx/plot
399%{_includedir}/wx-*/wx/plot/*
4eba1840
VS
400%{_libdir}/libwx_%{portname}*_plot*.so
401
68b47b2f
VS
402%dir %{_includedir}/wx-*/wx/stc
403%{_includedir}/wx-*/wx/stc/*
4eba1840
VS
404%{_libdir}/libwx_%{portname}*_stc*.so
405
68b47b2f
VS
406%dir %{_includedir}/wx-*/wx/svg
407%{_includedir}/wx-*/wx/svg/*
4eba1840
VS
408%{_libdir}/libwx_%{portname}*_svg*.so
409
68b47b2f
VS
410%dir %{_includedir}/wx-*/wx/xrc
411%{_includedir}/wx-*/wx/xrc/*
4eba1840 412%{_libdir}/libwx_%{portname}*_xrc*.so