]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxMotif.spec
Use /bin/echo for creation of Mac OS X PkgInfo files.
[wxWidgets.git] / wxMotif.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.9.4
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-%{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%prep
63%setup -q -n wxMotif-%{ver}
64
65%build
66if [ "$SMP" != "" ]; then
67 export MAKE="make -j$SMP"
68else
69 export MAKE="make"
70fi
71
72mkdir obj-shared
73cd obj-shared
74../configure --prefix=%{pref} --with-motif --with-opengl
75$MAKE
76cd ..
77
78mkdir obj-static
79cd obj-static
80../configure --prefix=%{pref} --with-motif --disable-shared --with-opengl
81$MAKE
82cd ..
83
84%install
85rm -rf $RPM_BUILD_ROOT
86(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
87(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
88
89# Remove headers that are part of wx-base-devel:
90
91# --- wxBase headers list begins here ---
92cat <<EOF >wxbase-headers.files
93wx/afterstd.h
94wx/any.h
95wx/anystr.h
96wx/app.h
97wx/apptrait.h
98wx/archive.h
99wx/arrimpl.cpp
100wx/arrstr.h
101wx/atomic.h
102wx/base64.h
103wx/beforestd.h
104wx/buffer.h
105wx/build.h
106wx/chartype.h
107wx/checkeddelete.h
108wx/chkconf.h
109wx/clntdata.h
110wx/cmdargs.h
111wx/cmdline.h
112wx/confbase.h
113wx/config.h
114wx/convauto.h
115wx/containr.h
116wx/cpp.h
117wx/crt.h
118wx/datetime.h
119wx/datstrm.h
120wx/dde.h
121wx/debug.h
122wx/defs.h
123wx/dir.h
124wx/dlimpexp.h
125wx/dlist.h
126wx/dynarray.h
127wx/dynlib.h
128wx/dynload.h
129wx/encconv.h
130wx/event.h
131wx/eventfilter.h
132wx/evtloop.h
133wx/except.h
134wx/features.h
135wx/flags.h
136wx/ffile.h
137wx/file.h
138wx/fileconf.h
139wx/filefn.h
140wx/filename.h
141wx/filesys.h
142wx/fontenc.h
143wx/fontmap.h
144wx/fs_arc.h
145wx/fs_filter.h
146wx/fs_mem.h
147wx/fs_zip.h
148wx/hash.h
149wx/hashmap.h
150wx/hashset.h
151wx/html/forcelnk.h
152wx/iconloc.h
153wx/init.h
154wx/intl.h
155wx/iosfwrap.h
156wx/ioswrap.h
157wx/ipc.h
158wx/ipcbase.h
159wx/kbdstate.h
160wx/language.h
161wx/link.h
162wx/list.h
163wx/listimpl.cpp
164wx/log.h
165wx/longlong.h
166wx/math.h
167wx/memconf.h
168wx/memory.h
169wx/memtext.h
170wx/mimetype.h
171wx/module.h
172wx/mousestate.h
173wx/msgout.h
174wx/msgqueue.h
175wx/mstream.h
176wx/numformatter.h
177wx/object.h
178wx/platform.h
179wx/platinfo.h
180wx/power.h
181wx/process.h
182wx/ptr_scpd.h
183wx/ptr_shrd.h
184wx/recguard.h
185wx/regex.h
186wx/rtti.h
187wx/scopedarray.h
188wx/scopedptr.h
189wx/scopeguard.h
190wx/sharedptr.h
191wx/snglinst.h
192wx/sstream.h
193wx/stack.h
194wx/stackwalk.h
195wx/stdpaths.h
196wx/stdstream.h
197wx/stockitem.h
198wx/stopwatch.h
199wx/strconv.h
200wx/stream.h
201wx/string.h
202wx/stringimpl.h
203wx/stringops.h
204wx/strvararg.h
205wx/sysopt.h
206wx/tarstrm.h
207wx/textbuf.h
208wx/textfile.h
209wx/thread.h
210wx/thrimpl.cpp
211wx/time.h
212wx/timer.h
213wx/tls.h
214wx/tokenzr.h
215wx/tracker.h
216wx/translation.h
217wx/txtstrm.h
218wx/typeinfo.h
219wx/types.h
220wx/unichar.h
221wx/uri.h
222wx/ustring.h
223wx/utils.h
224wx/variant.h
225wx/vector.h
226wx/version.h
227wx/versioninfo.h
228wx/volume.h
229wx/weakref.h
230wx/wfstream.h
231wx/wx.h
232wx/wxchar.h
233wx/wxcrt.h
234wx/wxcrtbase.h
235wx/wxcrtvararg.h
236wx/wxprec.h
237wx/xlocale.h
238wx/xti.h
239wx/xti2.h
240wx/xtistrm.h
241wx/xtictor.h
242wx/xtihandler.h
243wx/xtiprop.h
244wx/xtitypes.h
245wx/zipstrm.h
246wx/zstream.h
247wx/meta/convertible.h
248wx/meta/if.h
249wx/meta/implicitconversion.h
250wx/meta/int2type.h
251wx/meta/movable.h
252wx/meta/pod.h
253wx/fswatcher.h
254wx/generic/fswatcher.h
255wx/unix/app.h
256wx/unix/apptbase.h
257wx/unix/apptrait.h
258wx/unix/chkconf.h
259wx/unix/evtloop.h
260wx/unix/evtloopsrc.h
261wx/unix/pipe.h
262wx/unix/stdpaths.h
263wx/unix/stackwalk.h
264wx/unix/tls.h
265wx/unix/fswatcher_kqueue.h
266wx/unix/execute.h
267wx/unix/mimetype.h
268wx/unix/fswatcher_inotify.h
269wx/fs_inet.h
270wx/protocol/file.h
271wx/protocol/ftp.h
272wx/protocol/http.h
273wx/protocol/log.h
274wx/protocol/protocol.h
275wx/sckaddr.h
276wx/sckipc.h
277wx/sckstrm.h
278wx/socket.h
279wx/url.h
280wx/xml/xml.h
281wx/xtixml.h
282EOF
283# --- wxBase headers list ends here ---
284for f in `cat wxbase-headers-list` ; do
285 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
286done
287
288# list of all core headers:
289find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
290
291# remove wxBase files so that RPM doesn't complain about unpackaged files:
292rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
293rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
294rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
295
296%clean
297rm -rf $RPM_BUILD_ROOT
298
299%post
300/sbin/ldconfig
301
302%postun
303/sbin/ldconfig
304
305%post devel
306# link wx-config when you install RPM.
307ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
308# link wx-config with explicit name.
309ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
310/sbin/ldconfig
311
312%postun devel
313/sbin/ldconfig
314
315%preun devel
316if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
317 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
318 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
319 if test "x$SUM1" = "x$SUM2" ; then
320 rm -f %{_bindir}/wx-config
321 fi
322fi
323rm -f %{_bindir}/%{wxconfiglink}
324
325%post gl
326/sbin/ldconfig
327
328%postun gl
329/sbin/ldconfig
330
331%files
332%defattr(-,root,root)
333%doc COPYING.LIB *.txt
334%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
335%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
336%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
337%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
338%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
339%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
340
341
342%files devel -f core-headers.files
343%defattr(-,root,root)
344%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
345%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
346%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
347%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
348%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
349%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
350%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
351%dir %{_libdir}/wx
352%{_libdir}/wx/*
353%{_bindir}/wxrc*
354
355%files gl
356%defattr(-,root,root)
357%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
358
359%files static
360%defattr (-,root,root)
361%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
362