]>
Commit | Line | Data |
---|---|---|
f6bcfd97 BP |
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 | ||
a622c152 RR |
4 | # Note that this is NOT a relocatable package |
5 | %define pref /usr | |
93f467a3 | 6 | %define ver 2.5.1 |
c31752da | 7 | %define ver2 2.5 |
014e19de | 8 | %define rel 1 |
a622c152 | 9 | |
4eba1840 VS |
10 | %define portname motif |
11 | %define name wx-%{portname} | |
12 | %define wxbasename wx-base | |
13 | %define wxconfigname wx%{portname}-%{ver2}-config | |
14 | ||
f6bcfd97 | 15 | Summary: The Motif/Lesstif port of the wxWindows library |
4eba1840 | 16 | Name: %{name} |
a622c152 RR |
17 | Version: %{ver} |
18 | Release: %{rel} | |
4eba1840 | 19 | License: wxWindows Licence |
a622c152 | 20 | Group: X11/Libraries |
a3e78c76 | 21 | Source: wxMOTIF-%{ver}.tar.bz2 |
f6bcfd97 BP |
22 | URL: http://www.wxwindows.org |
23 | Packager: Robert Fendt <rfendt@myokay.net> | |
a622c152 RR |
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 | |
6e711d5c | 28 | # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." |
a622c152 RR |
29 | Provides: wxwin |
30 | ||
4eba1840 VS |
31 | Provides: wxMotif |
32 | ||
33 | Requires: %{wxbasename} = %{ver} | |
4eba1840 | 34 | |
a622c152 RR |
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 | ||
f6bcfd97 BP |
40 | %package devel |
41 | Summary: The Motif/Lesstif port of the wxWindows library | |
42 | Group: X11/Libraries | |
4eba1840 VS |
43 | Requires: %{name} = %{ver} |
44 | Requires: %{wxbasename}-devel = %{ver} | |
f6bcfd97 BP |
45 | |
46 | %description devel | |
47 | Header files for wxMotif, the Motif/Lesstif port of the wxWindows library. | |
48 | ||
49 | %package gl | |
406e3e0d | 50 | Summary: The Motif/Lesstif port of the wxWindows library, OpenGL add-on. |
f6bcfd97 | 51 | Group: X11/Libraries |
4eba1840 | 52 | Requires: %{name} = %{ver} |
f6bcfd97 BP |
53 | |
54 | %description gl | |
406e3e0d VS |
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 | ||
a622c152 | 64 | %prep |
4eba1840 | 65 | %setup -q -n wxMOTIF-%{ver} |
a622c152 RR |
66 | |
67 | %build | |
f6bcfd97 BP |
68 | if [ "$SMP" != "" ]; then |
69 | export MAKE="make -j$SMP" | |
70 | else | |
71 | export MAKE="make" | |
72 | fi | |
406e3e0d | 73 | |
406e3e0d VS |
74 | mkdir obj-shared |
75 | cd obj-shared | |
86ec2935 | 76 | ../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif |
f6bcfd97 | 77 | $MAKE |
406e3e0d VS |
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 .. | |
a622c152 RR |
85 | |
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
406e3e0d VS |
88 | (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install) |
89 | (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
a622c152 | 90 | |
4eba1840 | 91 | # Remove headers that are part of wx-base-devel: |
d10382ab VS |
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 | |
20b35a69 | 116 | wx/dlimpexp.h |
d10382ab VS |
117 | wx/dynarray.h |
118 | wx/dynlib.h | |
119 | wx/dynload.h | |
120 | wx/encconv.h | |
121 | wx/event.h | |
671a85ea | 122 | wx/except.h |
d10382ab VS |
123 | wx/features.h |
124 | wx/ffile.h | |
125 | wx/file.h | |
126 | wx/fileconf.h | |
127 | wx/filefn.h | |
128 | wx/filename.h | |
129 | wx/filesys.h | |
130 | wx/fontenc.h | |
131 | wx/fontmap.h | |
132 | wx/fs_mem.h | |
133 | wx/fs_zip.h | |
b71531ad | 134 | wx/gzstream.h |
d10382ab VS |
135 | wx/hash.h |
136 | wx/hashmap.h | |
137 | wx/hashset.h | |
138 | wx/iconloc.h | |
139 | wx/init.h | |
140 | wx/intl.h | |
141 | wx/iosfwrap.h | |
142 | wx/ioswrap.h | |
143 | wx/ipc.h | |
144 | wx/ipcbase.h | |
145 | wx/isql.h | |
146 | wx/isqlext.h | |
147 | wx/list.h | |
148 | wx/listimpl.cpp | |
149 | wx/log.h | |
150 | wx/longlong.h | |
151 | wx/math.h | |
152 | wx/memconf.h | |
153 | wx/memory.h | |
154 | wx/memtext.h | |
155 | wx/mimetype.h | |
156 | wx/module.h | |
157 | wx/msgout.h | |
158 | wx/msgout.h | |
159 | wx/mstream.h | |
160 | wx/object.h | |
161 | wx/platform.h | |
162 | wx/process.h | |
163 | wx/ptr_scpd.h | |
164 | wx/regex.h | |
165 | wx/scopeguard.h | |
166 | wx/snglinst.h | |
b71531ad | 167 | wx/stack.h |
d10382ab VS |
168 | wx/stopwatch.h |
169 | wx/strconv.h | |
170 | wx/stream.h | |
171 | wx/string.h | |
172 | wx/sysopt.h | |
173 | wx/textbuf.h | |
174 | wx/textfile.h | |
175 | wx/thread.h | |
176 | wx/thrimpl.cpp | |
177 | wx/timer.h | |
178 | wx/tokenzr.h | |
179 | wx/txtstrm.h | |
180 | wx/types.h | |
181 | wx/utils.h | |
182 | wx/variant.h | |
183 | wx/vector.h | |
184 | wx/version.h | |
185 | wx/volume.h | |
186 | wx/wfstream.h | |
187 | wx/wx.h | |
188 | wx/wxchar.h | |
189 | wx/wxprec.h | |
190 | wx/xti.h | |
191 | wx/xtistrm.h | |
192 | wx/zipstrm.h | |
193 | wx/zstream.h | |
194 | wx/msw/apptrait.h | |
195 | wx/msw/apptbase.h | |
196 | wx/msw/chkconf.h | |
197 | wx/msw/crashrpt.h | |
198 | wx/msw/dde.h | |
199 | wx/msw/gccpriv.h | |
200 | wx/msw/mimetype.h | |
201 | wx/msw/winundef.h | |
202 | wx/msw/wrapcctl.h | |
203 | wx/msw/wrapwin.h | |
204 | wx/fs_inet.h | |
205 | wx/gsocket.h | |
206 | wx/protocol/file.h | |
207 | wx/protocol/ftp.h | |
208 | wx/protocol/http.h | |
209 | wx/protocol/protocol.h | |
210 | wx/sckaddr.h | |
211 | wx/sckipc.h | |
212 | wx/sckstrm.h | |
213 | wx/socket.h | |
214 | wx/url.h | |
215 | wx/msw/gsockmsw.h | |
216 | wx/xml/xml.h | |
217 | wx/xtixml.h | |
218 | wx/db.h | |
219 | wx/dbkeyg.h | |
220 | wx/dbtable.h | |
221 | EOF | |
222 | # --- wxBase headers list ends here --- | |
223 | for f in `cat wxbase-headers-list` ; do | |
224 | rm -f $RPM_BUILD_ROOT%{_includedir}/$f | |
4eba1840 | 225 | done |
4eba1840 VS |
226 | |
227 | # list of all core headers: | |
228 | find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files | |
229 | ||
88e3652f VS |
230 | # remove wxBase files so that RPM doesn't complain about unpackaged files: |
231 | rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base* | |
232 | rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/* | |
233 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/* | |
234 | ||
acea2a0b | 235 | |
a622c152 RR |
236 | %clean |
237 | rm -rf $RPM_BUILD_ROOT | |
238 | ||
239 | %post | |
240 | /sbin/ldconfig | |
241 | ||
242 | %postun | |
243 | /sbin/ldconfig | |
244 | ||
a3e78c76 VS |
245 | %post gl |
246 | /sbin/ldconfig | |
247 | ||
248 | %postun gl | |
249 | /sbin/ldconfig | |
250 | ||
251 | %post devel | |
252 | # Install wx-config if there isn't any | |
253 | if test ! -f %{_bindir}/wx-config ; then | |
4eba1840 | 254 | ln -sf %{wxconfigname} %{_bindir}/wx-config |
a3e78c76 VS |
255 | fi |
256 | ||
257 | %preun devel | |
258 | # Remove wx-config if it points to this package | |
259 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
4eba1840 | 260 | SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32` |
a3e78c76 VS |
261 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` |
262 | if test "x$SUM1" = "x$SUM2" ; then | |
263 | rm -f %{_bindir}/wx-config | |
264 | fi | |
265 | fi | |
266 | ||
267 | ||
4eba1840 VS |
268 | %files |
269 | %defattr(-,root,root) | |
a3e78c76 VS |
270 | %doc COPYING.LIB *.txt |
271 | %dir %{_datadir}/wx | |
272 | %{_datadir}/wx/* | |
4eba1840 VS |
273 | %{_libdir}/libwx_%{portname}*_core*.so.* |
274 | %{_libdir}/libwx_%{portname}*_html*.so.* | |
275 | %{_libdir}/libwx_%{portname}*_adv*.so.* | |
276 | %{_libdir}/libwx_%{portname}*_dbgrid*.so.* | |
f6bcfd97 | 277 | |
4eba1840 VS |
278 | %files devel -f core-headers.files |
279 | %defattr(-,root,root) | |
280 | %{_libdir}/libwx_%{portname}*_core*.so | |
281 | %{_libdir}/libwx_%{portname}*_html*.so | |
282 | %{_libdir}/libwx_%{portname}*_adv*.so | |
283 | %{_libdir}/libwx_%{portname}*_dbgrid*.so | |
284 | %{_libdir}/libwx_%{portname}*_gl*.so | |
a3e78c76 VS |
285 | %dir %{_libdir}/wx |
286 | %{_libdir}/wx/* | |
4eba1840 | 287 | %{_bindir}/%{wxconfigname} |
a622c152 | 288 | |
f6bcfd97 | 289 | %files gl |
a3e78c76 | 290 | %defattr(-,root,root) |
4eba1840 | 291 | %{_libdir}/libwx_%{portname}*_gl*.so.* |
406e3e0d VS |
292 | |
293 | %files static | |
294 | %defattr (-,root,root) | |
4eba1840 | 295 | %{_libdir}/libwx_%{portname}*.a |