]> git.saurik.com Git - wxWidgets.git/blame - wxX11.spec
Applied patch [ 791573 ] New feature for FL toorbar buttons
[wxWidgets.git] / wxX11.spec
CommitLineData
c5cf1acc 1%define pref /usr
93f467a3 2%define ver 2.5.1
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
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
20b35a69 163wx/dlimpexp.h
d10382ab
VS
164wx/dynarray.h
165wx/dynlib.h
166wx/dynload.h
167wx/encconv.h
168wx/event.h
671a85ea 169wx/except.h
d10382ab
VS
170wx/features.h
171wx/ffile.h
172wx/file.h
173wx/fileconf.h
174wx/filefn.h
175wx/filename.h
176wx/filesys.h
177wx/fontenc.h
178wx/fontmap.h
179wx/fs_mem.h
180wx/fs_zip.h
b71531ad 181wx/gzstream.h
d10382ab
VS
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
b71531ad 214wx/stack.h
d10382ab
VS
215wx/stopwatch.h
216wx/strconv.h
217wx/stream.h
218wx/string.h
219wx/sysopt.h
220wx/textbuf.h
221wx/textfile.h
222wx/thread.h
223wx/thrimpl.cpp
224wx/timer.h
225wx/tokenzr.h
226wx/txtstrm.h
227wx/types.h
228wx/utils.h
229wx/variant.h
230wx/vector.h
231wx/version.h
232wx/volume.h
233wx/wfstream.h
234wx/wx.h
235wx/wxchar.h
236wx/wxprec.h
237wx/xti.h
238wx/xtistrm.h
239wx/zipstrm.h
240wx/zstream.h
241wx/msw/apptrait.h
242wx/msw/apptbase.h
243wx/msw/chkconf.h
244wx/msw/crashrpt.h
245wx/msw/dde.h
246wx/msw/gccpriv.h
247wx/msw/mimetype.h
248wx/msw/winundef.h
249wx/msw/wrapcctl.h
250wx/msw/wrapwin.h
251wx/fs_inet.h
252wx/gsocket.h
253wx/protocol/file.h
254wx/protocol/ftp.h
255wx/protocol/http.h
256wx/protocol/protocol.h
257wx/sckaddr.h
258wx/sckipc.h
259wx/sckstrm.h
260wx/socket.h
261wx/url.h
262wx/msw/gsockmsw.h
263wx/xml/xml.h
264wx/xtixml.h
265wx/db.h
266wx/dbkeyg.h
267wx/dbtable.h
268EOF
269# --- wxBase headers list ends here ---
270for f in `cat wxbase-headers-list` ; do
271 rm -f $RPM_BUILD_ROOT%{_includedir}/$f
4eba1840 272done
4eba1840
VS
273
274# list of all core headers:
275find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
276
277# contrib stuff:
278(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
279(cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
c5cf1acc 280
88e3652f
VS
281# remove wxBase files so that RPM doesn't complain about unpackaged files:
282rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
283rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
284rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
285
c5cf1acc
RR
286%clean
287rm -rf $RPM_BUILD_ROOT
288
289%post
290/sbin/ldconfig
291
292%postun
293/sbin/ldconfig
294
295%post gl
296/sbin/ldconfig
297
298%postun gl
299/sbin/ldconfig
300
301%post devel
302# Install wx-config if there isn't any
303if test ! -f %{_bindir}/wx-config ; then
4eba1840 304 ln -sf %{wxconfigname} %{_bindir}/wx-config
c5cf1acc
RR
305fi
306
307%preun devel
308# Remove wx-config if it points to this package
309if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
4eba1840 310 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
c5cf1acc
RR
311 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
312 if test "x$SUM1" = "x$SUM2" ; then
313 rm -f %{_bindir}/wx-config
314 fi
315fi
316
317
4eba1840 318%files
c5cf1acc
RR
319%defattr(-,root,root)
320%doc COPYING.LIB *.txt
321%dir %{_datadir}/wx
322%{_datadir}/wx/*
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
c5cf1acc 329
4eba1840 330%files devel -f core-headers.files
c5cf1acc 331%defattr(-,root,root)
4eba1840
VS
332%{_libdir}/libwx_%{portname}*_core*.so
333%{_libdir}/libwx_%{portname}*_html*.so
334%{_libdir}/libwx_%{portname}*_adv*.so
335%if !%{unicode}
336%{_libdir}/libwx_%{portname}*_dbgrid*.so
337%endif
338%{_libdir}/libwx_%{portname}*_gl*.so
c5cf1acc
RR
339%dir %{_libdir}/wx
340%{_libdir}/wx/*
4eba1840 341%{_bindir}/%{wxconfigname}
c5cf1acc
RR
342
343%files gl
344%defattr(-,root,root)
4eba1840 345%{_libdir}/libwx_%{portname}*_gl*.so.*
c5cf1acc
RR
346
347%files static
348%defattr (-,root,root)
4eba1840
VS
349%{_libdir}/libwx_%{portname}*.a
350
351%files contrib
352%defattr(-,root,root)
353%{_libdir}/libwx_%{portname}*_animate*.so.*
354%{_libdir}/libwx_%{portname}*_deprecated*.so.*
355%{_libdir}/libwx_%{portname}*_fl*.so.*
356%{_libdir}/libwx_%{portname}*_gizmos*.so.*
357%{_libdir}/libwx_%{portname}*_mmedia*.so.*
4eba1840 358%{_libdir}/libwx_%{portname}*_ogl*.so.*
4eba1840
VS
359%{_libdir}/libwx_%{portname}*_plot*.so.*
360%{_libdir}/libwx_%{portname}*_stc*.so.*
361%{_libdir}/libwx_%{portname}*_svg*.so.*
362%{_libdir}/libwx_%{portname}*_xrc*.so.*
363
364%files contrib-devel
365%defattr(-,root,root)
366%{_bindir}/wxrc
367%dir %{_includedir}/wx/animate
368%{_includedir}/wx/animate/*
369%{_libdir}/libwx_%{portname}*_animate*.so
370
371%dir %{_includedir}/wx/deprecated
372%{_includedir}/wx/deprecated/*
373%{_libdir}/libwx_%{portname}*_deprecated*.so
374
375%dir %{_includedir}/wx/fl
376%{_includedir}/wx/fl/*
377%{_libdir}/libwx_%{portname}*_fl*.so
378
379%dir %{_includedir}/wx/gizmos
380%{_includedir}/wx/gizmos/*
381%{_libdir}/libwx_%{portname}*_gizmos*.so
382
383%dir %{_includedir}/wx/mmedia
384%{_includedir}/wx/mmedia/*
385%{_libdir}/libwx_%{portname}*_mmedia*.so
386
4eba1840
VS
387%dir %{_includedir}/wx/ogl
388%{_includedir}/wx/ogl/*
389%{_libdir}/libwx_%{portname}*_ogl*.so
4eba1840
VS
390
391%dir %{_includedir}/wx/plot
392%{_includedir}/wx/plot/*
393%{_libdir}/libwx_%{portname}*_plot*.so
394
395%dir %{_includedir}/wx/stc
396%{_includedir}/wx/stc/*
397%{_libdir}/libwx_%{portname}*_stc*.so
398
399%dir %{_includedir}/wx/svg
400%{_includedir}/wx/svg/*
401%{_libdir}/libwx_%{portname}*_svg*.so
402
403%dir %{_includedir}/wx/xrc
404%{_includedir}/wx/xrc/*
405%{_libdir}/libwx_%{portname}*_xrc*.so