]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxGTK.spec
Ukrainian translations update from Yuri Chornoivan.
[wxWidgets.git] / wxGTK.spec
... / ...
CommitLineData
1%define _prefix /usr
2%define ver 2.9.4
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/eventfilter.h
230wx/evtloop.h
231wx/except.h
232wx/features.h
233wx/flags.h
234wx/ffile.h
235wx/file.h
236wx/fileconf.h
237wx/filefn.h
238wx/filename.h
239wx/filesys.h
240wx/fontenc.h
241wx/fontmap.h
242wx/fs_arc.h
243wx/fs_filter.h
244wx/fs_mem.h
245wx/fs_zip.h
246wx/hash.h
247wx/hashmap.h
248wx/hashset.h
249wx/html/forcelnk.h
250wx/iconloc.h
251wx/init.h
252wx/intl.h
253wx/iosfwrap.h
254wx/ioswrap.h
255wx/ipc.h
256wx/ipcbase.h
257wx/kbdstate.h
258wx/language.h
259wx/link.h
260wx/list.h
261wx/listimpl.cpp
262wx/log.h
263wx/longlong.h
264wx/math.h
265wx/memconf.h
266wx/memory.h
267wx/memtext.h
268wx/mimetype.h
269wx/module.h
270wx/mousestate.h
271wx/msgout.h
272wx/msgqueue.h
273wx/mstream.h
274wx/numformatter.h
275wx/object.h
276wx/platform.h
277wx/platinfo.h
278wx/power.h
279wx/process.h
280wx/ptr_scpd.h
281wx/ptr_shrd.h
282wx/recguard.h
283wx/regex.h
284wx/rtti.h
285wx/scopedarray.h
286wx/scopedptr.h
287wx/scopeguard.h
288wx/sharedptr.h
289wx/snglinst.h
290wx/sstream.h
291wx/stack.h
292wx/stackwalk.h
293wx/stdpaths.h
294wx/stdstream.h
295wx/stockitem.h
296wx/stopwatch.h
297wx/strconv.h
298wx/stream.h
299wx/string.h
300wx/stringimpl.h
301wx/stringops.h
302wx/strvararg.h
303wx/sysopt.h
304wx/tarstrm.h
305wx/textbuf.h
306wx/textfile.h
307wx/thread.h
308wx/thrimpl.cpp
309wx/time.h
310wx/timer.h
311wx/tls.h
312wx/tokenzr.h
313wx/tracker.h
314wx/translation.h
315wx/txtstrm.h
316wx/typeinfo.h
317wx/types.h
318wx/unichar.h
319wx/uri.h
320wx/ustring.h
321wx/utils.h
322wx/variant.h
323wx/vector.h
324wx/version.h
325wx/versioninfo.h
326wx/volume.h
327wx/weakref.h
328wx/wfstream.h
329wx/wx.h
330wx/wxchar.h
331wx/wxcrt.h
332wx/wxcrtbase.h
333wx/wxcrtvararg.h
334wx/wxprec.h
335wx/xlocale.h
336wx/xti.h
337wx/xti2.h
338wx/xtistrm.h
339wx/xtictor.h
340wx/xtihandler.h
341wx/xtiprop.h
342wx/xtitypes.h
343wx/zipstrm.h
344wx/zstream.h
345wx/meta/convertible.h
346wx/meta/if.h
347wx/meta/implicitconversion.h
348wx/meta/int2type.h
349wx/meta/movable.h
350wx/meta/pod.h
351wx/fswatcher.h
352wx/generic/fswatcher.h
353wx/unix/app.h
354wx/unix/apptbase.h
355wx/unix/apptrait.h
356wx/unix/chkconf.h
357wx/unix/evtloop.h
358wx/unix/evtloopsrc.h
359wx/unix/pipe.h
360wx/unix/stdpaths.h
361wx/unix/stackwalk.h
362wx/unix/tls.h
363wx/unix/fswatcher_kqueue.h
364wx/unix/execute.h
365wx/unix/mimetype.h
366wx/unix/fswatcher_inotify.h
367wx/fs_inet.h
368wx/protocol/file.h
369wx/protocol/ftp.h
370wx/protocol/http.h
371wx/protocol/log.h
372wx/protocol/protocol.h
373wx/sckaddr.h
374wx/sckipc.h
375wx/sckstrm.h
376wx/socket.h
377wx/url.h
378wx/xml/xml.h
379wx/xtixml.h
380EOF
381# --- wxBase headers list ends here ---
382
383# --- wxBase headers list with paths ---
384sed -e 's@^@%{_includedir}/wx-%{ver2}/@' wxbase-headers.files > wxbase-headers.paths
385
386
387# temporarily remove base headers
388mkdir $RPM_BUILD_ROOT/_save_dir
389cp -r $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT/_save_dir
390for f in `cat wxbase-headers.files` ; do
391 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
392done
393# list of all core headers:
394find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
395# move base headers (actually all headers) back again
396cp -f -r $RPM_BUILD_ROOT/_save_dir/* $RPM_BUILD_ROOT%{_includedir}
397rm -rf $RPM_BUILD_ROOT/_save_dir
398
399# utils:
400(cd obj-shared/utils/wxrc; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
401
402# wx-config link is created during package installation, remove it for now
403rm -f $RPM_BUILD_ROOT%{_bindir}/wx-config
404
405%clean
406rm -rf $RPM_BUILD_ROOT
407
408%post
409/sbin/ldconfig
410
411%postun
412/sbin/ldconfig
413
414%post devel
415# link wx-config when you install RPM.
416%if %{unicode}
417 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
418%endif
419# link wx-config with explicit name.
420ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
421/sbin/ldconfig
422
423%postun devel
424/sbin/ldconfig
425
426%preun devel
427%if %{unicode}
428 rm -f %{_bindir}/wx-config
429%endif
430rm -f %{_bindir}/%{wxconfiglink}
431
432%post -n %{wxbasename}
433/sbin/ldconfig
434
435%postun -n %{wxbasename}
436/sbin/ldconfig
437
438%post -n %{wxbasename}-devel
439# link wx-config with explicit name.
440ln -sf %{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
441/sbin/ldconfig
442
443%postun -n %{wxbasename}-devel
444/sbin/ldconfig
445
446%preun -n %{wxbasename}-devel
447rm -f %{_bindir}/%{wxbaseconfiglink}
448
449%post gl
450/sbin/ldconfig
451
452%postun gl
453/sbin/ldconfig
454
455%files
456%defattr(-,root,root)
457%doc COPYING.LIB *.txt
458%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.*
459%{_libdir}/libwx_%{buildname}_aui-%{ver2}.so.*
460%{_libdir}/libwx_%{buildname}_core-%{ver2}.so.*
461%{_libdir}/libwx_%{buildname}_html-%{ver2}.so.*
462%{_libdir}/libwx_%{buildname}_media-%{ver2}.so.*
463%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so.*
464%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.*
465%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so.*
466%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so.*
467%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.*
468%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.*
469
470%files -n wx-i18n
471%defattr(-,root,root)
472%{_datadir}/locale/*/LC_MESSAGES/*.mo
473
474%files devel -f core-headers.files
475%defattr(-,root,root)
476# shared libs
477%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so
478%{_libdir}/libwx_%{buildname}_aui-%{ver2}.so
479%{_libdir}/libwx_%{buildname}_core-%{ver2}.so
480%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so
481%{_libdir}/libwx_%{buildname}_html-%{ver2}.so
482%{_libdir}/libwx_%{buildname}_media-%{ver2}.so
483%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so
484%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so
485%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so
486%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so
487%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so
488%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so
489# static libs
490%{_libdir}/libwx_%{buildname}_adv-%{ver2}.a
491%{_libdir}/libwx_%{buildname}_aui-%{ver2}.a
492%{_libdir}/libwx_%{buildname}_core-%{ver2}.a
493%{_libdir}/libwx_%{buildname}_gl-%{ver2}.a
494%{_libdir}/libwx_%{buildname}_html-%{ver2}.a
495%{_libdir}/libwx_%{buildname}_media-%{ver2}.a
496%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.a
497%{_libdir}/libwx_%{buildname}_qa-%{ver2}.a
498%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.a
499%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.a
500%{_libdir}/libwx_%{buildname}_stc-%{ver2}.a
501%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a
502%dir %{_libdir}/wx
503%{_libdir}/wx/config/%{wxconfig}
504%{_libdir}/wx/include/%{wxconfig}/wx/setup.h
505%{_libdir}/wx/config/%{wxconfigstatic}
506%{_libdir}/wx/include/%{wxconfigstatic}/wx/setup.h
507%{_bindir}/wxrc*
508
509%files -n %{wxbasename}
510%defattr(-,root,root)
511%{_libdir}/libwx_base*-%{ver2}.so.*
512
513%files -n %{wxbasename}-devel -f wxbase-headers.paths
514%defattr (-,root,root)
515%dir %{_includedir}/wx-%{ver2}
516%{_libdir}/libwx_base*-%{ver2}.so
517%{_libdir}/libwx_base*-%{ver2}.a
518%if %{unicode}
519 %{_libdir}/libwxregexu-%{ver2}.a
520%endif
521%{_libdir}/libwxscintilla-%{ver2}.a
522%dir %{_libdir}/wx
523%{_datadir}/aclocal/*.m4
524%{_datadir}/bakefile/presets/*
525
526%files gl
527%defattr(-,root,root)
528%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.*