]>
Commit | Line | Data |
---|---|---|
1 | %define pref /opt/gnome | |
2 | %define ver 2.6.0 | |
3 | %define ver2 2.6 | |
4 | %define rel 1 | |
5 | ||
6 | # Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line): | |
7 | %define unicode 1 | |
8 | %{?_with_unicode: %{expand: %%define unicode 1}} | |
9 | %{?_without_unicode: %{expand: %%define unicode 0}} | |
10 | ||
11 | %define gtk2 1 | |
12 | %{?_with_gtk2: %{expand: %%define gtk2 1}} | |
13 | %{?_without_gtk2: %{expand: %%define gtk2 0}} | |
14 | ||
15 | # "buildname" needs to be e.g. gtk2ud for debug builds | |
16 | %if %{gtk2} | |
17 | %define gtkver 2 | |
18 | %define portname gtk2 | |
19 | %if %{unicode} | |
20 | %define buildname gtk2u | |
21 | %else | |
22 | %define buildname gtk2u | |
23 | %endif | |
24 | %else | |
25 | %define gtkver 1.2 | |
26 | %define portname gtk | |
27 | %define buildname gtk | |
28 | %endif | |
29 | ||
30 | %if %{unicode} | |
31 | %define name wx-%{portname}-unicode | |
32 | %define wxconfig %{portname}-unicode-release-%{ver2} | |
33 | %define wxconfigstatic %{portname}-unicode-release-static-%{ver2} | |
34 | %define wxconfiglink wx%{portname}u-%{ver2}-config | |
35 | %else | |
36 | %define name wx-%{portname} | |
37 | %define wxconfig %{portname}-ansi-release-%{ver2} | |
38 | %define wxconfigstatic %{portname}-ansi-release-static-%{ver2} | |
39 | %define wxconfiglink wx%{portname}-%{ver2}-config | |
40 | %endif | |
41 | ||
42 | %if %{unicode} | |
43 | %define wxbasename wx-base-unicode | |
44 | %define wxbaseconfig base-unicode-release-%{ver2} | |
45 | %define wxbaseconfigstatic base-unicode-release-static-%{ver2} | |
46 | %define wxbaseconfiglink wxbaseu-%{ver2}-config | |
47 | %else | |
48 | %define wxbasename wx-base-ansi | |
49 | %define wxbaseconfig base-ansi-release-%{ver2} | |
50 | %define wxbaseconfigstatic base-ansi-release-static-%{ver2} | |
51 | %define wxbaseconfiglink wxbase-%{ver2}-config | |
52 | %endif | |
53 | ||
54 | Summary: The GTK+ %{gtkver} port of the wxWidgets library | |
55 | Name: %{name} | |
56 | Version: %{ver} | |
57 | Release: %{rel} | |
58 | License: wxWindows Licence | |
59 | Group: X11/Libraries | |
60 | Source: wxGTK-%{ver}.tar.gz | |
61 | URL: http://www.wxwidgets.org | |
62 | Packager: Vadim Zeitlin <vadim@wxwindows.org> | |
63 | Prefix: %{pref} | |
64 | BuildRoot: %{_tmppath}/%{name}-root | |
65 | Requires: %{wxbasename} = %{ver} | |
66 | %if %{portname} == gtk2 | |
67 | # BuildRequires: gtk+-2.0-devel | |
68 | %else | |
69 | # BuildRequires: gtk+-devel >= 1.2.0 | |
70 | %endif | |
71 | ||
72 | BuildRequires: zlib-devel, libjpeg-devel, libpng-devel, libtiff-devel | |
73 | ||
74 | # all packages providing an implementation of wxWidgets library (regardless of | |
75 | # the toolkit used) should provide the (virtual) wxwin package, this makes it | |
76 | # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." | |
77 | Provides: wxwin | |
78 | Provides: wxGTK | |
79 | ||
80 | %description | |
81 | wxWidgets is a free C++ library for cross-platform GUI development. | |
82 | With wxWidgets, you can create applications for different GUIs (GTK+, | |
83 | Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code. | |
84 | ||
85 | %package devel | |
86 | Summary: The GTK+ %{gtkver} port of the wxWidgets library | |
87 | Group: X11/Libraries | |
88 | Requires: %{name} = %{ver} | |
89 | Requires: %{wxbasename}-devel = %{ver} | |
90 | Provides: wxGTK-devel | |
91 | ||
92 | %description devel | |
93 | The GTK+ %{gtkver} port of the wxWidgets library, header files. | |
94 | ||
95 | %package gl | |
96 | Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on. | |
97 | Group: X11/Libraries | |
98 | Requires: %{name} = %{ver} | |
99 | Provides: wxGTK-gl | |
100 | ||
101 | %description gl | |
102 | OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. | |
103 | ||
104 | %package -n %{wxbasename} | |
105 | Summary: wxBase library - non-GUI support classes of the wxWidgets toolkit | |
106 | Group: Development/Libraries | |
107 | Provides: wxBase | |
108 | ||
109 | %description -n %{wxbasename} | |
110 | wxBase is a collection of C++ classes providing basic data structures (strings, | |
111 | lists, arrays), portable wrappers around many OS-specific funstions (file | |
112 | operations, time/date manipulations, threads, processes, sockets, shared | |
113 | library loading) as well as other utility classes (streams, archive and | |
114 | compression). wxBase currently supports Win32, most Unix variants (Linux, | |
115 | FreeBSD, Solaris, HP-UX) and MacOS X 10.3. | |
116 | ||
117 | %package -n %{wxbasename}-devel | |
118 | Summary: wxBase library, header files. | |
119 | Group: Development/Libraries | |
120 | Provides: wxBase-devel | |
121 | ||
122 | %description -n %{wxbasename}-devel | |
123 | wxBase library - non-GUI support classes of the wxWidgets toolkit, | |
124 | header files. | |
125 | ||
126 | %package contrib | |
127 | Summary: The GTK+ %{gtkver} port of the wxWidgets library, contributed libraries. | |
128 | Group: X11/Libraries | |
129 | Requires: %{name} = %{ver} | |
130 | ||
131 | %description contrib | |
132 | Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. | |
133 | ||
134 | %package contrib-devel | |
135 | Summary: The GTK+ %{gtkver} port of the wxWidgets library | |
136 | Group: X11/Libraries | |
137 | Requires: %{name}-contrib = %{ver} | |
138 | Requires: %{name}-devel = %{ver} | |
139 | ||
140 | %description contrib-devel | |
141 | Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. | |
142 | ||
143 | %prep | |
144 | %setup -q -n wxGTK-%{ver} | |
145 | ||
146 | %build | |
147 | if [ "$SMP" != "" ]; then | |
148 | export MAKE="make -j$SMP" | |
149 | else | |
150 | export MAKE="make" | |
151 | fi | |
152 | ||
153 | mkdir obj-shared-no-gui | |
154 | cd obj-shared-no-gui | |
155 | ../configure --prefix=%{pref} \ | |
156 | --disable-gui \ | |
157 | --disable-optimise \ | |
158 | %if %{unicode} | |
159 | --enable-unicode | |
160 | %else | |
161 | --disable-unicode | |
162 | %endif | |
163 | $MAKE | |
164 | cd .. | |
165 | ||
166 | mkdir obj-shared | |
167 | cd obj-shared | |
168 | ../configure --prefix=%{pref} \ | |
169 | %if ! %{gtk2} | |
170 | --with-gtk1 \ | |
171 | %else | |
172 | --with-gtk2 \ | |
173 | %endif | |
174 | --disable-optimise \ | |
175 | %if %{unicode} | |
176 | --enable-unicode \ | |
177 | %else | |
178 | --disable-unicode \ | |
179 | %endif | |
180 | --with-opengl | |
181 | $MAKE | |
182 | ||
183 | cd contrib/src | |
184 | $MAKE | |
185 | cd ../../.. | |
186 | ||
187 | mkdir obj-static-no-gui | |
188 | cd obj-static-no-gui | |
189 | ../configure --prefix=%{pref} \ | |
190 | --disable-gui \ | |
191 | --disable-shared \ | |
192 | --disable-optimise \ | |
193 | %if %{unicode} | |
194 | --enable-unicode | |
195 | %else | |
196 | --disable-unicode | |
197 | %endif | |
198 | $MAKE | |
199 | cd .. | |
200 | ||
201 | mkdir obj-static | |
202 | cd obj-static | |
203 | ../configure --prefix=%{pref} \ | |
204 | %if ! %{gtk2} | |
205 | --with-gtk1 \ | |
206 | %else | |
207 | --with-gtk2 \ | |
208 | %endif | |
209 | --disable-shared \ | |
210 | --disable-optimise \ | |
211 | %if %{unicode} | |
212 | --enable-unicode \ | |
213 | %else | |
214 | --disable-unicode \ | |
215 | %endif | |
216 | --with-opengl | |
217 | $MAKE | |
218 | ||
219 | cd contrib/src | |
220 | $MAKE | |
221 | cd ../../.. | |
222 | ||
223 | %install | |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | (cd obj-static-no-gui; make prefix=$RPM_BUILD_ROOT/usr install) | |
226 | (cd obj-static; make prefix=$RPM_BUILD_ROOT/usr install) | |
227 | (cd obj-shared-no-gui; make prefix=$RPM_BUILD_ROOT/usr install) | |
228 | (cd obj-shared; make prefix=$RPM_BUILD_ROOT/usr install) | |
229 | ||
230 | # --- wxBase headers list begins here --- | |
231 | cat <<EOF >wxbase-headers.files | |
232 | wx/afterstd.h | |
233 | wx/app.h | |
234 | wx/apptrait.h | |
235 | wx/archive.h | |
236 | wx/arrimpl.cpp | |
237 | wx/arrstr.h | |
238 | wx/beforestd.h | |
239 | wx/buffer.h | |
240 | wx/build.h | |
241 | wx/chkconf.h | |
242 | wx/clntdata.h | |
243 | wx/cmdline.h | |
244 | wx/confbase.h | |
245 | wx/config.h | |
246 | wx/containr.h | |
247 | wx/datetime.h | |
248 | wx/datetime.inl | |
249 | wx/datstrm.h | |
250 | wx/dde.h | |
251 | wx/debug.h | |
252 | wx/defs.h | |
253 | wx/dir.h | |
254 | wx/dlimpexp.h | |
255 | wx/dynarray.h | |
256 | wx/dynlib.h | |
257 | wx/dynload.h | |
258 | wx/encconv.h | |
259 | wx/event.h | |
260 | wx/except.h | |
261 | wx/features.h | |
262 | wx/ffile.h | |
263 | wx/file.h | |
264 | wx/fileconf.h | |
265 | wx/filefn.h | |
266 | wx/filename.h | |
267 | wx/filesys.h | |
268 | wx/fontenc.h | |
269 | wx/fontmap.h | |
270 | wx/fs_mem.h | |
271 | wx/fs_zip.h | |
272 | wx/hash.h | |
273 | wx/hashmap.h | |
274 | wx/hashset.h | |
275 | wx/html/forcelnk.h | |
276 | wx/iconloc.h | |
277 | wx/init.h | |
278 | wx/intl.h | |
279 | wx/iosfwrap.h | |
280 | wx/ioswrap.h | |
281 | wx/ipc.h | |
282 | wx/ipcbase.h | |
283 | wx/isql.h | |
284 | wx/isqlext.h | |
285 | wx/list.h | |
286 | wx/listimpl.cpp | |
287 | wx/log.h | |
288 | wx/longlong.h | |
289 | wx/math.h | |
290 | wx/memconf.h | |
291 | wx/memory.h | |
292 | wx/memtext.h | |
293 | wx/mimetype.h | |
294 | wx/module.h | |
295 | wx/msgout.h | |
296 | wx/mstream.h | |
297 | wx/object.h | |
298 | wx/platform.h | |
299 | wx/process.h | |
300 | wx/ptr_scpd.h | |
301 | wx/regex.h | |
302 | wx/scopeguard.h | |
303 | wx/snglinst.h | |
304 | wx/sstream.h | |
305 | wx/stack.h | |
306 | wx/stackwalk.h | |
307 | wx/stdpaths.h | |
308 | wx/stockitem.h | |
309 | wx/stopwatch.h | |
310 | wx/strconv.h | |
311 | wx/stream.h | |
312 | wx/string.h | |
313 | wx/sysopt.h | |
314 | wx/textbuf.h | |
315 | wx/textfile.h | |
316 | wx/thread.h | |
317 | wx/thrimpl.cpp | |
318 | wx/timer.h | |
319 | wx/tokenzr.h | |
320 | wx/txtstrm.h | |
321 | wx/types.h | |
322 | wx/uri.h | |
323 | wx/utils.h | |
324 | wx/variant.h | |
325 | wx/vector.h | |
326 | wx/version.h | |
327 | wx/volume.h | |
328 | wx/wfstream.h | |
329 | wx/wx.h | |
330 | wx/wxchar.h | |
331 | wx/wxprec.h | |
332 | wx/xti.h | |
333 | wx/xtistrm.h | |
334 | wx/zipstrm.h | |
335 | wx/zstream.h | |
336 | wx/fs_inet.h | |
337 | wx/gsocket.h | |
338 | wx/protocol/file.h | |
339 | wx/protocol/ftp.h | |
340 | wx/protocol/http.h | |
341 | wx/protocol/protocol.h | |
342 | wx/sckaddr.h | |
343 | wx/sckipc.h | |
344 | wx/sckstrm.h | |
345 | wx/socket.h | |
346 | wx/url.h | |
347 | wx/xml/xml.h | |
348 | wx/xtixml.h | |
349 | wx/db.h | |
350 | wx/dbkeyg.h | |
351 | wx/dbtable.h | |
352 | EOF | |
353 | # --- wxBase headers list ends here --- | |
354 | cat <<EOF >wxbase-headers.paths | |
355 | %{_includedir}/wx-%{ver2}/wx/afterstd.h | |
356 | %{_includedir}/wx-%{ver2}/wx/app.h | |
357 | %{_includedir}/wx-%{ver2}/wx/apptrait.h | |
358 | %{_includedir}/wx-%{ver2}/wx/archive.h | |
359 | %{_includedir}/wx-%{ver2}/wx/arrimpl.cpp | |
360 | %{_includedir}/wx-%{ver2}/wx/arrstr.h | |
361 | %{_includedir}/wx-%{ver2}/wx/beforestd.h | |
362 | %{_includedir}/wx-%{ver2}/wx/buffer.h | |
363 | %{_includedir}/wx-%{ver2}/wx/build.h | |
364 | %{_includedir}/wx-%{ver2}/wx/chkconf.h | |
365 | %{_includedir}/wx-%{ver2}/wx/clntdata.h | |
366 | %{_includedir}/wx-%{ver2}/wx/cmdline.h | |
367 | %{_includedir}/wx-%{ver2}/wx/confbase.h | |
368 | %{_includedir}/wx-%{ver2}/wx/config.h | |
369 | %{_includedir}/wx-%{ver2}/wx/containr.h | |
370 | %{_includedir}/wx-%{ver2}/wx/datetime.h | |
371 | %{_includedir}/wx-%{ver2}/wx/datetime.inl | |
372 | %{_includedir}/wx-%{ver2}/wx/datstrm.h | |
373 | %{_includedir}/wx-%{ver2}/wx/dde.h | |
374 | %{_includedir}/wx-%{ver2}/wx/debug.h | |
375 | %{_includedir}/wx-%{ver2}/wx/defs.h | |
376 | %{_includedir}/wx-%{ver2}/wx/dir.h | |
377 | %{_includedir}/wx-%{ver2}/wx/dlimpexp.h | |
378 | %{_includedir}/wx-%{ver2}/wx/dynarray.h | |
379 | %{_includedir}/wx-%{ver2}/wx/dynlib.h | |
380 | %{_includedir}/wx-%{ver2}/wx/dynload.h | |
381 | %{_includedir}/wx-%{ver2}/wx/encconv.h | |
382 | %{_includedir}/wx-%{ver2}/wx/event.h | |
383 | %{_includedir}/wx-%{ver2}/wx/except.h | |
384 | %{_includedir}/wx-%{ver2}/wx/features.h | |
385 | %{_includedir}/wx-%{ver2}/wx/ffile.h | |
386 | %{_includedir}/wx-%{ver2}/wx/file.h | |
387 | %{_includedir}/wx-%{ver2}/wx/fileconf.h | |
388 | %{_includedir}/wx-%{ver2}/wx/filefn.h | |
389 | %{_includedir}/wx-%{ver2}/wx/filename.h | |
390 | %{_includedir}/wx-%{ver2}/wx/filesys.h | |
391 | %{_includedir}/wx-%{ver2}/wx/fontenc.h | |
392 | %{_includedir}/wx-%{ver2}/wx/fontmap.h | |
393 | %{_includedir}/wx-%{ver2}/wx/fs_mem.h | |
394 | %{_includedir}/wx-%{ver2}/wx/fs_zip.h | |
395 | %{_includedir}/wx-%{ver2}/wx/hash.h | |
396 | %{_includedir}/wx-%{ver2}/wx/hashmap.h | |
397 | %{_includedir}/wx-%{ver2}/wx/hashset.h | |
398 | %{_includedir}/wx-%{ver2}/wx/html/forcelnk.h | |
399 | %{_includedir}/wx-%{ver2}/wx/iconloc.h | |
400 | %{_includedir}/wx-%{ver2}/wx/init.h | |
401 | %{_includedir}/wx-%{ver2}/wx/intl.h | |
402 | %{_includedir}/wx-%{ver2}/wx/iosfwrap.h | |
403 | %{_includedir}/wx-%{ver2}/wx/ioswrap.h | |
404 | %{_includedir}/wx-%{ver2}/wx/ipc.h | |
405 | %{_includedir}/wx-%{ver2}/wx/ipcbase.h | |
406 | %{_includedir}/wx-%{ver2}/wx/isql.h | |
407 | %{_includedir}/wx-%{ver2}/wx/isqlext.h | |
408 | %{_includedir}/wx-%{ver2}/wx/list.h | |
409 | %{_includedir}/wx-%{ver2}/wx/listimpl.cpp | |
410 | %{_includedir}/wx-%{ver2}/wx/log.h | |
411 | %{_includedir}/wx-%{ver2}/wx/longlong.h | |
412 | %{_includedir}/wx-%{ver2}/wx/math.h | |
413 | %{_includedir}/wx-%{ver2}/wx/memconf.h | |
414 | %{_includedir}/wx-%{ver2}/wx/memory.h | |
415 | %{_includedir}/wx-%{ver2}/wx/memtext.h | |
416 | %{_includedir}/wx-%{ver2}/wx/mimetype.h | |
417 | %{_includedir}/wx-%{ver2}/wx/module.h | |
418 | %{_includedir}/wx-%{ver2}/wx/msgout.h | |
419 | %{_includedir}/wx-%{ver2}/wx/mstream.h | |
420 | %{_includedir}/wx-%{ver2}/wx/object.h | |
421 | %{_includedir}/wx-%{ver2}/wx/platform.h | |
422 | %{_includedir}/wx-%{ver2}/wx/process.h | |
423 | %{_includedir}/wx-%{ver2}/wx/ptr_scpd.h | |
424 | %{_includedir}/wx-%{ver2}/wx/regex.h | |
425 | %{_includedir}/wx-%{ver2}/wx/scopeguard.h | |
426 | %{_includedir}/wx-%{ver2}/wx/snglinst.h | |
427 | %{_includedir}/wx-%{ver2}/wx/sstream.h | |
428 | %{_includedir}/wx-%{ver2}/wx/stack.h | |
429 | %{_includedir}/wx-%{ver2}/wx/stackwalk.h | |
430 | %{_includedir}/wx-%{ver2}/wx/stdpaths.h | |
431 | %{_includedir}/wx-%{ver2}/wx/stockitem.h | |
432 | %{_includedir}/wx-%{ver2}/wx/stopwatch.h | |
433 | %{_includedir}/wx-%{ver2}/wx/strconv.h | |
434 | %{_includedir}/wx-%{ver2}/wx/stream.h | |
435 | %{_includedir}/wx-%{ver2}/wx/string.h | |
436 | %{_includedir}/wx-%{ver2}/wx/sysopt.h | |
437 | %{_includedir}/wx-%{ver2}/wx/textbuf.h | |
438 | %{_includedir}/wx-%{ver2}/wx/textfile.h | |
439 | %{_includedir}/wx-%{ver2}/wx/thread.h | |
440 | %{_includedir}/wx-%{ver2}/wx/thrimpl.cpp | |
441 | %{_includedir}/wx-%{ver2}/wx/timer.h | |
442 | %{_includedir}/wx-%{ver2}/wx/tokenzr.h | |
443 | %{_includedir}/wx-%{ver2}/wx/txtstrm.h | |
444 | %{_includedir}/wx-%{ver2}/wx/types.h | |
445 | %{_includedir}/wx-%{ver2}/wx/uri.h | |
446 | %{_includedir}/wx-%{ver2}/wx/utils.h | |
447 | %{_includedir}/wx-%{ver2}/wx/variant.h | |
448 | %{_includedir}/wx-%{ver2}/wx/vector.h | |
449 | %{_includedir}/wx-%{ver2}/wx/version.h | |
450 | %{_includedir}/wx-%{ver2}/wx/volume.h | |
451 | %{_includedir}/wx-%{ver2}/wx/wfstream.h | |
452 | %{_includedir}/wx-%{ver2}/wx/wx.h | |
453 | %{_includedir}/wx-%{ver2}/wx/wxchar.h | |
454 | %{_includedir}/wx-%{ver2}/wx/wxprec.h | |
455 | %{_includedir}/wx-%{ver2}/wx/xti.h | |
456 | %{_includedir}/wx-%{ver2}/wx/xtistrm.h | |
457 | %{_includedir}/wx-%{ver2}/wx/zipstrm.h | |
458 | %{_includedir}/wx-%{ver2}/wx/zstream.h | |
459 | %{_includedir}/wx-%{ver2}/wx/fs_inet.h | |
460 | %{_includedir}/wx-%{ver2}/wx/gsocket.h | |
461 | %{_includedir}/wx-%{ver2}/wx/protocol/file.h | |
462 | %{_includedir}/wx-%{ver2}/wx/protocol/ftp.h | |
463 | %{_includedir}/wx-%{ver2}/wx/protocol/http.h | |
464 | %{_includedir}/wx-%{ver2}/wx/protocol/protocol.h | |
465 | %{_includedir}/wx-%{ver2}/wx/sckaddr.h | |
466 | %{_includedir}/wx-%{ver2}/wx/sckipc.h | |
467 | %{_includedir}/wx-%{ver2}/wx/sckstrm.h | |
468 | %{_includedir}/wx-%{ver2}/wx/socket.h | |
469 | %{_includedir}/wx-%{ver2}/wx/url.h | |
470 | %{_includedir}/wx-%{ver2}/wx/xml/xml.h | |
471 | %{_includedir}/wx-%{ver2}/wx/xtixml.h | |
472 | %{_includedir}/wx-%{ver2}/wx/db.h | |
473 | %{_includedir}/wx-%{ver2}/wx/dbkeyg.h | |
474 | %{_includedir}/wx-%{ver2}/wx/dbtable.h | |
475 | EOF | |
476 | # --- wxBase headers list ends here --- | |
477 | ||
478 | # temporarily remove base headers | |
479 | mkdir $RPM_BUILD_ROOT/_save_dir | |
480 | cp -r $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT/_save_dir | |
481 | for f in `cat wxbase-headers.files` ; do | |
482 | rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f | |
483 | done | |
484 | # list of all core headers: | |
485 | find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files | |
486 | # move base headers (actually all headers) back again | |
487 | cp -f -r $RPM_BUILD_ROOT/_save_dir/* $RPM_BUILD_ROOT%{_includedir} | |
488 | rm -rf $RPM_BUILD_ROOT/_save_dir | |
489 | ||
490 | # contrib stuff: | |
491 | (cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT/usr install) | |
492 | (cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT/usr install) | |
493 | ||
494 | %clean | |
495 | rm -rf $RPM_BUILD_ROOT | |
496 | ||
497 | %post | |
498 | /sbin/ldconfig | |
499 | ||
500 | %postun | |
501 | /sbin/ldconfig | |
502 | ||
503 | %post devel | |
504 | # link wx-config when you install RPM. | |
505 | %if %{unicode} | |
506 | ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config | |
507 | %endif | |
508 | # link wx-config with explicit name. | |
509 | ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink} | |
510 | /sbin/ldconfig | |
511 | ||
512 | %postun devel | |
513 | /sbin/ldconfig | |
514 | ||
515 | %preun devel | |
516 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
517 | SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32` | |
518 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
519 | if test "x$SUM1" = "x$SUM2" ; then | |
520 | rm -f %{_bindir}/wx-config | |
521 | fi | |
522 | fi | |
523 | rm -f %{_bindir}/%{wxconfiglink} | |
524 | ||
525 | %post -n %{wxbasename} | |
526 | /sbin/ldconfig | |
527 | ||
528 | %postun -n %{wxbasename} | |
529 | /sbin/ldconfig | |
530 | ||
531 | %post -n %{wxbasename}-devel | |
532 | # link wx-config with explicit name. | |
533 | ln -sf %{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink} | |
534 | /sbin/ldconfig | |
535 | ||
536 | %postun -n %{wxbasename}-devel | |
537 | /sbin/ldconfig | |
538 | ||
539 | %preun -n %{wxbasename}-devel | |
540 | rm -f %{_bindir}/%{wxbaseconfiglink} | |
541 | ||
542 | %post gl | |
543 | /sbin/ldconfig | |
544 | ||
545 | %postun gl | |
546 | /sbin/ldconfig | |
547 | ||
548 | %post contrib | |
549 | /sbin/ldconfig | |
550 | ||
551 | %postun contrib | |
552 | /sbin/ldconfig | |
553 | ||
554 | %post contrib-devel | |
555 | /sbin/ldconfig | |
556 | ||
557 | %postun contrib-devel | |
558 | /sbin/ldconfig | |
559 | ||
560 | %files | |
561 | %defattr(-,root,root) | |
562 | %doc COPYING.LIB *.txt | |
563 | %{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.* | |
564 | %{_libdir}/libwx_%{buildname}_core-%{ver2}.so.* | |
565 | %if !%{unicode} | |
566 | %{_libdir}/libwx_%{buildname}_dbgrid-%{ver2}.so.* | |
567 | %endif | |
568 | %{_libdir}/libwx_%{buildname}_html-%{ver2}.so.* | |
569 | %{_libdir}/libwx_%{buildname}_media-%{ver2}.so.* | |
570 | %{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.* | |
571 | %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.* | |
572 | ||
573 | ||
574 | %files devel -f core-headers.files | |
575 | %defattr(-,root,root) | |
576 | # shared libs | |
577 | %{_libdir}/libwx_%{buildname}_adv-%{ver2}.so | |
578 | %{_libdir}/libwx_%{buildname}_core-%{ver2}.so | |
579 | %if !%{unicode} | |
580 | %{_libdir}/libwx_%{buildname}_dbgrid-%{ver2}.so | |
581 | %endif | |
582 | %{_libdir}/libwx_%{buildname}_gl-%{ver2}.so | |
583 | %{_libdir}/libwx_%{buildname}_html-%{ver2}.so | |
584 | %{_libdir}/libwx_%{buildname}_media-%{ver2}.so | |
585 | %{_libdir}/libwx_%{buildname}_qa-%{ver2}.so | |
586 | %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so | |
587 | # static libs | |
588 | %{_libdir}/libwx_%{buildname}_adv-%{ver2}.a | |
589 | %{_libdir}/libwx_%{buildname}_core-%{ver2}.a | |
590 | %if !%{unicode} | |
591 | %{_libdir}/libwx_%{buildname}_dbgrid-%{ver2}.a | |
592 | %endif | |
593 | %{_libdir}/libwx_%{buildname}_gl-%{ver2}.a | |
594 | %{_libdir}/libwx_%{buildname}_html-%{ver2}.a | |
595 | %{_libdir}/libwx_%{buildname}_media-%{ver2}.a | |
596 | %{_libdir}/libwx_%{buildname}_qa-%{ver2}.a | |
597 | %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a | |
598 | %dir %{_libdir}/wx | |
599 | %{_libdir}/wx/config/%{wxconfig} | |
600 | %{_libdir}/wx/include/%{wxconfig}/wx/setup.h | |
601 | %{_libdir}/wx/config/%{wxconfigstatic} | |
602 | %{_libdir}/wx/include/%{wxconfigstatic}/wx/setup.h | |
603 | %{_bindir}/wxrc* | |
604 | ||
605 | %files -n %{wxbasename} | |
606 | %defattr(-,root,root) | |
607 | %{_libdir}/libwx_base*-%{ver2}.so.* | |
608 | #%{_datadir}/locale/*/*/* | |
609 | ||
610 | %files -n %{wxbasename}-devel -f wxbase-headers.paths | |
611 | %defattr (-,root,root) | |
612 | %dir %{_includedir}/wx-%{ver2} | |
613 | %{_libdir}/libwx_base*-%{ver2}.so | |
614 | %{_libdir}/libwx_base*-%{ver2}.a | |
615 | %if %{unicode} | |
616 | %{_libdir}/libwxregexu-%{ver2}.a | |
617 | %endif | |
618 | %dir %{_libdir}/wx | |
619 | %{_libdir}/wx/config/%{wxbaseconfig} | |
620 | %{_libdir}/wx/include/%{wxbaseconfig}/wx/setup.h | |
621 | %{_libdir}/wx/config/%{wxbaseconfigstatic} | |
622 | %{_libdir}/wx/include/%{wxbaseconfigstatic}/wx/setup.h | |
623 | %{_datadir}/aclocal/*.m4 | |
624 | ||
625 | %files gl | |
626 | %defattr(-,root,root) | |
627 | %{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.* | |
628 | ||
629 | %files contrib | |
630 | %defattr(-,root,root) | |
631 | %{_libdir}/libwx_%{buildname}_animate-%{ver2}.so.* | |
632 | %{_libdir}/libwx_%{buildname}_deprecated-%{ver2}.so.* | |
633 | %{_libdir}/libwx_%{buildname}_fl-%{ver2}.so.* | |
634 | %{_libdir}/libwx_%{buildname}_gizmos-%{ver2}.so.* | |
635 | %{_libdir}/libwx_%{buildname}_gizmos_xrc-%{ver2}.so.* | |
636 | %{_libdir}/libwx_%{buildname}_mmedia-%{ver2}.so.* | |
637 | %{_libdir}/libwx_%{buildname}_ogl-%{ver2}.so.* | |
638 | %{_libdir}/libwx_%{buildname}_plot-%{ver2}.so.* | |
639 | %{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.* | |
640 | %{_libdir}/libwx_%{buildname}_svg-%{ver2}.so.* | |
641 | ||
642 | %files contrib-devel | |
643 | %defattr(-,root,root) | |
644 | %dir %{_includedir}/wx-%{ver2}/wx/animate | |
645 | %{_includedir}/wx-%{ver2}/wx/animate/* | |
646 | %{_libdir}/libwx_%{buildname}_animate-%{ver2}.so | |
647 | ||
648 | %dir %{_includedir}/wx-%{ver2}/wx/deprecated | |
649 | %{_includedir}/wx-%{ver2}/wx/deprecated/* | |
650 | %{_libdir}/libwx_%{buildname}_deprecated-%{ver2}.so | |
651 | ||
652 | %dir %{_includedir}/wx-%{ver2}/wx/fl | |
653 | %{_includedir}/wx-%{ver2}/wx/fl/* | |
654 | %{_libdir}/libwx_%{buildname}_fl-%{ver2}.so | |
655 | ||
656 | %dir %{_includedir}/wx-%{ver2}/wx/gizmos | |
657 | %{_includedir}/wx-%{ver2}/wx/gizmos/* | |
658 | %{_libdir}/libwx_%{buildname}_gizmos-%{ver2}.so | |
659 | %{_libdir}/libwx_%{buildname}_gizmos_xrc-%{ver2}.so | |
660 | ||
661 | %dir %{_includedir}/wx-%{ver2}/wx/mmedia | |
662 | %{_includedir}/wx-%{ver2}/wx/mmedia/* | |
663 | %{_libdir}/libwx_%{buildname}_mmedia-%{ver2}.so | |
664 | ||
665 | %dir %{_includedir}/wx-%{ver2}/wx/ogl | |
666 | %{_includedir}/wx-%{ver2}/wx/ogl/* | |
667 | %{_libdir}/libwx_%{buildname}_ogl-%{ver2}.so | |
668 | ||
669 | %dir %{_includedir}/wx-%{ver2}/wx/plot | |
670 | %{_includedir}/wx-%{ver2}/wx/plot/* | |
671 | %{_libdir}/libwx_%{buildname}_plot-%{ver2}.so | |
672 | ||
673 | %dir %{_includedir}/wx-%{ver2}/wx/stc | |
674 | %{_includedir}/wx-%{ver2}/wx/stc/* | |
675 | %{_libdir}/libwx_%{buildname}_stc-%{ver2}.so | |
676 | ||
677 | %dir %{_includedir}/wx-%{ver2}/wx/svg | |
678 | %{_includedir}/wx-%{ver2}/wx/svg/* | |
679 | %{_libdir}/libwx_%{buildname}_svg-%{ver2}.so |