]> git.saurik.com Git - wxWidgets.git/blob - wxMotif.spec
Add support for id ranges to XRC.
[wxWidgets.git] / wxMotif.spec
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/implicitconversion.h
240 wx/meta/int2type.h
241 wx/meta/movable.h
242 wx/meta/pod.h
243 wx/fswatcher.h
244 wx/generic/fswatcher.h
245 wx/unix/app.h
246 wx/unix/apptbase.h
247 wx/unix/apptrait.h
248 wx/unix/chkconf.h
249 wx/unix/evtloop.h
250 wx/unix/evtloopsrc.h
251 wx/unix/pipe.h
252 wx/unix/stdpaths.h
253 wx/unix/stackwalk.h
254 wx/unix/tls.h
255 wx/unix/fswatcher_kqueue.h
256 wx/unix/execute.h
257 wx/unix/mimetype.h
258 wx/unix/fswatcher_inotify.h
259 wx/fs_inet.h
260 wx/protocol/file.h
261 wx/protocol/ftp.h
262 wx/protocol/http.h
263 wx/protocol/log.h
264 wx/protocol/protocol.h
265 wx/sckaddr.h
266 wx/sckipc.h
267 wx/sckstrm.h
268 wx/socket.h
269 wx/url.h
270 wx/xml/xml.h
271 wx/xtixml.h
272 EOF
273 # --- wxBase headers list ends here ---
274 for f in `cat wxbase-headers-list` ; do
275 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
276 done
277
278 # list of all core headers:
279 find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
280
281 # remove wxBase files so that RPM doesn't complain about unpackaged files:
282 rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
283 rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
284 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
285
286 %clean
287 rm -rf $RPM_BUILD_ROOT
288
289 %post
290 /sbin/ldconfig
291
292 %postun
293 /sbin/ldconfig
294
295 %post devel
296 # link wx-config when you install RPM.
297 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
298 # link wx-config with explicit name.
299 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
300 /sbin/ldconfig
301
302 %postun devel
303 /sbin/ldconfig
304
305 %preun devel
306 if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
307 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
308 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
309 if test "x$SUM1" = "x$SUM2" ; then
310 rm -f %{_bindir}/wx-config
311 fi
312 fi
313 rm -f %{_bindir}/%{wxconfiglink}
314
315 %post gl
316 /sbin/ldconfig
317
318 %postun gl
319 /sbin/ldconfig
320
321 %files
322 %defattr(-,root,root)
323 %doc COPYING.LIB *.txt
324 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
325 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
326 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
327 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
328 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
329 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
330
331
332 %files devel -f core-headers.files
333 %defattr(-,root,root)
334 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
335 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so
336 %{_libdir}/libwx_%{portname}*_gl-%{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 %dir %{_libdir}/wx
342 %{_libdir}/wx/*
343 %{_bindir}/wxrc*
344
345 %files gl
346 %defattr(-,root,root)
347 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
348
349 %files static
350 %defattr (-,root,root)
351 %{_libdir}/libwx_%{portname}*_*-%{ver2}.a
352