]> git.saurik.com Git - wxWidgets.git/blame - wxGTK.spec
Adding theme drawing for list header under 10.3
[wxWidgets.git] / wxGTK.spec
CommitLineData
e5ea3f7a 1%define pref /usr
4e4cea52 2%define ver 2.5.4
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
107d0fd4 235wx/stackwalk.h
dd65d8c8 236wx/stdpaths.h
ef335a4f 237wx/stockitem.h
d10382ab
VS
238wx/stopwatch.h
239wx/strconv.h
240wx/stream.h
241wx/string.h
242wx/sysopt.h
243wx/textbuf.h
244wx/textfile.h
245wx/thread.h
246wx/thrimpl.cpp
247wx/timer.h
248wx/tokenzr.h
249wx/txtstrm.h
250wx/types.h
dd65d8c8 251wx/uri.h
d10382ab
VS
252wx/utils.h
253wx/variant.h
254wx/vector.h
255wx/version.h
256wx/volume.h
257wx/wfstream.h
258wx/wx.h
259wx/wxchar.h
260wx/wxprec.h
261wx/xti.h
262wx/xtistrm.h
263wx/zipstrm.h
264wx/zstream.h
265wx/msw/apptrait.h
266wx/msw/apptbase.h
267wx/msw/chkconf.h
268wx/msw/crashrpt.h
269wx/msw/dde.h
107d0fd4 270wx/msw/debughlp.h
d10382ab
VS
271wx/msw/gccpriv.h
272wx/msw/mimetype.h
107d0fd4 273wx/msw/stackwalk.h
d10382ab
VS
274wx/msw/winundef.h
275wx/msw/wrapcctl.h
276wx/msw/wrapwin.h
277wx/fs_inet.h
278wx/gsocket.h
279wx/protocol/file.h
280wx/protocol/ftp.h
281wx/protocol/http.h
282wx/protocol/protocol.h
283wx/sckaddr.h
284wx/sckipc.h
285wx/sckstrm.h
286wx/socket.h
287wx/url.h
288wx/msw/gsockmsw.h
289wx/xml/xml.h
290wx/xtixml.h
291wx/db.h
292wx/dbkeyg.h
293wx/dbtable.h
294EOF
295# --- wxBase headers list ends here ---
296for f in `cat wxbase-headers-list` ; do
68b47b2f 297 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
4eba1840 298done
4eba1840
VS
299
300# list of all core headers:
301find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
302
303# contrib stuff:
304(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
305(cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
acea2a0b 306
88e3652f
VS
307# remove wxBase files so that RPM doesn't complain about unpackaged files:
308rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
309rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
310rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
311
c16d2763
VS
312%clean
313rm -rf $RPM_BUILD_ROOT
314
f14a5b55
RR
315%post
316/sbin/ldconfig
317
318%postun
319/sbin/ldconfig
320
81edbb3f
VS
321%post gl
322/sbin/ldconfig
323
324%postun gl
325/sbin/ldconfig
326
81edbb3f 327
4eba1840 328%files
81edbb3f
VS
329%defattr(-,root,root)
330%doc COPYING.LIB *.txt
331%dir %{_datadir}/wx
332%{_datadir}/wx/*
4eba1840
VS
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
641d87d8 339
4eba1840 340%files devel -f core-headers.files
0f7deca9 341%defattr(-,root,root)
4eba1840
VS
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
81edbb3f
VS
349%dir %{_libdir}/wx
350%{_libdir}/wx/*
4eba1840 351%{_bindir}/%{wxconfigname}
2a29700e 352
c661ecca 353%files gl
81edbb3f 354%defattr(-,root,root)
4eba1840 355%{_libdir}/libwx_%{portname}*_gl*.so.*
0f7deca9 356
5dcf9614
VS
357%files static
358%defattr (-,root,root)
4eba1840
VS
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.*
4eba1840 368%{_libdir}/libwx_%{portname}*_ogl*.so.*
4eba1840
VS
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
68b47b2f
VS
377%dir %{_includedir}/wx-*/wx/animate
378%{_includedir}/wx-*/wx/animate/*
4eba1840
VS
379%{_libdir}/libwx_%{portname}*_animate*.so
380
68b47b2f
VS
381%dir %{_includedir}/wx-*/wx/deprecated
382%{_includedir}/wx-*/wx/deprecated/*
4eba1840
VS
383%{_libdir}/libwx_%{portname}*_deprecated*.so
384
68b47b2f
VS
385%dir %{_includedir}/wx-*/wx/fl
386%{_includedir}/wx-*/wx/fl/*
4eba1840
VS
387%{_libdir}/libwx_%{portname}*_fl*.so
388
68b47b2f
VS
389%dir %{_includedir}/wx-*/wx/gizmos
390%{_includedir}/wx-*/wx/gizmos/*
4eba1840
VS
391%{_libdir}/libwx_%{portname}*_gizmos*.so
392
68b47b2f
VS
393%dir %{_includedir}/wx-*/wx/mmedia
394%{_includedir}/wx-*/wx/mmedia/*
4eba1840
VS
395%{_libdir}/libwx_%{portname}*_mmedia*.so
396
68b47b2f
VS
397%dir %{_includedir}/wx-*/wx/ogl
398%{_includedir}/wx-*/wx/ogl/*
4eba1840 399%{_libdir}/libwx_%{portname}*_ogl*.so
4eba1840 400
68b47b2f
VS
401%dir %{_includedir}/wx-*/wx/plot
402%{_includedir}/wx-*/wx/plot/*
4eba1840
VS
403%{_libdir}/libwx_%{portname}*_plot*.so
404
68b47b2f
VS
405%dir %{_includedir}/wx-*/wx/stc
406%{_includedir}/wx-*/wx/stc/*
4eba1840
VS
407%{_libdir}/libwx_%{portname}*_stc*.so
408
68b47b2f
VS
409%dir %{_includedir}/wx-*/wx/svg
410%{_includedir}/wx-*/wx/svg/*
4eba1840
VS
411%{_libdir}/libwx_%{portname}*_svg*.so
412
68b47b2f
VS
413%dir %{_includedir}/wx-*/wx/xrc
414%{_includedir}/wx-*/wx/xrc/*
4eba1840 415%{_libdir}/libwx_%{portname}*_xrc*.so