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