]>
Commit | Line | Data |
---|---|---|
1 | %define pref /usr | |
2 | %define ver 2.9.5 | |
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 | ||
13 | Summary: The Motif/Lesstif port of the wxWidgets library | |
14 | Name: %{name} | |
15 | Version: %{ver} | |
16 | Release: %{rel} | |
17 | License: wxWindows Licence | |
18 | Group: X11/Libraries | |
19 | Source: wxMotif-%{ver}.tar.bz2 | |
20 | URL: http://www.wxwidgets.org | |
21 | Packager: wxWidgets developers <wx-dev@lists.wxwidgets.org> | |
22 | BuildRoot: %{_tmppath}/%{name}-root | |
23 | Requires: %{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..." | |
28 | Provides: wxwin | |
29 | Provides: wxMotif | |
30 | ||
31 | %description | |
32 | wxWidgets is a free C++ library for cross-platform GUI development. | |
33 | With wxWidgets, you can create applications for different GUIs (GTK+, | |
34 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
35 | ||
36 | %package devel | |
37 | Summary: The Motif/Lesstif port of the wxWidgets library | |
38 | Group: X11/Libraries | |
39 | Requires: %{name} = %{ver} | |
40 | Requires: %{wxbasename}-devel = %{ver} | |
41 | ||
42 | %description devel | |
43 | Header files for wxMotif, the Motif/Lesstif port of the wxWidgets library. | |
44 | ||
45 | %package gl | |
46 | Summary: The Motif/Lesstif port of the wxWidgets library, OpenGL add-on. | |
47 | Group: X11/Libraries | |
48 | Requires: %{name} = %{ver} | |
49 | ||
50 | %description gl | |
51 | OpenGL add-on library for wxMotif, the Motif/Lesstif port of the wxWidgets library. | |
52 | ||
53 | %package static | |
54 | Summary: wxMotif static libraries | |
55 | Group: Development/Libraries | |
56 | Requires: %{wxbasename}-static | |
57 | Requires: %{name}-devel = %{ver} | |
58 | ||
59 | %description static | |
60 | Static 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 | |
66 | if [ "$SMP" != "" ]; then | |
67 | export MAKE="make -j$SMP" | |
68 | else | |
69 | export MAKE="make" | |
70 | fi | |
71 | ||
72 | mkdir obj-shared | |
73 | cd obj-shared | |
74 | ../configure --prefix=%{pref} --with-motif --with-opengl | |
75 | $MAKE | |
76 | cd .. | |
77 | ||
78 | mkdir obj-static | |
79 | cd obj-static | |
80 | ../configure --prefix=%{pref} --with-motif --disable-shared --with-opengl | |
81 | $MAKE | |
82 | cd .. | |
83 | ||
84 | %install | |
85 | rm -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 --- | |
92 | cat <<EOF >wxbase-headers.files | |
93 | wx/afterstd.h | |
94 | wx/any.h | |
95 | wx/anystr.h | |
96 | wx/app.h | |
97 | wx/apptrait.h | |
98 | wx/archive.h | |
99 | wx/arrimpl.cpp | |
100 | wx/arrstr.h | |
101 | wx/atomic.h | |
102 | wx/base64.h | |
103 | wx/beforestd.h | |
104 | wx/buffer.h | |
105 | wx/build.h | |
106 | wx/chartype.h | |
107 | wx/checkeddelete.h | |
108 | wx/chkconf.h | |
109 | wx/clntdata.h | |
110 | wx/cmdargs.h | |
111 | wx/cmdline.h | |
112 | wx/confbase.h | |
113 | wx/config.h | |
114 | wx/convauto.h | |
115 | wx/containr.h | |
116 | wx/cpp.h | |
117 | wx/crt.h | |
118 | wx/datetime.h | |
119 | wx/datstrm.h | |
120 | wx/dde.h | |
121 | wx/debug.h | |
122 | wx/defs.h | |
123 | wx/dir.h | |
124 | wx/dlimpexp.h | |
125 | wx/dlist.h | |
126 | wx/dynarray.h | |
127 | wx/dynlib.h | |
128 | wx/dynload.h | |
129 | wx/encconv.h | |
130 | wx/event.h | |
131 | wx/eventfilter.h | |
132 | wx/evtloop.h | |
133 | wx/except.h | |
134 | wx/features.h | |
135 | wx/flags.h | |
136 | wx/ffile.h | |
137 | wx/file.h | |
138 | wx/fileconf.h | |
139 | wx/filefn.h | |
140 | wx/filename.h | |
141 | wx/filesys.h | |
142 | wx/fontenc.h | |
143 | wx/fontmap.h | |
144 | wx/fs_arc.h | |
145 | wx/fs_filter.h | |
146 | wx/fs_mem.h | |
147 | wx/fs_zip.h | |
148 | wx/hash.h | |
149 | wx/hashmap.h | |
150 | wx/hashset.h | |
151 | wx/html/forcelnk.h | |
152 | wx/iconloc.h | |
153 | wx/init.h | |
154 | wx/intl.h | |
155 | wx/iosfwrap.h | |
156 | wx/ioswrap.h | |
157 | wx/ipc.h | |
158 | wx/ipcbase.h | |
159 | wx/kbdstate.h | |
160 | wx/language.h | |
161 | wx/link.h | |
162 | wx/list.h | |
163 | wx/listimpl.cpp | |
164 | wx/log.h | |
165 | wx/longlong.h | |
166 | wx/math.h | |
167 | wx/memconf.h | |
168 | wx/memory.h | |
169 | wx/memtext.h | |
170 | wx/mimetype.h | |
171 | wx/module.h | |
172 | wx/mousestate.h | |
173 | wx/msgout.h | |
174 | wx/msgqueue.h | |
175 | wx/mstream.h | |
176 | wx/numformatter.h | |
177 | wx/object.h | |
178 | wx/platform.h | |
179 | wx/platinfo.h | |
180 | wx/power.h | |
181 | wx/process.h | |
182 | wx/ptr_scpd.h | |
183 | wx/ptr_shrd.h | |
184 | wx/recguard.h | |
185 | wx/regex.h | |
186 | wx/rtti.h | |
187 | wx/scopedarray.h | |
188 | wx/scopedptr.h | |
189 | wx/scopeguard.h | |
190 | wx/sharedptr.h | |
191 | wx/snglinst.h | |
192 | wx/sstream.h | |
193 | wx/stack.h | |
194 | wx/stackwalk.h | |
195 | wx/stdpaths.h | |
196 | wx/stdstream.h | |
197 | wx/stockitem.h | |
198 | wx/stopwatch.h | |
199 | wx/strconv.h | |
200 | wx/stream.h | |
201 | wx/string.h | |
202 | wx/stringimpl.h | |
203 | wx/stringops.h | |
204 | wx/strvararg.h | |
205 | wx/sysopt.h | |
206 | wx/tarstrm.h | |
207 | wx/textbuf.h | |
208 | wx/textfile.h | |
209 | wx/thread.h | |
210 | wx/thrimpl.cpp | |
211 | wx/time.h | |
212 | wx/timer.h | |
213 | wx/tls.h | |
214 | wx/tokenzr.h | |
215 | wx/tracker.h | |
216 | wx/translation.h | |
217 | wx/txtstrm.h | |
218 | wx/typeinfo.h | |
219 | wx/types.h | |
220 | wx/unichar.h | |
221 | wx/uri.h | |
222 | wx/ustring.h | |
223 | wx/utils.h | |
224 | wx/variant.h | |
225 | wx/vector.h | |
226 | wx/version.h | |
227 | wx/versioninfo.h | |
228 | wx/volume.h | |
229 | wx/weakref.h | |
230 | wx/wfstream.h | |
231 | wx/wx.h | |
232 | wx/wxchar.h | |
233 | wx/wxcrt.h | |
234 | wx/wxcrtbase.h | |
235 | wx/wxcrtvararg.h | |
236 | wx/wxprec.h | |
237 | wx/xlocale.h | |
238 | wx/xti.h | |
239 | wx/xti2.h | |
240 | wx/xtistrm.h | |
241 | wx/xtictor.h | |
242 | wx/xtihandler.h | |
243 | wx/xtiprop.h | |
244 | wx/xtitypes.h | |
245 | wx/zipstrm.h | |
246 | wx/zstream.h | |
247 | wx/meta/convertible.h | |
248 | wx/meta/if.h | |
249 | wx/meta/implicitconversion.h | |
250 | wx/meta/int2type.h | |
251 | wx/meta/movable.h | |
252 | wx/meta/pod.h | |
253 | wx/meta/removeref.h | |
254 | wx/fswatcher.h | |
255 | wx/generic/fswatcher.h | |
256 | wx/unix/app.h | |
257 | wx/unix/apptbase.h | |
258 | wx/unix/apptrait.h | |
259 | wx/unix/chkconf.h | |
260 | wx/unix/evtloop.h | |
261 | wx/unix/evtloopsrc.h | |
262 | wx/unix/pipe.h | |
263 | wx/unix/stdpaths.h | |
264 | wx/unix/stackwalk.h | |
265 | wx/unix/tls.h | |
266 | wx/unix/fswatcher_kqueue.h | |
267 | wx/unix/execute.h | |
268 | wx/unix/mimetype.h | |
269 | wx/unix/fswatcher_inotify.h | |
270 | wx/fs_inet.h | |
271 | wx/protocol/file.h | |
272 | wx/protocol/ftp.h | |
273 | wx/protocol/http.h | |
274 | wx/protocol/log.h | |
275 | wx/protocol/protocol.h | |
276 | wx/sckaddr.h | |
277 | wx/sckipc.h | |
278 | wx/sckstrm.h | |
279 | wx/socket.h | |
280 | wx/url.h | |
281 | wx/xml/xml.h | |
282 | wx/xtixml.h | |
283 | EOF | |
284 | # --- wxBase headers list ends here --- | |
285 | for f in `cat wxbase-headers-list` ; do | |
286 | rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f | |
287 | done | |
288 | ||
289 | # list of all core headers: | |
290 | find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files | |
291 | ||
292 | # remove wxBase files so that RPM doesn't complain about unpackaged files: | |
293 | rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base* | |
294 | rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/* | |
295 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/* | |
296 | ||
297 | %clean | |
298 | rm -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. | |
308 | ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config | |
309 | # link wx-config with explicit name. | |
310 | ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink} | |
311 | /sbin/ldconfig | |
312 | ||
313 | %postun devel | |
314 | /sbin/ldconfig | |
315 | ||
316 | %preun devel | |
317 | if 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 | |
323 | fi | |
324 | rm -f %{_bindir}/%{wxconfiglink} | |
325 | ||
326 | %post gl | |
327 | /sbin/ldconfig | |
328 | ||
329 | %postun gl | |
330 | /sbin/ldconfig | |
331 | ||
332 | %files | |
333 | %defattr(-,root,root) | |
334 | %doc COPYING.LIB *.txt | |
335 | %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.* | |
336 | %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.* | |
337 | %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.* | |
338 | %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.* | |
339 | %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.* | |
340 | %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.* | |
341 | ||
342 | ||
343 | %files devel -f core-headers.files | |
344 | %defattr(-,root,root) | |
345 | %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so | |
346 | %{_libdir}/libwx_%{portname}*_core-%{ver2}.so | |
347 | %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so | |
348 | %{_libdir}/libwx_%{portname}*_html-%{ver2}.so | |
349 | %{_libdir}/libwx_%{portname}*_media-%{ver2}.so | |
350 | %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so | |
351 | %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so | |
352 | %dir %{_libdir}/wx | |
353 | %{_libdir}/wx/* | |
354 | %{_bindir}/wxrc* | |
355 | ||
356 | %files gl | |
357 | %defattr(-,root,root) | |
358 | %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.* | |
359 | ||
360 | %files static | |
361 | %defattr (-,root,root) | |
362 | %{_libdir}/libwx_%{portname}*_*-%{ver2}.a | |
363 |