]>
Commit | Line | Data |
---|---|---|
e5ea3f7a | 1 | %define pref /usr |
4e4cea52 | 2 | %define ver 2.5.4 |
c31752da | 3 | %define ver2 2.5 |
acea2a0b | 4 | %define rel 1 |
e5ea3f7a | 5 | |
4eba1840 VS |
6 | # Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line): |
7 | %define unicode 0 | |
8 | %{?_with_unicode: %{expand: %%define unicode 1}} | |
9 | %{?_without_unicode: %{expand: %%define unicode 0}} | |
10 | ||
2fbef279 | 11 | %define gtk2 1 |
4eba1840 VS |
12 | %{?_with_gtk2: %{expand: %%define gtk2 1}} |
13 | %{?_without_gtk2: %{expand: %%define gtk2 0}} | |
14 | ||
15 | %if %{gtk2} | |
16 | %define gtkver 2 | |
17 | %define portname gtk2 | |
18 | %else | |
19 | %define gtkver 1.2 | |
20 | %define portname gtk | |
21 | %endif | |
22 | ||
23 | %if %{unicode} | |
24 | %define name wx-%{portname}-unicode | |
25 | %define wxbasename wx-base-unicode | |
26 | %else | |
27 | %define name wx-%{portname} | |
28 | %define wxbasename wx-base | |
29 | %endif | |
30 | ||
31 | %if %{unicode} | |
2fbef279 VZ |
32 | %define wxconfigname %{portname}-unicode-release-%{ver2} |
33 | %define wxconfiglinkname wx%{portname}u-%{ver2}-config | |
4eba1840 | 34 | %else |
2fbef279 VZ |
35 | %define wxconfigname %{portname}-ansi-release-%{ver2} |
36 | %define wxconfiglinkname wx%{portname}-%{ver2}-config | |
4eba1840 VS |
37 | %endif |
38 | ||
39 | Name: %{name} | |
40 | Summary: The GTK+ %{gtkver} port of the wxWindows library | |
e5ea3f7a RR |
41 | Version: %{ver} |
42 | Release: %{rel} | |
4eba1840 | 43 | License: wxWindows Licence |
f14a5b55 | 44 | Group: X11/Libraries |
b5fa0a3e VZ |
45 | Source: wxGTK-%{ver}.tar.bz2 |
46 | URL: http://www.wxwindows.org | |
31fe72b6 VZ |
47 | Packager: Vadim Zeitlin <vadim@wxwindows.org> |
48 | Prefix: %{pref} | |
49 | BuildRoot: /var/tmp/%{name}-root | |
f14a5b55 | 50 | |
212d0bb3 VZ |
51 | # all packages providing an implementation of wxWindows library (regardless of |
52 | # the toolkit used) should provide the (virtual) wxwin package, this makes it | |
6e711d5c | 53 | # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." |
212d0bb3 | 54 | Provides: wxwin |
4eba1840 | 55 | Provides: wxGTK |
212d0bb3 | 56 | |
31fe72b6 VZ |
57 | # in addition, we should provide libwx_gtk as automatic generator only notices |
58 | # libwx_gtk-%{ver}-%{rel} | |
59 | Provides: libwx_gtk.so | |
8c8fb2f6 | 60 | Provides: libwx_gtk-%{ver2}.so |
31fe72b6 | 61 | |
4eba1840 | 62 | Requires: %{wxbasename} = %{ver} |
4eba1840 | 63 | |
f14a5b55 | 64 | %description |
212d0bb3 VZ |
65 | wxWindows is a free C++ library for cross-platform GUI development. |
66 | With wxWindows, you can create applications for different GUIs (GTK+, | |
67 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
f14a5b55 | 68 | |
641d87d8 | 69 | %package devel |
4eba1840 | 70 | Summary: The GTK+ %{gtkver} port of the wxWindows library |
641d87d8 | 71 | Group: X11/Libraries |
4eba1840 VS |
72 | Requires: %{name} = %{ver} |
73 | Requires: %{wxbasename}-devel = %{ver} | |
74 | Provides: wxGTK-devel | |
641d87d8 RR |
75 | |
76 | %description devel | |
4eba1840 | 77 | Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library. |
c661ecca RR |
78 | |
79 | %package gl | |
4eba1840 | 80 | Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on. |
c661ecca | 81 | Group: X11/Libraries |
4eba1840 | 82 | Requires: %{name} = %{ver} |
c661ecca RR |
83 | |
84 | %description gl | |
4eba1840 | 85 | OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library. |
5dcf9614 VS |
86 | |
87 | %package static | |
88 | Summary: wxGTK static libraries | |
89 | Group: Development/Libraries | |
4eba1840 | 90 | Requires: %{wxbasename}-static |
5dcf9614 VS |
91 | |
92 | %description static | |
93 | Static libraries for wxGTK. You need them if you want to link statically against wxGTK. | |
641d87d8 | 94 | |
4eba1840 VS |
95 | %package contrib |
96 | Summary: The GTK+ %{gtkver} port of the wxWindows library, contributed libraries. | |
97 | Group: X11/Libraries | |
98 | Requires: %{name} = %{ver} | |
99 | ||
100 | %description contrib | |
101 | Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library. | |
102 | ||
103 | %package contrib-devel | |
104 | Summary: The GTK+ %{gtkver} port of the wxWindows library | |
105 | Group: X11/Libraries | |
106 | Requires: %{name}-contrib = %{ver} | |
107 | Requires: %{name}-devel = %{ver} | |
108 | ||
109 | %description contrib-devel | |
110 | Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library. | |
111 | ||
f14a5b55 | 112 | %prep |
4eba1840 | 113 | %setup -q -n wxGTK-%{ver} |
f14a5b55 RR |
114 | |
115 | %build | |
103aab26 RR |
116 | if [ "$SMP" != "" ]; then |
117 | export MAKE="make -j$SMP" | |
118 | else | |
119 | export MAKE="make" | |
120 | fi | |
5dcf9614 | 121 | |
5dcf9614 VS |
122 | mkdir obj-shared |
123 | cd obj-shared | |
4eba1840 VS |
124 | ../configure --prefix=%{pref} \ |
125 | %if %{unicode} | |
126 | --enable-unicode \ | |
127 | %else | |
128 | --with-odbc \ | |
129 | %endif | |
2fbef279 VZ |
130 | %if ! %{gtk2} |
131 | --disable-gtk2 \ | |
4eba1840 VS |
132 | %endif |
133 | --with-opengl | |
5dcf9614 | 134 | $MAKE |
4eba1840 VS |
135 | cd contrib/src |
136 | $MAKE | |
137 | cd ../../.. | |
5dcf9614 VS |
138 | |
139 | mkdir obj-static | |
140 | cd obj-static | |
4eba1840 VS |
141 | ../configure --prefix=%{pref} --disable-shared \ |
142 | %if %{unicode} | |
143 | --enable-unicode \ | |
144 | %else | |
145 | --with-odbc \ | |
146 | %endif | |
2fbef279 VZ |
147 | %if ! %{gtk2} |
148 | --disable-gtk2 \ | |
4eba1840 VS |
149 | %endif |
150 | --with-opengl | |
103aab26 | 151 | $MAKE |
5dcf9614 | 152 | cd .. |
f14a5b55 RR |
153 | |
154 | %install | |
31fe72b6 | 155 | rm -rf $RPM_BUILD_ROOT |
5dcf9614 VS |
156 | (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install) |
157 | (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
f14a5b55 | 158 | |
4eba1840 | 159 | # Remove headers that are part of wx-base-devel: |
d10382ab VS |
160 | |
161 | # --- wxBase headers list begins here --- | |
162 | cat <<EOF >wxbase-headers-list | |
163 | wx/afterstd.h | |
164 | wx/app.h | |
165 | wx/apptrait.h | |
8329fea8 | 166 | wx/archive.h |
d10382ab VS |
167 | wx/arrimpl.cpp |
168 | wx/arrstr.h | |
169 | wx/beforestd.h | |
170 | wx/buffer.h | |
171 | wx/build.h | |
172 | wx/chkconf.h | |
82b0b7f6 | 173 | wx/clntdata.h |
d10382ab VS |
174 | wx/cmdline.h |
175 | wx/confbase.h | |
176 | wx/config.h | |
177 | wx/containr.h | |
178 | wx/datetime.h | |
179 | wx/datetime.inl | |
180 | wx/datstrm.h | |
181 | wx/dde.h | |
182 | wx/debug.h | |
54e80d76 | 183 | wx/debugrpt.h |
d10382ab VS |
184 | wx/defs.h |
185 | wx/dir.h | |
20b35a69 | 186 | wx/dlimpexp.h |
d10382ab VS |
187 | wx/dynarray.h |
188 | wx/dynlib.h | |
189 | wx/dynload.h | |
190 | wx/encconv.h | |
191 | wx/event.h | |
671a85ea | 192 | wx/except.h |
d10382ab VS |
193 | wx/features.h |
194 | wx/ffile.h | |
195 | wx/file.h | |
196 | wx/fileconf.h | |
197 | wx/filefn.h | |
198 | wx/filename.h | |
199 | wx/filesys.h | |
200 | wx/fontenc.h | |
201 | wx/fontmap.h | |
202 | wx/fs_mem.h | |
203 | wx/fs_zip.h | |
204 | wx/hash.h | |
205 | wx/hashmap.h | |
206 | wx/hashset.h | |
54e80d76 | 207 | wx/html/forcelnk.h |
d10382ab VS |
208 | wx/iconloc.h |
209 | wx/init.h | |
210 | wx/intl.h | |
211 | wx/iosfwrap.h | |
212 | wx/ioswrap.h | |
213 | wx/ipc.h | |
214 | wx/ipcbase.h | |
215 | wx/isql.h | |
216 | wx/isqlext.h | |
217 | wx/list.h | |
218 | wx/listimpl.cpp | |
219 | wx/log.h | |
220 | wx/longlong.h | |
221 | wx/math.h | |
222 | wx/memconf.h | |
223 | wx/memory.h | |
224 | wx/memtext.h | |
225 | wx/mimetype.h | |
226 | wx/module.h | |
227 | wx/msgout.h | |
228 | wx/msgout.h | |
229 | wx/mstream.h | |
230 | wx/object.h | |
231 | wx/platform.h | |
232 | wx/process.h | |
233 | wx/ptr_scpd.h | |
234 | wx/regex.h | |
235 | wx/scopeguard.h | |
236 | wx/snglinst.h | |
c33fae85 | 237 | wx/sstream.h |
b71531ad | 238 | wx/stack.h |
107d0fd4 | 239 | wx/stackwalk.h |
dd65d8c8 | 240 | wx/stdpaths.h |
ef335a4f | 241 | wx/stockitem.h |
d10382ab VS |
242 | wx/stopwatch.h |
243 | wx/strconv.h | |
244 | wx/stream.h | |
245 | wx/string.h | |
246 | wx/sysopt.h | |
247 | wx/textbuf.h | |
248 | wx/textfile.h | |
249 | wx/thread.h | |
250 | wx/thrimpl.cpp | |
251 | wx/timer.h | |
252 | wx/tokenzr.h | |
253 | wx/txtstrm.h | |
254 | wx/types.h | |
dd65d8c8 | 255 | wx/uri.h |
d10382ab VS |
256 | wx/utils.h |
257 | wx/variant.h | |
258 | wx/vector.h | |
259 | wx/version.h | |
260 | wx/volume.h | |
261 | wx/wfstream.h | |
262 | wx/wx.h | |
263 | wx/wxchar.h | |
264 | wx/wxprec.h | |
265 | wx/xti.h | |
266 | wx/xtistrm.h | |
267 | wx/zipstrm.h | |
268 | wx/zstream.h | |
269 | wx/msw/apptrait.h | |
270 | wx/msw/apptbase.h | |
271 | wx/msw/chkconf.h | |
272 | wx/msw/crashrpt.h | |
273 | wx/msw/dde.h | |
107d0fd4 | 274 | wx/msw/debughlp.h |
d10382ab VS |
275 | wx/msw/gccpriv.h |
276 | wx/msw/mimetype.h | |
107d0fd4 | 277 | wx/msw/stackwalk.h |
d10382ab VS |
278 | wx/msw/winundef.h |
279 | wx/msw/wrapcctl.h | |
280 | wx/msw/wrapwin.h | |
281 | wx/fs_inet.h | |
282 | wx/gsocket.h | |
283 | wx/protocol/file.h | |
284 | wx/protocol/ftp.h | |
285 | wx/protocol/http.h | |
286 | wx/protocol/protocol.h | |
287 | wx/sckaddr.h | |
288 | wx/sckipc.h | |
289 | wx/sckstrm.h | |
290 | wx/socket.h | |
291 | wx/url.h | |
292 | wx/msw/gsockmsw.h | |
293 | wx/xml/xml.h | |
294 | wx/xtixml.h | |
295 | wx/db.h | |
296 | wx/dbkeyg.h | |
297 | wx/dbtable.h | |
298 | EOF | |
299 | # --- wxBase headers list ends here --- | |
300 | for f in `cat wxbase-headers-list` ; do | |
68b47b2f | 301 | rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f |
4eba1840 | 302 | done |
4eba1840 VS |
303 | |
304 | # list of all core headers: | |
2fbef279 | 305 | find $RPM_BUILD_ROOT/usr/include/wx-* -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files |
4eba1840 VS |
306 | |
307 | # contrib stuff: | |
308 | (cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
4df9240f | 309 | (cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install) |
acea2a0b | 310 | |
88e3652f VS |
311 | # remove wxBase files so that RPM doesn't complain about unpackaged files: |
312 | rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base* | |
2fbef279 | 313 | rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a |
88e3652f VS |
314 | rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/* |
315 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/* | |
316 | ||
c16d2763 VS |
317 | %clean |
318 | rm -rf $RPM_BUILD_ROOT | |
319 | ||
f14a5b55 RR |
320 | %post |
321 | /sbin/ldconfig | |
322 | ||
323 | %postun | |
324 | /sbin/ldconfig | |
325 | ||
81edbb3f VS |
326 | %post gl |
327 | /sbin/ldconfig | |
328 | ||
329 | %postun gl | |
330 | /sbin/ldconfig | |
331 | ||
2fbef279 VZ |
332 | %post devel |
333 | # link wx-config when you install RPM. | |
334 | ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/wx-config | |
335 | # link wx-config with explicit name. | |
336 | ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/%{wxconfiglinkname} | |
337 | ||
338 | %preun devel | |
339 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
340 | SUM1=`md5sum %{_libdir}/wx/config/%{wxconfigname} | cut -c 0-32` | |
341 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
342 | if test "x$SUM1" = "x$SUM2" ; then | |
343 | rm -f %{_bindir}/wx-config | |
344 | fi | |
345 | fi | |
346 | ||
347 | rm -f %{_bindir}/%{wxconfiglinkname} | |
81edbb3f | 348 | |
4eba1840 | 349 | %files |
81edbb3f VS |
350 | %defattr(-,root,root) |
351 | %doc COPYING.LIB *.txt | |
4eba1840 VS |
352 | %{_libdir}/libwx_%{portname}*_core*.so.* |
353 | %{_libdir}/libwx_%{portname}*_html*.so.* | |
354 | %{_libdir}/libwx_%{portname}*_adv*.so.* | |
2fbef279 | 355 | %{_libdir}/libwx_%{portname}*_media*.so.* |
4eba1840 VS |
356 | %if !%{unicode} |
357 | %{_libdir}/libwx_%{portname}*_dbgrid*.so.* | |
358 | %endif | |
641d87d8 | 359 | |
4eba1840 | 360 | %files devel -f core-headers.files |
0f7deca9 | 361 | %defattr(-,root,root) |
4eba1840 VS |
362 | %{_libdir}/libwx_%{portname}*_core*.so |
363 | %{_libdir}/libwx_%{portname}*_html*.so | |
364 | %{_libdir}/libwx_%{portname}*_adv*.so | |
2fbef279 | 365 | %{_libdir}/libwx_%{portname}*_media*.so |
4eba1840 VS |
366 | %if !%{unicode} |
367 | %{_libdir}/libwx_%{portname}*_dbgrid*.so | |
368 | %endif | |
369 | %{_libdir}/libwx_%{portname}*_gl*.so | |
81edbb3f VS |
370 | %dir %{_libdir}/wx |
371 | %{_libdir}/wx/* | |
2a29700e | 372 | |
c661ecca | 373 | %files gl |
81edbb3f | 374 | %defattr(-,root,root) |
4eba1840 | 375 | %{_libdir}/libwx_%{portname}*_gl*.so.* |
0f7deca9 | 376 | |
5dcf9614 VS |
377 | %files static |
378 | %defattr (-,root,root) | |
4eba1840 VS |
379 | %{_libdir}/libwx_gtk*.a |
380 | ||
381 | %files contrib | |
382 | %defattr(-,root,root) | |
383 | %{_libdir}/libwx_%{portname}*_animate*.so.* | |
384 | %{_libdir}/libwx_%{portname}*_deprecated*.so.* | |
385 | %{_libdir}/libwx_%{portname}*_fl*.so.* | |
386 | %{_libdir}/libwx_%{portname}*_gizmos*.so.* | |
387 | %{_libdir}/libwx_%{portname}*_mmedia*.so.* | |
4eba1840 | 388 | %{_libdir}/libwx_%{portname}*_ogl*.so.* |
4eba1840 VS |
389 | %{_libdir}/libwx_%{portname}*_plot*.so.* |
390 | %{_libdir}/libwx_%{portname}*_stc*.so.* | |
391 | %{_libdir}/libwx_%{portname}*_svg*.so.* | |
392 | %{_libdir}/libwx_%{portname}*_xrc*.so.* | |
393 | ||
394 | %files contrib-devel | |
395 | %defattr(-,root,root) | |
2fbef279 | 396 | %{_bindir}/wxrc* |
68b47b2f VS |
397 | %dir %{_includedir}/wx-*/wx/animate |
398 | %{_includedir}/wx-*/wx/animate/* | |
4eba1840 VS |
399 | %{_libdir}/libwx_%{portname}*_animate*.so |
400 | ||
68b47b2f VS |
401 | %dir %{_includedir}/wx-*/wx/deprecated |
402 | %{_includedir}/wx-*/wx/deprecated/* | |
4eba1840 VS |
403 | %{_libdir}/libwx_%{portname}*_deprecated*.so |
404 | ||
68b47b2f VS |
405 | %dir %{_includedir}/wx-*/wx/fl |
406 | %{_includedir}/wx-*/wx/fl/* | |
4eba1840 VS |
407 | %{_libdir}/libwx_%{portname}*_fl*.so |
408 | ||
68b47b2f VS |
409 | %dir %{_includedir}/wx-*/wx/gizmos |
410 | %{_includedir}/wx-*/wx/gizmos/* | |
4eba1840 VS |
411 | %{_libdir}/libwx_%{portname}*_gizmos*.so |
412 | ||
68b47b2f VS |
413 | %dir %{_includedir}/wx-*/wx/mmedia |
414 | %{_includedir}/wx-*/wx/mmedia/* | |
4eba1840 VS |
415 | %{_libdir}/libwx_%{portname}*_mmedia*.so |
416 | ||
68b47b2f VS |
417 | %dir %{_includedir}/wx-*/wx/ogl |
418 | %{_includedir}/wx-*/wx/ogl/* | |
4eba1840 | 419 | %{_libdir}/libwx_%{portname}*_ogl*.so |
4eba1840 | 420 | |
68b47b2f VS |
421 | %dir %{_includedir}/wx-*/wx/plot |
422 | %{_includedir}/wx-*/wx/plot/* | |
4eba1840 VS |
423 | %{_libdir}/libwx_%{portname}*_plot*.so |
424 | ||
68b47b2f VS |
425 | %dir %{_includedir}/wx-*/wx/stc |
426 | %{_includedir}/wx-*/wx/stc/* | |
4eba1840 VS |
427 | %{_libdir}/libwx_%{portname}*_stc*.so |
428 | ||
68b47b2f VS |
429 | %dir %{_includedir}/wx-*/wx/svg |
430 | %{_includedir}/wx-*/wx/svg/* | |
4eba1840 VS |
431 | %{_libdir}/libwx_%{portname}*_svg*.so |
432 | ||
68b47b2f VS |
433 | %dir %{_includedir}/wx-*/wx/xrc |
434 | %{_includedir}/wx-*/wx/xrc/* | |
4eba1840 | 435 | %{_libdir}/libwx_%{portname}*_xrc*.so |