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