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