]> git.saurik.com Git - wxWidgets.git/blob - wxMotif.spec
documented how to handle C++ exceptions in wxWindows
[wxWidgets.git] / wxMotif.spec
1 # RPM .spec file for wxMotif. Based on the .spec file for wxGTK
2 # (c) by Robert Roebling. Modifications (c) 2000/03 by Robert Fendt.
3
4 # Note that this is NOT a relocatable package
5 %define pref /usr
6 %define ver 2.5.1
7 %define ver2 2.5
8 %define rel 1
9
10 %define portname motif
11 %define name wx-%{portname}
12 %define wxbasename wx-base
13 %define wxconfigname wx%{portname}-%{ver2}-config
14
15 Summary: The Motif/Lesstif port of the wxWindows library
16 Name: %{name}
17 Version: %{ver}
18 Release: %{rel}
19 License: wxWindows Licence
20 Group: X11/Libraries
21 Source: wxMOTIF-%{ver}.tar.bz2
22 URL: http://www.wxwindows.org
23 Packager: Robert Fendt <rfendt@myokay.net>
24 BuildRoot: /tmp/wxmotif_root
25
26 # all packages providing an implementation of wxWindows library (regardless of
27 # the toolkit used) should provide the (virtual) wxwin package, this makes it
28 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
29 Provides: wxwin
30
31 Provides: wxMotif
32
33 Requires: %{wxbasename} = %{ver}
34
35 %description
36 wxWindows is a free C++ library for cross-platform GUI development.
37 With wxWindows, you can create applications for different GUIs (GTK+,
38 Motif/LessTif, MS Windows, Mac) from the same source code.
39
40 %package devel
41 Summary: The Motif/Lesstif port of the wxWindows library
42 Group: X11/Libraries
43 Requires: %{name} = %{ver}
44 Requires: %{wxbasename}-devel = %{ver}
45
46 %description devel
47 Header files for wxMotif, the Motif/Lesstif port of the wxWindows library.
48
49 %package gl
50 Summary: The Motif/Lesstif port of the wxWindows library, OpenGL add-on.
51 Group: X11/Libraries
52 Requires: %{name} = %{ver}
53
54 %description gl
55 OpenGL add-on library for wxMotif, the Motif/Lesstif port of the wxWindows library.
56
57 %package static
58 Summary: wxMotif static libraries
59 Group: Development/Libraries
60
61 %description static
62 Static libraries for wxMotif. You need them if you want to link statically against wxMotif.
63
64 %prep
65 %setup -q -n wxMOTIF-%{ver}
66
67 %build
68 if [ "$SMP" != "" ]; then
69 export MAKE="make -j$SMP"
70 else
71 export MAKE="make"
72 fi
73
74 mkdir obj-shared
75 cd obj-shared
76 ../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif
77 $MAKE
78 cd ..
79
80 mkdir obj-static
81 cd obj-static
82 ../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl --with-motif
83 $MAKE
84 cd ..
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
89 (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
90
91 # Remove headers that are part of wx-base-devel:
92
93 # --- wxBase headers list begins here ---
94 cat <<EOF >wxbase-headers-list
95 wx/afterstd.h
96 wx/app.h
97 wx/apptrait.h
98 wx/arrimpl.cpp
99 wx/arrstr.h
100 wx/beforestd.h
101 wx/buffer.h
102 wx/build.h
103 wx/chkconf.h
104 wx/clntdata.h
105 wx/cmdline.h
106 wx/confbase.h
107 wx/config.h
108 wx/containr.h
109 wx/datetime.h
110 wx/datetime.inl
111 wx/datstrm.h
112 wx/dde.h
113 wx/debug.h
114 wx/defs.h
115 wx/dir.h
116 wx/dynarray.h
117 wx/dynlib.h
118 wx/dynload.h
119 wx/encconv.h
120 wx/event.h
121 wx/features.h
122 wx/ffile.h
123 wx/file.h
124 wx/fileconf.h
125 wx/filefn.h
126 wx/filename.h
127 wx/filesys.h
128 wx/fontenc.h
129 wx/fontmap.h
130 wx/fs_mem.h
131 wx/fs_zip.h
132 wx/hash.h
133 wx/hashmap.h
134 wx/hashset.h
135 wx/iconloc.h
136 wx/init.h
137 wx/intl.h
138 wx/iosfwrap.h
139 wx/ioswrap.h
140 wx/ipc.h
141 wx/ipcbase.h
142 wx/isql.h
143 wx/isqlext.h
144 wx/list.h
145 wx/listimpl.cpp
146 wx/log.h
147 wx/longlong.h
148 wx/math.h
149 wx/memconf.h
150 wx/memory.h
151 wx/memtext.h
152 wx/mimetype.h
153 wx/module.h
154 wx/msgout.h
155 wx/msgout.h
156 wx/mstream.h
157 wx/object.h
158 wx/platform.h
159 wx/process.h
160 wx/ptr_scpd.h
161 wx/regex.h
162 wx/scopeguard.h
163 wx/snglinst.h
164 wx/stopwatch.h
165 wx/strconv.h
166 wx/stream.h
167 wx/string.h
168 wx/sysopt.h
169 wx/textbuf.h
170 wx/textfile.h
171 wx/thread.h
172 wx/thrimpl.cpp
173 wx/timer.h
174 wx/tokenzr.h
175 wx/txtstrm.h
176 wx/types.h
177 wx/utils.h
178 wx/variant.h
179 wx/vector.h
180 wx/version.h
181 wx/volume.h
182 wx/wfstream.h
183 wx/wx.h
184 wx/wxchar.h
185 wx/wxprec.h
186 wx/xti.h
187 wx/xtistrm.h
188 wx/zipstrm.h
189 wx/zstream.h
190 wx/msw/apptrait.h
191 wx/msw/apptbase.h
192 wx/msw/chkconf.h
193 wx/msw/crashrpt.h
194 wx/msw/dde.h
195 wx/msw/gccpriv.h
196 wx/msw/mimetype.h
197 wx/msw/winundef.h
198 wx/msw/wrapcctl.h
199 wx/msw/wrapwin.h
200 wx/fs_inet.h
201 wx/gsocket.h
202 wx/protocol/file.h
203 wx/protocol/ftp.h
204 wx/protocol/http.h
205 wx/protocol/protocol.h
206 wx/sckaddr.h
207 wx/sckipc.h
208 wx/sckstrm.h
209 wx/socket.h
210 wx/url.h
211 wx/msw/gsockmsw.h
212 wx/xml/xml.h
213 wx/xtixml.h
214 wx/db.h
215 wx/dbkeyg.h
216 wx/dbtable.h
217 EOF
218 # --- wxBase headers list ends here ---
219 for f in `cat wxbase-headers-list` ; do
220 rm -f $RPM_BUILD_ROOT%{_includedir}/$f
221 done
222
223 # list of all core headers:
224 find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
225
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %post
231 /sbin/ldconfig
232
233 %postun
234 /sbin/ldconfig
235
236 %post gl
237 /sbin/ldconfig
238
239 %postun gl
240 /sbin/ldconfig
241
242 %post devel
243 # Install wx-config if there isn't any
244 if test ! -f %{_bindir}/wx-config ; then
245 ln -sf %{wxconfigname} %{_bindir}/wx-config
246 fi
247
248 %preun devel
249 # Remove wx-config if it points to this package
250 if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
251 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
252 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
253 if test "x$SUM1" = "x$SUM2" ; then
254 rm -f %{_bindir}/wx-config
255 fi
256 fi
257
258
259 %files
260 %defattr(-,root,root)
261 %doc COPYING.LIB *.txt
262 %dir %{_datadir}/wx
263 %{_datadir}/wx/*
264 %{_libdir}/libwx_%{portname}*_core*.so.*
265 %{_libdir}/libwx_%{portname}*_html*.so.*
266 %{_libdir}/libwx_%{portname}*_adv*.so.*
267 %{_libdir}/libwx_%{portname}*_dbgrid*.so.*
268
269 %files devel -f core-headers.files
270 %defattr(-,root,root)
271 %{_libdir}/libwx_%{portname}*_core*.so
272 %{_libdir}/libwx_%{portname}*_html*.so
273 %{_libdir}/libwx_%{portname}*_adv*.so
274 %{_libdir}/libwx_%{portname}*_dbgrid*.so
275 %{_libdir}/libwx_%{portname}*_gl*.so
276 %dir %{_libdir}/wx
277 %{_libdir}/wx/*
278 %{_bindir}/%{wxconfigname}
279
280 %files gl
281 %defattr(-,root,root)
282 %{_libdir}/libwx_%{portname}*_gl*.so.*
283
284 %files static
285 %defattr (-,root,root)
286 %{_libdir}/libwx_%{portname}*.a