]> git.saurik.com Git - wxWidgets.git/blame - wxGTK.spec
fix hiding the other (mac) one
[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
164wx/arrimpl.cpp
165wx/arrstr.h
166wx/beforestd.h
167wx/buffer.h
168wx/build.h
169wx/chkconf.h
82b0b7f6 170wx/clntdata.h
d10382ab
VS
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
20b35a69 182wx/dlimpexp.h
d10382ab
VS
183wx/dynarray.h
184wx/dynlib.h
185wx/dynload.h
186wx/encconv.h
187wx/event.h
671a85ea 188wx/except.h
d10382ab
VS
189wx/features.h
190wx/ffile.h
191wx/file.h
192wx/fileconf.h
193wx/filefn.h
194wx/filename.h
195wx/filesys.h
196wx/fontenc.h
197wx/fontmap.h
198wx/fs_mem.h
199wx/fs_zip.h
200wx/hash.h
201wx/hashmap.h
202wx/hashset.h
203wx/iconloc.h
204wx/init.h
205wx/intl.h
206wx/iosfwrap.h
207wx/ioswrap.h
208wx/ipc.h
209wx/ipcbase.h
210wx/isql.h
211wx/isqlext.h
212wx/list.h
213wx/listimpl.cpp
214wx/log.h
215wx/longlong.h
216wx/math.h
217wx/memconf.h
218wx/memory.h
219wx/memtext.h
220wx/mimetype.h
221wx/module.h
222wx/msgout.h
223wx/msgout.h
224wx/mstream.h
225wx/object.h
226wx/platform.h
227wx/process.h
228wx/ptr_scpd.h
229wx/regex.h
230wx/scopeguard.h
231wx/snglinst.h
c33fae85 232wx/sstream.h
b71531ad 233wx/stack.h
dd65d8c8 234wx/stdpaths.h
ef335a4f 235wx/stockitem.h
d10382ab
VS
236wx/stopwatch.h
237wx/strconv.h
238wx/stream.h
239wx/string.h
240wx/sysopt.h
241wx/textbuf.h
242wx/textfile.h
243wx/thread.h
244wx/thrimpl.cpp
245wx/timer.h
246wx/tokenzr.h
247wx/txtstrm.h
248wx/types.h
dd65d8c8 249wx/uri.h
d10382ab
VS
250wx/utils.h
251wx/variant.h
252wx/vector.h
253wx/version.h
254wx/volume.h
255wx/wfstream.h
256wx/wx.h
257wx/wxchar.h
258wx/wxprec.h
259wx/xti.h
260wx/xtistrm.h
261wx/zipstrm.h
262wx/zstream.h
263wx/msw/apptrait.h
264wx/msw/apptbase.h
265wx/msw/chkconf.h
266wx/msw/crashrpt.h
267wx/msw/dde.h
268wx/msw/gccpriv.h
269wx/msw/mimetype.h
270wx/msw/winundef.h
271wx/msw/wrapcctl.h
272wx/msw/wrapwin.h
273wx/fs_inet.h
274wx/gsocket.h
275wx/protocol/file.h
276wx/protocol/ftp.h
277wx/protocol/http.h
278wx/protocol/protocol.h
279wx/sckaddr.h
280wx/sckipc.h
281wx/sckstrm.h
282wx/socket.h
283wx/url.h
284wx/msw/gsockmsw.h
285wx/xml/xml.h
286wx/xtixml.h
287wx/db.h
288wx/dbkeyg.h
289wx/dbtable.h
290EOF
291# --- wxBase headers list ends here ---
292for f in `cat wxbase-headers-list` ; do
68b47b2f 293 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
4eba1840 294done
4eba1840
VS
295
296# list of all core headers:
297find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
298
299# contrib stuff:
300(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
301(cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
acea2a0b 302
88e3652f
VS
303# remove wxBase files so that RPM doesn't complain about unpackaged files:
304rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
305rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
306rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
307
c16d2763
VS
308%clean
309rm -rf $RPM_BUILD_ROOT
310
f14a5b55
RR
311%post
312/sbin/ldconfig
313
314%postun
315/sbin/ldconfig
316
81edbb3f
VS
317%post gl
318/sbin/ldconfig
319
320%postun gl
321/sbin/ldconfig
322
81edbb3f 323
4eba1840 324%files
81edbb3f
VS
325%defattr(-,root,root)
326%doc COPYING.LIB *.txt
327%dir %{_datadir}/wx
328%{_datadir}/wx/*
4eba1840
VS
329%{_libdir}/libwx_%{portname}*_core*.so.*
330%{_libdir}/libwx_%{portname}*_html*.so.*
331%{_libdir}/libwx_%{portname}*_adv*.so.*
332%if !%{unicode}
333%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
334%endif
641d87d8 335
4eba1840 336%files devel -f core-headers.files
0f7deca9 337%defattr(-,root,root)
4eba1840
VS
338%{_libdir}/libwx_%{portname}*_core*.so
339%{_libdir}/libwx_%{portname}*_html*.so
340%{_libdir}/libwx_%{portname}*_adv*.so
341%if !%{unicode}
342%{_libdir}/libwx_%{portname}*_dbgrid*.so
343%endif
344%{_libdir}/libwx_%{portname}*_gl*.so
81edbb3f
VS
345%dir %{_libdir}/wx
346%{_libdir}/wx/*
4eba1840 347%{_bindir}/%{wxconfigname}
2a29700e 348
c661ecca 349%files gl
81edbb3f 350%defattr(-,root,root)
4eba1840 351%{_libdir}/libwx_%{portname}*_gl*.so.*
0f7deca9 352
5dcf9614
VS
353%files static
354%defattr (-,root,root)
4eba1840
VS
355%{_libdir}/libwx_gtk*.a
356
357%files contrib
358%defattr(-,root,root)
359%{_libdir}/libwx_%{portname}*_animate*.so.*
360%{_libdir}/libwx_%{portname}*_deprecated*.so.*
361%{_libdir}/libwx_%{portname}*_fl*.so.*
362%{_libdir}/libwx_%{portname}*_gizmos*.so.*
363%{_libdir}/libwx_%{portname}*_mmedia*.so.*
4eba1840 364%{_libdir}/libwx_%{portname}*_ogl*.so.*
4eba1840
VS
365%{_libdir}/libwx_%{portname}*_plot*.so.*
366%{_libdir}/libwx_%{portname}*_stc*.so.*
367%{_libdir}/libwx_%{portname}*_svg*.so.*
368%{_libdir}/libwx_%{portname}*_xrc*.so.*
369
370%files contrib-devel
371%defattr(-,root,root)
372%{_bindir}/wxrc
68b47b2f
VS
373%dir %{_includedir}/wx-*/wx/animate
374%{_includedir}/wx-*/wx/animate/*
4eba1840
VS
375%{_libdir}/libwx_%{portname}*_animate*.so
376
68b47b2f
VS
377%dir %{_includedir}/wx-*/wx/deprecated
378%{_includedir}/wx-*/wx/deprecated/*
4eba1840
VS
379%{_libdir}/libwx_%{portname}*_deprecated*.so
380
68b47b2f
VS
381%dir %{_includedir}/wx-*/wx/fl
382%{_includedir}/wx-*/wx/fl/*
4eba1840
VS
383%{_libdir}/libwx_%{portname}*_fl*.so
384
68b47b2f
VS
385%dir %{_includedir}/wx-*/wx/gizmos
386%{_includedir}/wx-*/wx/gizmos/*
4eba1840
VS
387%{_libdir}/libwx_%{portname}*_gizmos*.so
388
68b47b2f
VS
389%dir %{_includedir}/wx-*/wx/mmedia
390%{_includedir}/wx-*/wx/mmedia/*
4eba1840
VS
391%{_libdir}/libwx_%{portname}*_mmedia*.so
392
68b47b2f
VS
393%dir %{_includedir}/wx-*/wx/ogl
394%{_includedir}/wx-*/wx/ogl/*
4eba1840 395%{_libdir}/libwx_%{portname}*_ogl*.so
4eba1840 396
68b47b2f
VS
397%dir %{_includedir}/wx-*/wx/plot
398%{_includedir}/wx-*/wx/plot/*
4eba1840
VS
399%{_libdir}/libwx_%{portname}*_plot*.so
400
68b47b2f
VS
401%dir %{_includedir}/wx-*/wx/stc
402%{_includedir}/wx-*/wx/stc/*
4eba1840
VS
403%{_libdir}/libwx_%{portname}*_stc*.so
404
68b47b2f
VS
405%dir %{_includedir}/wx-*/wx/svg
406%{_includedir}/wx-*/wx/svg/*
4eba1840
VS
407%{_libdir}/libwx_%{portname}*_svg*.so
408
68b47b2f
VS
409%dir %{_includedir}/wx-*/wx/xrc
410%{_includedir}/wx-*/wx/xrc/*
4eba1840 411%{_libdir}/libwx_%{portname}*_xrc*.so