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