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