]> git.saurik.com Git - wxWidgets.git/blob - wxGTK.spec
Italian translation corrections from Roberto Boriotti.
[wxWidgets.git] / wxGTK.spec
1 %define _prefix /usr
2 %define ver 2.9.3
3 %define ver2 2.9
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 gtk2
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-%{ver2}
33 %define wxconfigstatic %{portname}-unicode-static-%{ver2}
34 %define wxconfiglink wx%{portname}u-%{ver2}-config
35 %else
36 %define name wx-%{portname}-ansi
37 %define wxconfig %{portname}-ansi-%{ver2}
38 %define wxconfigstatic %{portname}-ansi-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-%{ver2}
45 %define wxbaseconfiglink wxbaseu-%{ver2}-config
46 %else
47 %define wxbasename wx-base-ansi
48 %define wxbaseconfig base-ansi-%{ver2}
49 %define wxbaseconfiglink wxbase-%{ver2}-config
50 %endif
51
52 Summary: The GTK+ %{gtkver} port of the wxWidgets library
53 Name: %{name}
54 Version: %{ver}
55 Release: %{rel}
56 License: wxWindows Licence
57 Group: X11/Libraries
58 Source: wxGTK-%{ver}.tar.bz2
59 URL: http://www.wxwidgets.org
60 Packager: Vadim Zeitlin <vadim@wxwindows.org>
61 Prefix: %{_prefix}
62 BuildRoot: %{_tmppath}/%{name}-root
63 Requires: %{wxbasename} = %{ver}
64 %if %{portname} == gtk2
65 BuildRequires: gtk2-devel
66 %else
67 BuildRequires: gtk+-devel >= 1.2.0
68 %endif
69
70 BuildRequires: zlib-devel, libjpeg-devel, libpng-devel, libtiff-devel
71
72 # all packages providing an implementation of wxWidgets library (regardless of
73 # the toolkit used) should provide the (virtual) wxwin package, this makes it
74 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
75 Provides: wxwin
76 Provides: wxGTK
77
78 %description
79 wxWidgets is a free C++ library for cross-platform GUI development.
80 With wxWidgets, you can create applications for different GUIs (GTK+,
81 Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.
82
83 %package -n wx-i18n
84 Summary: The translations for the wxWidgets library.
85 Group: X11/Libraries
86
87 %description -n wx-i18n
88 The translations files for the wxWidgets library.
89
90 %package devel
91 Summary: The GTK+ %{gtkver} port of the wxWidgets library
92 Group: X11/Libraries
93 Requires: %{name} = %{ver}
94 Requires: %{wxbasename}-devel = %{ver}
95 Provides: wxGTK-devel
96
97 %description devel
98 The GTK+ %{gtkver} port of the wxWidgets library, header files.
99
100 %package gl
101 Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on.
102 Group: X11/Libraries
103 Requires: %{name} = %{ver}
104 Provides: wxGTK-gl
105
106 %description gl
107 OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
108
109 %package -n %{wxbasename}
110 Summary: wxBase library - non-GUI support classes of the wxWidgets toolkit
111 Group: Development/Libraries
112 Provides: wxBase
113
114 %description -n %{wxbasename}
115 wxBase is a collection of C++ classes providing basic data structures (strings,
116 lists, arrays), portable wrappers around many OS-specific funstions (file
117 operations, time/date manipulations, threads, processes, sockets, shared
118 library loading) as well as other utility classes (streams, archive and
119 compression). wxBase currently supports Win32, most Unix variants (Linux,
120 FreeBSD, Solaris, HP-UX) and MacOS X (Carbon and Mach-0).
121
122 %package -n %{wxbasename}-devel
123 Summary: wxBase library, header files.
124 Group: Development/Libraries
125 Provides: wxBase-devel
126
127 %description -n %{wxbasename}-devel
128 wxBase library - non-GUI support classes of the wxWidgets toolkit,
129 header files.
130
131 %prep
132 %setup -q -n wxGTK-%{ver}
133
134 %build
135 if [ "$SMP" != "" ]; then
136 export MAKE="make -j$SMP"
137 else
138 export MAKE="make"
139 fi
140
141 mkdir obj-shared
142 cd obj-shared
143 ../configure --prefix=%{_prefix} --libdir=%{_libdir} \
144 %if ! %{gtk2}
145 --with-gtk=1 \
146 %else
147 --with-gtk=2 \
148 %endif
149 %if %{unicode}
150 --enable-unicode \
151 %else
152 --disable-unicode \
153 %endif
154 --with-opengl \
155 --with-gnomeprint \
156 --enable-mediactrl
157 $MAKE
158
159 cd ..
160
161 mkdir obj-static
162 cd obj-static
163 ../configure --prefix=%{_prefix} --libdir=%{_libdir} \
164 %if ! %{gtk2}
165 --with-gtk=1 \
166 %else
167 --with-gtk=2 \
168 %endif
169 --disable-shared \
170 %if %{unicode}
171 --enable-unicode \
172 %else
173 --disable-unicode \
174 %endif
175 --with-opengl \
176 --with-gnomeprint \
177 --enable-mediactrl
178 $MAKE
179
180 cd ..
181
182 make -C locale allmo
183
184 %install
185 rm -rf $RPM_BUILD_ROOT
186 (cd obj-static; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
187 (cd obj-shared; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
188
189 # --- wxBase headers list begins here ---
190 cat <<EOF >wxbase-headers.files
191 wx/afterstd.h
192 wx/any.h
193 wx/anystr.h
194 wx/app.h
195 wx/apptrait.h
196 wx/archive.h
197 wx/arrimpl.cpp
198 wx/arrstr.h
199 wx/atomic.h
200 wx/base64.h
201 wx/beforestd.h
202 wx/buffer.h
203 wx/build.h
204 wx/chartype.h
205 wx/checkeddelete.h
206 wx/chkconf.h
207 wx/clntdata.h
208 wx/cmdargs.h
209 wx/cmdline.h
210 wx/confbase.h
211 wx/config.h
212 wx/convauto.h
213 wx/containr.h
214 wx/cpp.h
215 wx/crt.h
216 wx/datetime.h
217 wx/datstrm.h
218 wx/dde.h
219 wx/debug.h
220 wx/defs.h
221 wx/dir.h
222 wx/dlimpexp.h
223 wx/dlist.h
224 wx/dynarray.h
225 wx/dynlib.h
226 wx/dynload.h
227 wx/encconv.h
228 wx/event.h
229 wx/eventfilter.h
230 wx/evtloop.h
231 wx/except.h
232 wx/features.h
233 wx/flags.h
234 wx/ffile.h
235 wx/file.h
236 wx/fileconf.h
237 wx/filefn.h
238 wx/filename.h
239 wx/filesys.h
240 wx/fontenc.h
241 wx/fontmap.h
242 wx/fs_arc.h
243 wx/fs_filter.h
244 wx/fs_mem.h
245 wx/fs_zip.h
246 wx/hash.h
247 wx/hashmap.h
248 wx/hashset.h
249 wx/html/forcelnk.h
250 wx/iconloc.h
251 wx/init.h
252 wx/intl.h
253 wx/iosfwrap.h
254 wx/ioswrap.h
255 wx/ipc.h
256 wx/ipcbase.h
257 wx/kbdstate.h
258 wx/language.h
259 wx/link.h
260 wx/list.h
261 wx/listimpl.cpp
262 wx/log.h
263 wx/longlong.h
264 wx/math.h
265 wx/memconf.h
266 wx/memory.h
267 wx/memtext.h
268 wx/mimetype.h
269 wx/module.h
270 wx/mousestate.h
271 wx/msgout.h
272 wx/msgqueue.h
273 wx/mstream.h
274 wx/numformatter.h
275 wx/object.h
276 wx/platform.h
277 wx/platinfo.h
278 wx/power.h
279 wx/process.h
280 wx/ptr_scpd.h
281 wx/ptr_shrd.h
282 wx/recguard.h
283 wx/regex.h
284 wx/rtti.h
285 wx/scopedarray.h
286 wx/scopedptr.h
287 wx/scopeguard.h
288 wx/sharedptr.h
289 wx/snglinst.h
290 wx/sstream.h
291 wx/stack.h
292 wx/stackwalk.h
293 wx/stdpaths.h
294 wx/stdstream.h
295 wx/stockitem.h
296 wx/stopwatch.h
297 wx/strconv.h
298 wx/stream.h
299 wx/string.h
300 wx/stringimpl.h
301 wx/stringops.h
302 wx/strvararg.h
303 wx/sysopt.h
304 wx/tarstrm.h
305 wx/textbuf.h
306 wx/textfile.h
307 wx/thread.h
308 wx/thrimpl.cpp
309 wx/timer.h
310 wx/tls.h
311 wx/tokenzr.h
312 wx/tracker.h
313 wx/translation.h
314 wx/txtstrm.h
315 wx/typeinfo.h
316 wx/types.h
317 wx/unichar.h
318 wx/uri.h
319 wx/ustring.h
320 wx/utils.h
321 wx/variant.h
322 wx/vector.h
323 wx/version.h
324 wx/versioninfo.h
325 wx/volume.h
326 wx/weakref.h
327 wx/wfstream.h
328 wx/wx.h
329 wx/wxchar.h
330 wx/wxcrt.h
331 wx/wxcrtbase.h
332 wx/wxcrtvararg.h
333 wx/wxprec.h
334 wx/xlocale.h
335 wx/xti.h
336 wx/xti2.h
337 wx/xtistrm.h
338 wx/xtictor.h
339 wx/xtihandler.h
340 wx/xtiprop.h
341 wx/xtitypes.h
342 wx/zipstrm.h
343 wx/zstream.h
344 wx/meta/convertible.h
345 wx/meta/if.h
346 wx/meta/implicitconversion.h
347 wx/meta/int2type.h
348 wx/meta/movable.h
349 wx/meta/pod.h
350 wx/fswatcher.h
351 wx/generic/fswatcher.h
352 wx/unix/app.h
353 wx/unix/apptbase.h
354 wx/unix/apptrait.h
355 wx/unix/chkconf.h
356 wx/unix/evtloop.h
357 wx/unix/evtloopsrc.h
358 wx/unix/pipe.h
359 wx/unix/stdpaths.h
360 wx/unix/stackwalk.h
361 wx/unix/tls.h
362 wx/unix/fswatcher_kqueue.h
363 wx/unix/execute.h
364 wx/unix/mimetype.h
365 wx/unix/fswatcher_inotify.h
366 wx/fs_inet.h
367 wx/protocol/file.h
368 wx/protocol/ftp.h
369 wx/protocol/http.h
370 wx/protocol/log.h
371 wx/protocol/protocol.h
372 wx/sckaddr.h
373 wx/sckipc.h
374 wx/sckstrm.h
375 wx/socket.h
376 wx/url.h
377 wx/xml/xml.h
378 wx/xtixml.h
379 EOF
380 # --- wxBase headers list ends here ---
381
382 # --- wxBase headers list with paths ---
383 sed -e 's@^@%{_includedir}/wx-%{ver2}/@' wxbase-headers.files > wxbase-headers.paths
384
385
386 # temporarily remove base headers
387 mkdir $RPM_BUILD_ROOT/_save_dir
388 cp -r $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT/_save_dir
389 for f in `cat wxbase-headers.files` ; do
390 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
391 done
392 # list of all core headers:
393 find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
394 # move base headers (actually all headers) back again
395 cp -f -r $RPM_BUILD_ROOT/_save_dir/* $RPM_BUILD_ROOT%{_includedir}
396 rm -rf $RPM_BUILD_ROOT/_save_dir
397
398 # utils:
399 (cd obj-shared/utils/wxrc; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
400
401 # wx-config link is created during package installation, remove it for now
402 rm -f $RPM_BUILD_ROOT%{_bindir}/wx-config
403
404 %clean
405 rm -rf $RPM_BUILD_ROOT
406
407 %post
408 /sbin/ldconfig
409
410 %postun
411 /sbin/ldconfig
412
413 %post devel
414 # link wx-config when you install RPM.
415 %if %{unicode}
416 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
417 %endif
418 # link wx-config with explicit name.
419 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
420 /sbin/ldconfig
421
422 %postun devel
423 /sbin/ldconfig
424
425 %preun devel
426 %if %{unicode}
427 rm -f %{_bindir}/wx-config
428 %endif
429 rm -f %{_bindir}/%{wxconfiglink}
430
431 %post -n %{wxbasename}
432 /sbin/ldconfig
433
434 %postun -n %{wxbasename}
435 /sbin/ldconfig
436
437 %post -n %{wxbasename}-devel
438 # link wx-config with explicit name.
439 ln -sf %{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
440 /sbin/ldconfig
441
442 %postun -n %{wxbasename}-devel
443 /sbin/ldconfig
444
445 %preun -n %{wxbasename}-devel
446 rm -f %{_bindir}/%{wxbaseconfiglink}
447
448 %post gl
449 /sbin/ldconfig
450
451 %postun gl
452 /sbin/ldconfig
453
454 %files
455 %defattr(-,root,root)
456 %doc COPYING.LIB *.txt
457 %{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.*
458 %{_libdir}/libwx_%{buildname}_aui-%{ver2}.so.*
459 %{_libdir}/libwx_%{buildname}_core-%{ver2}.so.*
460 %{_libdir}/libwx_%{buildname}_html-%{ver2}.so.*
461 %{_libdir}/libwx_%{buildname}_media-%{ver2}.so.*
462 %{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so.*
463 %{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.*
464 %{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so.*
465 %{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so.*
466 %{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.*
467 %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.*
468
469 %files -n wx-i18n
470 %defattr(-,root,root)
471 %{_datadir}/locale/*/LC_MESSAGES/*.mo
472
473 %files devel -f core-headers.files
474 %defattr(-,root,root)
475 # shared libs
476 %{_libdir}/libwx_%{buildname}_adv-%{ver2}.so
477 %{_libdir}/libwx_%{buildname}_aui-%{ver2}.so
478 %{_libdir}/libwx_%{buildname}_core-%{ver2}.so
479 %{_libdir}/libwx_%{buildname}_gl-%{ver2}.so
480 %{_libdir}/libwx_%{buildname}_html-%{ver2}.so
481 %{_libdir}/libwx_%{buildname}_media-%{ver2}.so
482 %{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so
483 %{_libdir}/libwx_%{buildname}_qa-%{ver2}.so
484 %{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so
485 %{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so
486 %{_libdir}/libwx_%{buildname}_stc-%{ver2}.so
487 %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so
488 # static libs
489 %{_libdir}/libwx_%{buildname}_adv-%{ver2}.a
490 %{_libdir}/libwx_%{buildname}_aui-%{ver2}.a
491 %{_libdir}/libwx_%{buildname}_core-%{ver2}.a
492 %{_libdir}/libwx_%{buildname}_gl-%{ver2}.a
493 %{_libdir}/libwx_%{buildname}_html-%{ver2}.a
494 %{_libdir}/libwx_%{buildname}_media-%{ver2}.a
495 %{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.a
496 %{_libdir}/libwx_%{buildname}_qa-%{ver2}.a
497 %{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.a
498 %{_libdir}/libwx_%{buildname}_richtext-%{ver2}.a
499 %{_libdir}/libwx_%{buildname}_stc-%{ver2}.a
500 %{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a
501 %dir %{_libdir}/wx
502 %{_libdir}/wx/config/%{wxconfig}
503 %{_libdir}/wx/include/%{wxconfig}/wx/setup.h
504 %{_libdir}/wx/config/%{wxconfigstatic}
505 %{_libdir}/wx/include/%{wxconfigstatic}/wx/setup.h
506 %{_bindir}/wxrc*
507
508 %files -n %{wxbasename}
509 %defattr(-,root,root)
510 %{_libdir}/libwx_base*-%{ver2}.so.*
511
512 %files -n %{wxbasename}-devel -f wxbase-headers.paths
513 %defattr (-,root,root)
514 %dir %{_includedir}/wx-%{ver2}
515 %{_libdir}/libwx_base*-%{ver2}.so
516 %{_libdir}/libwx_base*-%{ver2}.a
517 %if %{unicode}
518 %{_libdir}/libwxregexu-%{ver2}.a
519 %endif
520 %{_libdir}/libwxscintilla-%{ver2}.a
521 %dir %{_libdir}/wx
522 %{_datadir}/aclocal/*.m4
523 %{_datadir}/bakefile/presets/*
524
525 %files gl
526 %defattr(-,root,root)
527 %{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.*