]>
Commit | Line | Data |
---|---|---|
c5cf1acc | 1 | %define pref /usr |
4e4cea52 | 2 | %define ver 2.5.4 |
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 | 26 | Summary: The X11 port of the wxWindows library |
4eba1840 | 27 | Name: %{name} |
c5cf1acc RR |
28 | Version: %{ver} |
29 | Release: %{rel} | |
4eba1840 | 30 | License: wxWindows Licence |
c5cf1acc RR |
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 | |
4eba1840 VS |
47 | Provides: wxX11 |
48 | ||
49 | Requires: %{wxbasename} = %{ver} | |
c5cf1acc RR |
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 | |
4eba1840 VS |
59 | Requires: %{name} = %{ver} |
60 | Requires: %{wxbasename}-devel = %{ver} | |
c5cf1acc RR |
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 | |
4eba1840 | 68 | Requires: %{name} = %{ver} |
c5cf1acc RR |
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 | ||
4eba1840 VS |
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 | ||
c5cf1acc | 97 | %prep |
4eba1840 | 98 | %setup -q -n wxX11-%{ver} |
c5cf1acc RR |
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 | |
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 |
117 | cd contrib/src |
118 | $MAKE | |
119 | cd ../../.. | |
c5cf1acc RR |
120 | |
121 | mkdir obj-static | |
122 | cd 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 |
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 | ||
4eba1840 | 138 | # Remove headers that are part of wx-base-devel: |
d10382ab VS |
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 | |
8329fea8 | 145 | wx/archive.h |
d10382ab VS |
146 | wx/arrimpl.cpp |
147 | wx/arrstr.h | |
148 | wx/beforestd.h | |
149 | wx/buffer.h | |
150 | wx/build.h | |
151 | wx/chkconf.h | |
82b0b7f6 | 152 | wx/clntdata.h |
d10382ab VS |
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 | |
20b35a69 | 164 | wx/dlimpexp.h |
d10382ab VS |
165 | wx/dynarray.h |
166 | wx/dynlib.h | |
167 | wx/dynload.h | |
168 | wx/encconv.h | |
169 | wx/event.h | |
671a85ea | 170 | wx/except.h |
d10382ab VS |
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/iconloc.h | |
186 | wx/init.h | |
187 | wx/intl.h | |
188 | wx/iosfwrap.h | |
189 | wx/ioswrap.h | |
190 | wx/ipc.h | |
191 | wx/ipcbase.h | |
192 | wx/isql.h | |
193 | wx/isqlext.h | |
194 | wx/list.h | |
195 | wx/listimpl.cpp | |
196 | wx/log.h | |
197 | wx/longlong.h | |
198 | wx/math.h | |
199 | wx/memconf.h | |
200 | wx/memory.h | |
201 | wx/memtext.h | |
202 | wx/mimetype.h | |
203 | wx/module.h | |
204 | wx/msgout.h | |
205 | wx/msgout.h | |
206 | wx/mstream.h | |
207 | wx/object.h | |
208 | wx/platform.h | |
209 | wx/process.h | |
210 | wx/ptr_scpd.h | |
211 | wx/regex.h | |
212 | wx/scopeguard.h | |
213 | wx/snglinst.h | |
c33fae85 | 214 | wx/sstream.h |
b71531ad | 215 | wx/stack.h |
107d0fd4 | 216 | wx/stackwalk.h |
dd65d8c8 | 217 | wx/stdpaths.h |
ef335a4f | 218 | wx/stockitem.h |
d10382ab VS |
219 | wx/stopwatch.h |
220 | wx/strconv.h | |
221 | wx/stream.h | |
222 | wx/string.h | |
223 | wx/sysopt.h | |
224 | wx/textbuf.h | |
225 | wx/textfile.h | |
226 | wx/thread.h | |
227 | wx/thrimpl.cpp | |
228 | wx/timer.h | |
229 | wx/tokenzr.h | |
230 | wx/txtstrm.h | |
231 | wx/types.h | |
dd65d8c8 | 232 | wx/uri.h |
d10382ab VS |
233 | wx/utils.h |
234 | wx/variant.h | |
235 | wx/vector.h | |
236 | wx/version.h | |
237 | wx/volume.h | |
238 | wx/wfstream.h | |
239 | wx/wx.h | |
240 | wx/wxchar.h | |
241 | wx/wxprec.h | |
242 | wx/xti.h | |
243 | wx/xtistrm.h | |
244 | wx/zipstrm.h | |
245 | wx/zstream.h | |
246 | wx/msw/apptrait.h | |
247 | wx/msw/apptbase.h | |
248 | wx/msw/chkconf.h | |
249 | wx/msw/crashrpt.h | |
250 | wx/msw/dde.h | |
107d0fd4 | 251 | wx/msw/debughlp.h |
d10382ab VS |
252 | wx/msw/gccpriv.h |
253 | wx/msw/mimetype.h | |
107d0fd4 | 254 | wx/msw/stackwalk.h |
d10382ab VS |
255 | wx/msw/winundef.h |
256 | wx/msw/wrapcctl.h | |
257 | wx/msw/wrapwin.h | |
258 | wx/fs_inet.h | |
259 | wx/gsocket.h | |
260 | wx/protocol/file.h | |
261 | wx/protocol/ftp.h | |
262 | wx/protocol/http.h | |
263 | wx/protocol/protocol.h | |
264 | wx/sckaddr.h | |
265 | wx/sckipc.h | |
266 | wx/sckstrm.h | |
267 | wx/socket.h | |
268 | wx/url.h | |
269 | wx/msw/gsockmsw.h | |
270 | wx/xml/xml.h | |
271 | wx/xtixml.h | |
272 | wx/db.h | |
273 | wx/dbkeyg.h | |
274 | wx/dbtable.h | |
275 | EOF | |
276 | # --- wxBase headers list ends here --- | |
277 | for f in `cat wxbase-headers-list` ; do | |
68b47b2f | 278 | rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f |
4eba1840 | 279 | done |
4eba1840 VS |
280 | |
281 | # list of all core headers: | |
282 | find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files | |
283 | ||
284 | # contrib stuff: | |
285 | (cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
4df9240f | 286 | (cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install) |
c5cf1acc | 287 | |
88e3652f VS |
288 | # remove wxBase files so that RPM doesn't complain about unpackaged files: |
289 | rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base* | |
290 | rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/* | |
291 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/* | |
292 | ||
c5cf1acc RR |
293 | %clean |
294 | rm -rf $RPM_BUILD_ROOT | |
295 | ||
296 | %post | |
297 | /sbin/ldconfig | |
298 | ||
299 | %postun | |
300 | /sbin/ldconfig | |
301 | ||
302 | %post gl | |
303 | /sbin/ldconfig | |
304 | ||
305 | %postun gl | |
306 | /sbin/ldconfig | |
307 | ||
c5cf1acc | 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 | |
68b47b2f VS |
358 | %dir %{_includedir}/wx-*/wx/animate |
359 | %{_includedir}/wx-*/wx/animate/* | |
4eba1840 VS |
360 | %{_libdir}/libwx_%{portname}*_animate*.so |
361 | ||
68b47b2f VS |
362 | %dir %{_includedir}/wx-*/wx/deprecated |
363 | %{_includedir}/wx-*/wx/deprecated/* | |
4eba1840 VS |
364 | %{_libdir}/libwx_%{portname}*_deprecated*.so |
365 | ||
68b47b2f VS |
366 | %dir %{_includedir}/wx-*/wx/fl |
367 | %{_includedir}/wx-*/wx/fl/* | |
4eba1840 VS |
368 | %{_libdir}/libwx_%{portname}*_fl*.so |
369 | ||
68b47b2f VS |
370 | %dir %{_includedir}/wx-*/wx/gizmos |
371 | %{_includedir}/wx-*/wx/gizmos/* | |
4eba1840 VS |
372 | %{_libdir}/libwx_%{portname}*_gizmos*.so |
373 | ||
68b47b2f VS |
374 | %dir %{_includedir}/wx-*/wx/mmedia |
375 | %{_includedir}/wx-*/wx/mmedia/* | |
4eba1840 VS |
376 | %{_libdir}/libwx_%{portname}*_mmedia*.so |
377 | ||
68b47b2f VS |
378 | %dir %{_includedir}/wx-*/wx/ogl |
379 | %{_includedir}/wx-*/wx/ogl/* | |
4eba1840 | 380 | %{_libdir}/libwx_%{portname}*_ogl*.so |
4eba1840 | 381 | |
68b47b2f VS |
382 | %dir %{_includedir}/wx-*/wx/plot |
383 | %{_includedir}/wx-*/wx/plot/* | |
4eba1840 VS |
384 | %{_libdir}/libwx_%{portname}*_plot*.so |
385 | ||
68b47b2f VS |
386 | %dir %{_includedir}/wx-*/wx/stc |
387 | %{_includedir}/wx-*/wx/stc/* | |
4eba1840 VS |
388 | %{_libdir}/libwx_%{portname}*_stc*.so |
389 | ||
68b47b2f VS |
390 | %dir %{_includedir}/wx-*/wx/svg |
391 | %{_includedir}/wx-*/wx/svg/* | |
4eba1840 VS |
392 | %{_libdir}/libwx_%{portname}*_svg*.so |
393 | ||
68b47b2f VS |
394 | %dir %{_includedir}/wx-*/wx/xrc |
395 | %{_includedir}/wx-*/wx/xrc/* | |
4eba1840 | 396 | %{_libdir}/libwx_%{portname}*_xrc*.so |