]>
Commit | Line | Data |
---|---|---|
1 | %define pref /usr | |
2 | %define ver 2.9.2 | |
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/evtloop.h | |
132 | wx/except.h | |
133 | wx/features.h | |
134 | wx/flags.h | |
135 | wx/ffile.h | |
136 | wx/file.h | |
137 | wx/fileconf.h | |
138 | wx/filefn.h | |
139 | wx/filename.h | |
140 | wx/filesys.h | |
141 | wx/fontenc.h | |
142 | wx/fontmap.h | |
143 | wx/fs_arc.h | |
144 | wx/fs_filter.h | |
145 | wx/fs_mem.h | |
146 | wx/fs_zip.h | |
147 | wx/hash.h | |
148 | wx/hashmap.h | |
149 | wx/hashset.h | |
150 | wx/html/forcelnk.h | |
151 | wx/iconloc.h | |
152 | wx/init.h | |
153 | wx/intl.h | |
154 | wx/iosfwrap.h | |
155 | wx/ioswrap.h | |
156 | wx/ipc.h | |
157 | wx/ipcbase.h | |
158 | wx/kbdstate.h | |
159 | wx/language.h | |
160 | wx/link.h | |
161 | wx/list.h | |
162 | wx/listimpl.cpp | |
163 | wx/log.h | |
164 | wx/longlong.h | |
165 | wx/math.h | |
166 | wx/memconf.h | |
167 | wx/memory.h | |
168 | wx/memtext.h | |
169 | wx/mimetype.h | |
170 | wx/module.h | |
171 | wx/mousestate.h | |
172 | wx/msgout.h | |
173 | wx/msgqueue.h | |
174 | wx/mstream.h | |
175 | wx/object.h | |
176 | wx/platform.h | |
177 | wx/platinfo.h | |
178 | wx/power.h | |
179 | wx/process.h | |
180 | wx/ptr_scpd.h | |
181 | wx/ptr_shrd.h | |
182 | wx/recguard.h | |
183 | wx/regex.h | |
184 | wx/scopedarray.h | |
185 | wx/scopedptr.h | |
186 | wx/scopeguard.h | |
187 | wx/sharedptr.h | |
188 | wx/snglinst.h | |
189 | wx/sstream.h | |
190 | wx/stack.h | |
191 | wx/stackwalk.h | |
192 | wx/stdpaths.h | |
193 | wx/stdstream.h | |
194 | wx/stockitem.h | |
195 | wx/stopwatch.h | |
196 | wx/strconv.h | |
197 | wx/stream.h | |
198 | wx/string.h | |
199 | wx/stringimpl.h | |
200 | wx/stringops.h | |
201 | wx/strvararg.h | |
202 | wx/sysopt.h | |
203 | wx/tarstrm.h | |
204 | wx/textbuf.h | |
205 | wx/textfile.h | |
206 | wx/thread.h | |
207 | wx/thrimpl.cpp | |
208 | wx/timer.h | |
209 | wx/tls.h | |
210 | wx/tokenzr.h | |
211 | wx/tracker.h | |
212 | wx/translation.h | |
213 | wx/txtstrm.h | |
214 | wx/typeinfo.h | |
215 | wx/types.h | |
216 | wx/unichar.h | |
217 | wx/uri.h | |
218 | wx/ustring.h | |
219 | wx/utils.h | |
220 | wx/variant.h | |
221 | wx/vector.h | |
222 | wx/version.h | |
223 | wx/volume.h | |
224 | wx/weakref.h | |
225 | wx/wfstream.h | |
226 | wx/wx.h | |
227 | wx/wxchar.h | |
228 | wx/wxcrt.h | |
229 | wx/wxcrtbase.h | |
230 | wx/wxcrtvararg.h | |
231 | wx/wxprec.h | |
232 | wx/xlocale.h | |
233 | wx/xti.h | |
234 | wx/xtistrm.h | |
235 | wx/zipstrm.h | |
236 | wx/zstream.h | |
237 | wx/meta/convertible.h | |
238 | wx/meta/if.h | |
239 | wx/meta/int2type.h | |
240 | wx/meta/movable.h | |
241 | wx/meta/pod.h | |
242 | wx/fswatcher.h | |
243 | wx/generic/fswatcher.h | |
244 | wx/unix/app.h | |
245 | wx/unix/apptbase.h | |
246 | wx/unix/apptrait.h | |
247 | wx/unix/chkconf.h | |
248 | wx/unix/evtloop.h | |
249 | wx/unix/evtloopsrc.h | |
250 | wx/unix/pipe.h | |
251 | wx/unix/stdpaths.h | |
252 | wx/unix/stackwalk.h | |
253 | wx/unix/tls.h | |
254 | wx/unix/fswatcher_kqueue.h | |
255 | wx/unix/execute.h | |
256 | wx/unix/mimetype.h | |
257 | wx/unix/fswatcher_inotify.h | |
258 | wx/fs_inet.h | |
259 | wx/protocol/file.h | |
260 | wx/protocol/ftp.h | |
261 | wx/protocol/http.h | |
262 | wx/protocol/log.h | |
263 | wx/protocol/protocol.h | |
264 | wx/sckaddr.h | |
265 | wx/sckipc.h | |
266 | wx/sckstrm.h | |
267 | wx/socket.h | |
268 | wx/url.h | |
269 | wx/xml/xml.h | |
270 | wx/xtixml.h | |
271 | EOF | |
272 | # --- wxBase headers list ends here --- | |
273 | for f in `cat wxbase-headers-list` ; do | |
274 | rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f | |
275 | done | |
276 | ||
277 | # list of all core headers: | |
278 | find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files | |
279 | ||
280 | # remove wxBase files so that RPM doesn't complain about unpackaged files: | |
281 | rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base* | |
282 | rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/* | |
283 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/* | |
284 | ||
285 | %clean | |
286 | rm -rf $RPM_BUILD_ROOT | |
287 | ||
288 | %post | |
289 | /sbin/ldconfig | |
290 | ||
291 | %postun | |
292 | /sbin/ldconfig | |
293 | ||
294 | %post devel | |
295 | # link wx-config when you install RPM. | |
296 | ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config | |
297 | # link wx-config with explicit name. | |
298 | ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink} | |
299 | /sbin/ldconfig | |
300 | ||
301 | %postun devel | |
302 | /sbin/ldconfig | |
303 | ||
304 | %preun devel | |
305 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
306 | SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32` | |
307 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
308 | if test "x$SUM1" = "x$SUM2" ; then | |
309 | rm -f %{_bindir}/wx-config | |
310 | fi | |
311 | fi | |
312 | rm -f %{_bindir}/%{wxconfiglink} | |
313 | ||
314 | %post gl | |
315 | /sbin/ldconfig | |
316 | ||
317 | %postun gl | |
318 | /sbin/ldconfig | |
319 | ||
320 | %files | |
321 | %defattr(-,root,root) | |
322 | %doc COPYING.LIB *.txt | |
323 | %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.* | |
324 | %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.* | |
325 | %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.* | |
326 | %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.* | |
327 | %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.* | |
328 | %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.* | |
329 | ||
330 | ||
331 | %files devel -f core-headers.files | |
332 | %defattr(-,root,root) | |
333 | %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so | |
334 | %{_libdir}/libwx_%{portname}*_core-%{ver2}.so | |
335 | %{_libdir}/libwx_%{portname}*_gl-%{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 | %dir %{_libdir}/wx | |
341 | %{_libdir}/wx/* | |
342 | %{_bindir}/wxrc* | |
343 | ||
344 | %files gl | |
345 | %defattr(-,root,root) | |
346 | %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.* | |
347 | ||
348 | %files static | |
349 | %defattr (-,root,root) | |
350 | %{_libdir}/libwx_%{portname}*_*-%{ver2}.a | |
351 |