]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxX11.spec
Fix mismatches between format strings and arguments.
[wxWidgets.git] / wxX11.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.9.2
3%define ver2 2.9
4%define rel 1
5
6# Configurable settings (use --with(out) unicode 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 portname x11univ
12
13%if %{unicode}
14 %define wxbasename wx-base-unicode
15 %define name wx-%{portname}-unicode
16 %define wxconfig %{portname}-unicode-release-%{ver2}
17 %define wxconfiglink wx%{portname}u-%{ver2}-config
18%else
19 %define wxbasename wx-base
20 %define name wx-%{portname}
21 %define wxconfig %{portname}-ansi-release-%{ver2}
22 %define wxconfiglink wx%{portname}-%{ver2}-config
23%endif
24
25Summary: The X11 port of the wxWidgets library
26Name: %{name}
27Version: %{ver}
28Release: %{rel}
29License: wxWindows Licence
30Group: X11/Libraries
31Source: wxX11-%{ver}.tar.bz2
32URL: http://www.wxwidgets.org
33Packager: Vadim Zeitlin <vadim@wxwindows.org>
34Prefix: %{pref}
35BuildRoot: %{_tmppath}/%{name}-root
36Requires: %{wxbasename} = %{ver}
37
38# all packages providing an implementation of wxWidgets library (regardless of
39# the toolkit used) should provide the (virtual) wxwin package, this makes it
40# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
41Provides: wxwin
42Provides: wxX11
43
44%description
45wxWidgets is a free C++ library for cross-platform GUI development.
46With wxWidgets, you can create applications for different GUIs (GTK+,
47Motif/LessTif, MS Windows, Mac) from the same source code.
48
49%package devel
50Summary: The X11 port of the wxWidgets library
51Group: X11/Libraries
52Requires: %{name} = %{ver}
53Requires: %{wxbasename}-devel = %{ver}
54
55%description devel
56Header files for wxX11, the X11 port of the wxWidgets library.
57
58%package gl
59Summary: The X11 port of the wxWidgets library, OpenGL add-on.
60Group: X11/Libraries
61Requires: %{name} = %{ver}
62
63%description gl
64OpenGL add-on library for wxX11, the X11 port of the wxWidgets library.
65
66%package static
67Summary: wxX11 static libraries
68Group: Development/Libraries
69Requires: %{wxbasename}-static
70Requires: %{name}-devel = %{ver}
71
72%description static
73Static libraries for wxX11. You need them if you want to link statically against wxX11.
74
75%package contrib
76Summary: Contrib libraries for wxX11.
77Group: X11/Libraries
78Requires: %{name} = %{ver}
79
80%description contrib
81Contributed libraries for wxX11.
82
83%package contrib-devel
84Summary: Contrib libraries for wxX11.
85Group: X11/Libraries
86Requires: %{name}-contrib = %{ver}
87Requires: %{name}-devel = %{ver}
88
89%description contrib-devel
90Header files for contributed libraries for wxX11.
91
92%prep
93%setup -q -n wxX11-%{ver}
94
95%build
96if [ "$SMP" != "" ]; then
97 export MAKE="make -j$SMP"
98else
99 export MAKE="make"
100fi
101
102mkdir obj-shared
103cd obj-shared
104../configure --prefix=%{pref} --with-x11 \
105%if %{unicode}
106 --enable-unicode \
107%else
108 --disable-unicode \
109%endif
110$MAKE
111
112cd contrib/src
113$MAKE
114cd ../../..
115
116mkdir obj-static
117cd obj-static
118../configure --prefix=%{pref} --with-x11 --disable-shared \
119%if %{unicode}
120 --enable-unicode \
121%else
122 --disable-unicode \
123%endif
124 --with-opengl
125$MAKE
126cd ..
127
128%install
129rm -rf $RPM_BUILD_ROOT
130(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
131(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
132
133# Remove headers that are part of wx-base-devel:
134
135# --- wxBase headers list begins here ---
136cat <<EOF >wxbase-headers.files
137wx/afterstd.h
138wx/any.h
139wx/anystr.h
140wx/app.h
141wx/apptrait.h
142wx/archive.h
143wx/arrimpl.cpp
144wx/arrstr.h
145wx/atomic.h
146wx/base64.h
147wx/beforestd.h
148wx/buffer.h
149wx/build.h
150wx/chartype.h
151wx/checkeddelete.h
152wx/chkconf.h
153wx/clntdata.h
154wx/cmdargs.h
155wx/cmdline.h
156wx/confbase.h
157wx/config.h
158wx/convauto.h
159wx/containr.h
160wx/cpp.h
161wx/crt.h
162wx/datetime.h
163wx/datstrm.h
164wx/dde.h
165wx/debug.h
166wx/defs.h
167wx/dir.h
168wx/dlimpexp.h
169wx/dlist.h
170wx/dynarray.h
171wx/dynlib.h
172wx/dynload.h
173wx/encconv.h
174wx/event.h
175wx/evtloop.h
176wx/except.h
177wx/features.h
178wx/flags.h
179wx/ffile.h
180wx/file.h
181wx/fileconf.h
182wx/filefn.h
183wx/filename.h
184wx/filesys.h
185wx/fontenc.h
186wx/fontmap.h
187wx/fs_arc.h
188wx/fs_filter.h
189wx/fs_mem.h
190wx/fs_zip.h
191wx/hash.h
192wx/hashmap.h
193wx/hashset.h
194wx/html/forcelnk.h
195wx/iconloc.h
196wx/init.h
197wx/intl.h
198wx/iosfwrap.h
199wx/ioswrap.h
200wx/ipc.h
201wx/ipcbase.h
202wx/kbdstate.h
203wx/language.h
204wx/link.h
205wx/list.h
206wx/listimpl.cpp
207wx/log.h
208wx/longlong.h
209wx/math.h
210wx/memconf.h
211wx/memory.h
212wx/memtext.h
213wx/mimetype.h
214wx/module.h
215wx/mousestate.h
216wx/msgout.h
217wx/msgqueue.h
218wx/mstream.h
219wx/object.h
220wx/platform.h
221wx/platinfo.h
222wx/power.h
223wx/process.h
224wx/ptr_scpd.h
225wx/ptr_shrd.h
226wx/recguard.h
227wx/regex.h
228wx/scopedarray.h
229wx/scopedptr.h
230wx/scopeguard.h
231wx/sharedptr.h
232wx/snglinst.h
233wx/sstream.h
234wx/stack.h
235wx/stackwalk.h
236wx/stdpaths.h
237wx/stdstream.h
238wx/stockitem.h
239wx/stopwatch.h
240wx/strconv.h
241wx/stream.h
242wx/string.h
243wx/stringimpl.h
244wx/stringops.h
245wx/strvararg.h
246wx/sysopt.h
247wx/tarstrm.h
248wx/textbuf.h
249wx/textfile.h
250wx/thread.h
251wx/thrimpl.cpp
252wx/timer.h
253wx/tls.h
254wx/tokenzr.h
255wx/tracker.h
256wx/translation.h
257wx/txtstrm.h
258wx/typeinfo.h
259wx/types.h
260wx/unichar.h
261wx/uri.h
262wx/ustring.h
263wx/utils.h
264wx/variant.h
265wx/vector.h
266wx/version.h
267wx/volume.h
268wx/weakref.h
269wx/wfstream.h
270wx/wx.h
271wx/wxchar.h
272wx/wxcrt.h
273wx/wxcrtbase.h
274wx/wxcrtvararg.h
275wx/wxprec.h
276wx/xlocale.h
277wx/xti.h
278wx/xtistrm.h
279wx/zipstrm.h
280wx/zstream.h
281wx/meta/convertible.h
282wx/meta/if.h
283wx/meta/int2type.h
284wx/meta/movable.h
285wx/meta/pod.h
286wx/fswatcher.h
287wx/generic/fswatcher.h
288wx/unix/app.h
289wx/unix/apptbase.h
290wx/unix/apptrait.h
291wx/unix/chkconf.h
292wx/unix/evtloop.h
293wx/unix/evtloopsrc.h
294wx/unix/pipe.h
295wx/unix/stdpaths.h
296wx/unix/stackwalk.h
297wx/unix/tls.h
298wx/unix/fswatcher_kqueue.h
299wx/unix/execute.h
300wx/unix/mimetype.h
301wx/unix/fswatcher_inotify.h
302wx/fs_inet.h
303wx/protocol/file.h
304wx/protocol/ftp.h
305wx/protocol/http.h
306wx/protocol/log.h
307wx/protocol/protocol.h
308wx/sckaddr.h
309wx/sckipc.h
310wx/sckstrm.h
311wx/socket.h
312wx/url.h
313wx/xml/xml.h
314wx/xtixml.h
315EOF
316# --- wxBase headers list ends here ---
317for f in `cat wxbase-headers-list` ; do
318 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
319done
320
321# list of all core headers:
322find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
323
324# contrib stuff:
325(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
326(cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
327
328# remove wxBase files so that RPM doesn't complain about unpackaged files:
329rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
330%if %{unicode}
331 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
332%endif
333rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
334rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
335
336%clean
337rm -rf $RPM_BUILD_ROOT
338
339%post
340/sbin/ldconfig
341
342%postun
343/sbin/ldconfig
344
345%post devel
346# link wx-config when you install RPM.
347ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
348# link wx-config with explicit name.
349ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
350/sbin/ldconfig
351
352%postun devel
353/sbin/ldconfig
354
355%preun devel
356if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
357 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
358 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
359 if test "x$SUM1" = "x$SUM2" ; then
360 rm -f %{_bindir}/wx-config
361 fi
362fi
363rm -f %{_bindir}/%{wxconfiglink}
364
365%post gl
366/sbin/ldconfig
367
368%postun gl
369/sbin/ldconfig
370
371%post contrib
372/sbin/ldconfig
373
374%postun contrib
375/sbin/ldconfig
376
377%post contrib-devel
378/sbin/ldconfig
379
380%postun contrib-devel
381/sbin/ldconfig
382
383%files
384%defattr(-,root,root)
385%doc COPYING.LIB *.txt
386%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
387%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
388%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
389%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
390%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
391%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
392
393
394%files devel -f core-headers.files
395%defattr(-,root,root)
396%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
397%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
398%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
399%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
400%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
401%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
402%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
403%dir %{_libdir}/wx
404%{_libdir}/wx/*
405%{_bindir}/wxrc*
406
407%files gl
408%defattr(-,root,root)
409%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
410
411%files static
412%defattr (-,root,root)
413%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
414
415%files contrib
416%defattr(-,root,root)
417%{_libdir}/libwx_%{portname}*_animate-%{ver2}.so.*
418%{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so.*
419%{_libdir}/libwx_%{portname}*_fl-%{ver2}.so.*
420%{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so.*
421%{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so.*
422%{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so.*
423%{_libdir}/libwx_%{portname}*_plot-%{ver2}.so.*
424%{_libdir}/libwx_%{portname}*_stc-%{ver2}.so.*
425%{_libdir}/libwx_%{portname}*_svg-%{ver2}.so.*
426
427%files contrib-devel
428%defattr(-,root,root)
429%dir %{_includedir}/wx-%{ver2}/wx/animate
430%{_includedir}/wx-%{ver2}/wx/animate/*
431%{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
432
433%dir %{_includedir}/wx-%{ver2}/wx/deprecated
434%{_includedir}/wx-%{ver2}/wx/deprecated/*
435%{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
436
437%dir %{_includedir}/wx-%{ver2}/wx/fl
438%{_includedir}/wx-%{ver2}/wx/fl/*
439%{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
440
441%dir %{_includedir}/wx-%{ver2}/wx/gizmos
442%{_includedir}/wx-%{ver2}/wx/gizmos/*
443%{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
444
445%dir %{_includedir}/wx-%{ver2}/wx/mmedia
446%{_includedir}/wx-%{ver2}/wx/mmedia/*
447%{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
448
449%dir %{_includedir}/wx-%{ver2}/wx/ogl
450%{_includedir}/wx-%{ver2}/wx/ogl/*
451%{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
452
453%dir %{_includedir}/wx-%{ver2}/wx/plot
454%{_includedir}/wx-%{ver2}/wx/plot/*
455%{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
456
457%dir %{_includedir}/wx-%{ver2}/wx/stc
458%{_includedir}/wx-%{ver2}/wx/stc/*
459%{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
460
461%dir %{_includedir}/wx-%{ver2}/wx/svg
462%{_includedir}/wx-%{ver2}/wx/svg/*
463%{_libdir}/libwx_%{portname}*_svg-%{ver2}.so