]> git.saurik.com Git - wxWidgets.git/blob - wxMotif.spec
minsize and attribute tweaks
[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.2
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/cmdline.h
105 wx/confbase.h
106 wx/config.h
107 wx/containr.h
108 wx/datetime.h
109 wx/datetime.inl
110 wx/datstrm.h
111 wx/dde.h
112 wx/debug.h
113 wx/defs.h
114 wx/dir.h
115 wx/dlimpexp.h
116 wx/dynarray.h
117 wx/dynlib.h
118 wx/dynload.h
119 wx/encconv.h
120 wx/event.h
121 wx/except.h
122 wx/features.h
123 wx/ffile.h
124 wx/file.h
125 wx/fileconf.h
126 wx/filefn.h
127 wx/filename.h
128 wx/filesys.h
129 wx/fontenc.h
130 wx/fontmap.h
131 wx/fs_mem.h
132 wx/fs_zip.h
133 wx/hash.h
134 wx/hashmap.h
135 wx/hashset.h
136 wx/iconloc.h
137 wx/init.h
138 wx/intl.h
139 wx/iosfwrap.h
140 wx/ioswrap.h
141 wx/ipc.h
142 wx/ipcbase.h
143 wx/isql.h
144 wx/isqlext.h
145 wx/list.h
146 wx/listimpl.cpp
147 wx/log.h
148 wx/longlong.h
149 wx/math.h
150 wx/memconf.h
151 wx/memory.h
152 wx/memtext.h
153 wx/mimetype.h
154 wx/module.h
155 wx/msgout.h
156 wx/msgout.h
157 wx/mstream.h
158 wx/object.h
159 wx/platform.h
160 wx/process.h
161 wx/ptr_scpd.h
162 wx/regex.h
163 wx/scopeguard.h
164 wx/snglinst.h
165 wx/stack.h
166 wx/stopwatch.h
167 wx/strconv.h
168 wx/stream.h
169 wx/string.h
170 wx/sysopt.h
171 wx/textbuf.h
172 wx/textfile.h
173 wx/thread.h
174 wx/thrimpl.cpp
175 wx/timer.h
176 wx/tokenzr.h
177 wx/txtstrm.h
178 wx/types.h
179 wx/utils.h
180 wx/variant.h
181 wx/vector.h
182 wx/version.h
183 wx/volume.h
184 wx/wfstream.h
185 wx/wx.h
186 wx/wxchar.h
187 wx/wxprec.h
188 wx/xti.h
189 wx/xtistrm.h
190 wx/zipstrm.h
191 wx/zstream.h
192 wx/msw/apptrait.h
193 wx/msw/apptbase.h
194 wx/msw/chkconf.h
195 wx/msw/crashrpt.h
196 wx/msw/dde.h
197 wx/msw/gccpriv.h
198 wx/msw/mimetype.h
199 wx/msw/winundef.h
200 wx/msw/wrapcctl.h
201 wx/msw/wrapwin.h
202 wx/fs_inet.h
203 wx/gsocket.h
204 wx/protocol/file.h
205 wx/protocol/ftp.h
206 wx/protocol/http.h
207 wx/protocol/protocol.h
208 wx/sckaddr.h
209 wx/sckipc.h
210 wx/sckstrm.h
211 wx/socket.h
212 wx/url.h
213 wx/msw/gsockmsw.h
214 wx/xml/xml.h
215 wx/xtixml.h
216 wx/db.h
217 wx/dbkeyg.h
218 wx/dbtable.h
219 EOF
220 # --- wxBase headers list ends here ---
221 for f in `cat wxbase-headers-list` ; do
222 rm -f $RPM_BUILD_ROOT%{_includedir}/$f
223 done
224
225 # list of all core headers:
226 find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
227
228 # remove wxBase files so that RPM doesn't complain about unpackaged files:
229 rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
230 rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
231 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
232
233
234 %clean
235 rm -rf $RPM_BUILD_ROOT
236
237 %post
238 /sbin/ldconfig
239
240 %postun
241 /sbin/ldconfig
242
243 %post gl
244 /sbin/ldconfig
245
246 %postun gl
247 /sbin/ldconfig
248
249 %post devel
250 # Install wx-config if there isn't any
251 if test ! -f %{_bindir}/wx-config ; then
252 ln -sf %{wxconfigname} %{_bindir}/wx-config
253 fi
254
255 %preun devel
256 # Remove wx-config if it points to this package
257 if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
258 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
259 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
260 if test "x$SUM1" = "x$SUM2" ; then
261 rm -f %{_bindir}/wx-config
262 fi
263 fi
264
265
266 %files
267 %defattr(-,root,root)
268 %doc COPYING.LIB *.txt
269 %dir %{_datadir}/wx
270 %{_datadir}/wx/*
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
276 %files devel -f core-headers.files
277 %defattr(-,root,root)
278 %{_libdir}/libwx_%{portname}*_core*.so
279 %{_libdir}/libwx_%{portname}*_html*.so
280 %{_libdir}/libwx_%{portname}*_adv*.so
281 %{_libdir}/libwx_%{portname}*_dbgrid*.so
282 %{_libdir}/libwx_%{portname}*_gl*.so
283 %dir %{_libdir}/wx
284 %{_libdir}/wx/*
285 %{_bindir}/%{wxconfigname}
286
287 %files gl
288 %defattr(-,root,root)
289 %{_libdir}/libwx_%{portname}*_gl*.so.*
290
291 %files static
292 %defattr (-,root,root)
293 %{_libdir}/libwx_%{portname}*.a