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