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