]> git.saurik.com Git - wxWidgets.git/blob - wxX11.spec
Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxNOT_FOUND/wxDefaultCoord, TRUE...
[wxWidgets.git] / wxX11.spec
1 %define pref /usr
2 %define ver 2.5.2
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/arrimpl.cpp
146 wx/arrstr.h
147 wx/beforestd.h
148 wx/buffer.h
149 wx/build.h
150 wx/chkconf.h
151 wx/clntdata.h
152 wx/cmdline.h
153 wx/confbase.h
154 wx/config.h
155 wx/containr.h
156 wx/datetime.h
157 wx/datetime.inl
158 wx/datstrm.h
159 wx/dde.h
160 wx/debug.h
161 wx/defs.h
162 wx/dir.h
163 wx/dlimpexp.h
164 wx/dynarray.h
165 wx/dynlib.h
166 wx/dynload.h
167 wx/encconv.h
168 wx/event.h
169 wx/except.h
170 wx/features.h
171 wx/ffile.h
172 wx/file.h
173 wx/fileconf.h
174 wx/filefn.h
175 wx/filename.h
176 wx/filesys.h
177 wx/fontenc.h
178 wx/fontmap.h
179 wx/fs_mem.h
180 wx/fs_zip.h
181 wx/hash.h
182 wx/hashmap.h
183 wx/hashset.h
184 wx/iconloc.h
185 wx/init.h
186 wx/intl.h
187 wx/iosfwrap.h
188 wx/ioswrap.h
189 wx/ipc.h
190 wx/ipcbase.h
191 wx/isql.h
192 wx/isqlext.h
193 wx/list.h
194 wx/listimpl.cpp
195 wx/log.h
196 wx/longlong.h
197 wx/math.h
198 wx/memconf.h
199 wx/memory.h
200 wx/memtext.h
201 wx/mimetype.h
202 wx/module.h
203 wx/msgout.h
204 wx/msgout.h
205 wx/mstream.h
206 wx/object.h
207 wx/platform.h
208 wx/process.h
209 wx/ptr_scpd.h
210 wx/regex.h
211 wx/scopeguard.h
212 wx/snglinst.h
213 wx/stack.h
214 wx/stockitem.h
215 wx/stopwatch.h
216 wx/strconv.h
217 wx/stream.h
218 wx/string.h
219 wx/sysopt.h
220 wx/textbuf.h
221 wx/textfile.h
222 wx/thread.h
223 wx/thrimpl.cpp
224 wx/timer.h
225 wx/tokenzr.h
226 wx/txtstrm.h
227 wx/types.h
228 wx/utils.h
229 wx/variant.h
230 wx/vector.h
231 wx/version.h
232 wx/volume.h
233 wx/wfstream.h
234 wx/wx.h
235 wx/wxchar.h
236 wx/wxprec.h
237 wx/xti.h
238 wx/xtistrm.h
239 wx/zipstrm.h
240 wx/zstream.h
241 wx/msw/apptrait.h
242 wx/msw/apptbase.h
243 wx/msw/chkconf.h
244 wx/msw/crashrpt.h
245 wx/msw/dde.h
246 wx/msw/gccpriv.h
247 wx/msw/mimetype.h
248 wx/msw/winundef.h
249 wx/msw/wrapcctl.h
250 wx/msw/wrapwin.h
251 wx/fs_inet.h
252 wx/gsocket.h
253 wx/protocol/file.h
254 wx/protocol/ftp.h
255 wx/protocol/http.h
256 wx/protocol/protocol.h
257 wx/sckaddr.h
258 wx/sckipc.h
259 wx/sckstrm.h
260 wx/socket.h
261 wx/url.h
262 wx/msw/gsockmsw.h
263 wx/xml/xml.h
264 wx/xtixml.h
265 wx/db.h
266 wx/dbkeyg.h
267 wx/dbtable.h
268 EOF
269 # --- wxBase headers list ends here ---
270 for f in `cat wxbase-headers-list` ; do
271 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
272 done
273
274 # list of all core headers:
275 find $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)
280
281 # remove wxBase files so that RPM doesn't complain about unpackaged files:
282 rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
283 rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
284 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
285
286 %clean
287 rm -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
302 %files
303 %defattr(-,root,root)
304 %doc COPYING.LIB *.txt
305 %dir %{_datadir}/wx
306 %{_datadir}/wx/*
307 %{_libdir}/libwx_%{portname}*_core*.so.*
308 %{_libdir}/libwx_%{portname}*_html*.so.*
309 %{_libdir}/libwx_%{portname}*_adv*.so.*
310 %if !%{unicode}
311 %{_libdir}/libwx_%{portname}*_dbgrid*.so.*
312 %endif
313
314 %files devel -f core-headers.files
315 %defattr(-,root,root)
316 %{_libdir}/libwx_%{portname}*_core*.so
317 %{_libdir}/libwx_%{portname}*_html*.so
318 %{_libdir}/libwx_%{portname}*_adv*.so
319 %if !%{unicode}
320 %{_libdir}/libwx_%{portname}*_dbgrid*.so
321 %endif
322 %{_libdir}/libwx_%{portname}*_gl*.so
323 %dir %{_libdir}/wx
324 %{_libdir}/wx/*
325 %{_bindir}/%{wxconfigname}
326
327 %files gl
328 %defattr(-,root,root)
329 %{_libdir}/libwx_%{portname}*_gl*.so.*
330
331 %files static
332 %defattr (-,root,root)
333 %{_libdir}/libwx_%{portname}*.a
334
335 %files contrib
336 %defattr(-,root,root)
337 %{_libdir}/libwx_%{portname}*_animate*.so.*
338 %{_libdir}/libwx_%{portname}*_deprecated*.so.*
339 %{_libdir}/libwx_%{portname}*_fl*.so.*
340 %{_libdir}/libwx_%{portname}*_gizmos*.so.*
341 %{_libdir}/libwx_%{portname}*_mmedia*.so.*
342 %{_libdir}/libwx_%{portname}*_ogl*.so.*
343 %{_libdir}/libwx_%{portname}*_plot*.so.*
344 %{_libdir}/libwx_%{portname}*_stc*.so.*
345 %{_libdir}/libwx_%{portname}*_svg*.so.*
346 %{_libdir}/libwx_%{portname}*_xrc*.so.*
347
348 %files contrib-devel
349 %defattr(-,root,root)
350 %{_bindir}/wxrc
351 %dir %{_includedir}/wx-*/wx/animate
352 %{_includedir}/wx-*/wx/animate/*
353 %{_libdir}/libwx_%{portname}*_animate*.so
354
355 %dir %{_includedir}/wx-*/wx/deprecated
356 %{_includedir}/wx-*/wx/deprecated/*
357 %{_libdir}/libwx_%{portname}*_deprecated*.so
358
359 %dir %{_includedir}/wx-*/wx/fl
360 %{_includedir}/wx-*/wx/fl/*
361 %{_libdir}/libwx_%{portname}*_fl*.so
362
363 %dir %{_includedir}/wx-*/wx/gizmos
364 %{_includedir}/wx-*/wx/gizmos/*
365 %{_libdir}/libwx_%{portname}*_gizmos*.so
366
367 %dir %{_includedir}/wx-*/wx/mmedia
368 %{_includedir}/wx-*/wx/mmedia/*
369 %{_libdir}/libwx_%{portname}*_mmedia*.so
370
371 %dir %{_includedir}/wx-*/wx/ogl
372 %{_includedir}/wx-*/wx/ogl/*
373 %{_libdir}/libwx_%{portname}*_ogl*.so
374
375 %dir %{_includedir}/wx-*/wx/plot
376 %{_includedir}/wx-*/wx/plot/*
377 %{_libdir}/libwx_%{portname}*_plot*.so
378
379 %dir %{_includedir}/wx-*/wx/stc
380 %{_includedir}/wx-*/wx/stc/*
381 %{_libdir}/libwx_%{portname}*_stc*.so
382
383 %dir %{_includedir}/wx-*/wx/svg
384 %{_includedir}/wx-*/wx/svg/*
385 %{_libdir}/libwx_%{portname}*_svg*.so
386
387 %dir %{_includedir}/wx-*/wx/xrc
388 %{_includedir}/wx-*/wx/xrc/*
389 %{_libdir}/libwx_%{portname}*_xrc*.so