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