]> git.saurik.com Git - wxWidgets.git/blob - wxMotif.spec
undid the last patch: set wxUSE_XXX to 0 in setup.h.in instead of having to do it...
[wxWidgets.git] / wxMotif.spec
1 %define pref /usr
2 %define ver 2.5.3
3 %define ver2 2.5
4 %define rel 1
5
6 %define portname motif
7 %define name wx-%{portname}
8 %define wxbasename wx-base
9 %define wxconfigname wx%{portname}-%{ver2}-config
10
11 Summary: The Motif/Lesstif port of the wxWindows library
12 Name: %{name}
13 Version: %{ver}
14 Release: %{rel}
15 License: wxWindows Licence
16 Group: X11/Libraries
17 Source: wxMOTIF-%{ver}.tar.bz2
18 URL: http://www.wxwidgets.org
19 Packager: wxWindows developers <wx-dev@lists.wxwidgets.org>
20 BuildRoot: /tmp/wxmotif_root
21
22 # all packages providing an implementation of wxWindows library (regardless of
23 # the toolkit used) should provide the (virtual) wxwin package, this makes it
24 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
25 Provides: wxwin
26
27 Provides: wxMotif
28
29 Requires: %{wxbasename} = %{ver}
30
31 %description
32 wxWindows is a free C++ library for cross-platform GUI development.
33 With wxWindows, 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 wxWindows 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 wxWindows library.
44
45 %package gl
46 Summary: The Motif/Lesstif port of the wxWindows 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 wxWindows library.
52
53 %package static
54 Summary: wxMotif static libraries
55 Group: Development/Libraries
56
57 %description static
58 Static libraries for wxMotif. You need them if you want to link statically against wxMotif.
59
60 %prep
61 %setup -q -n wxMOTIF-%{ver}
62
63 %build
64 if [ "$SMP" != "" ]; then
65 export MAKE="make -j$SMP"
66 else
67 export MAKE="make"
68 fi
69
70 mkdir obj-shared
71 cd obj-shared
72 ../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif
73 $MAKE
74 cd ..
75
76 mkdir obj-static
77 cd obj-static
78 ../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl --with-motif
79 $MAKE
80 cd ..
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
85 (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
86
87 # Remove headers that are part of wx-base-devel:
88
89 # --- wxBase headers list begins here ---
90 cat <<EOF >wxbase-headers-list
91 wx/afterstd.h
92 wx/app.h
93 wx/apptrait.h
94 wx/archive.h
95 wx/arrimpl.cpp
96 wx/arrstr.h
97 wx/beforestd.h
98 wx/buffer.h
99 wx/build.h
100 wx/chkconf.h
101 wx/clntdata.h
102 wx/cmdline.h
103 wx/confbase.h
104 wx/config.h
105 wx/containr.h
106 wx/datetime.h
107 wx/datetime.inl
108 wx/datstrm.h
109 wx/dde.h
110 wx/debug.h
111 wx/defs.h
112 wx/dir.h
113 wx/dlimpexp.h
114 wx/dynarray.h
115 wx/dynlib.h
116 wx/dynload.h
117 wx/encconv.h
118 wx/event.h
119 wx/except.h
120 wx/features.h
121 wx/ffile.h
122 wx/file.h
123 wx/fileconf.h
124 wx/filefn.h
125 wx/filename.h
126 wx/filesys.h
127 wx/fontenc.h
128 wx/fontmap.h
129 wx/fs_mem.h
130 wx/fs_zip.h
131 wx/hash.h
132 wx/hashmap.h
133 wx/hashset.h
134 wx/iconloc.h
135 wx/init.h
136 wx/intl.h
137 wx/iosfwrap.h
138 wx/ioswrap.h
139 wx/ipc.h
140 wx/ipcbase.h
141 wx/isql.h
142 wx/isqlext.h
143 wx/list.h
144 wx/listimpl.cpp
145 wx/log.h
146 wx/longlong.h
147 wx/math.h
148 wx/memconf.h
149 wx/memory.h
150 wx/memtext.h
151 wx/mimetype.h
152 wx/module.h
153 wx/msgout.h
154 wx/msgout.h
155 wx/mstream.h
156 wx/object.h
157 wx/platform.h
158 wx/process.h
159 wx/ptr_scpd.h
160 wx/regex.h
161 wx/scopeguard.h
162 wx/snglinst.h
163 wx/sstream.h
164 wx/stack.h
165 wx/stdpaths.h
166 wx/stockitem.h
167 wx/stopwatch.h
168 wx/strconv.h
169 wx/stream.h
170 wx/string.h
171 wx/sysopt.h
172 wx/textbuf.h
173 wx/textfile.h
174 wx/thread.h
175 wx/thrimpl.cpp
176 wx/timer.h
177 wx/tokenzr.h
178 wx/txtstrm.h
179 wx/types.h
180 wx/uri.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}/wx-*/$f
225 done
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
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
235
236 %clean
237 rm -rf $RPM_BUILD_ROOT
238
239 %post
240 /sbin/ldconfig
241
242 %postun
243 /sbin/ldconfig
244
245 %post gl
246 /sbin/ldconfig
247
248 %postun gl
249 /sbin/ldconfig
250
251
252 %files
253 %defattr(-,root,root)
254 %doc COPYING.LIB *.txt
255 %dir %{_datadir}/wx
256 %{_datadir}/wx/*
257 %{_libdir}/libwx_%{portname}*_core*.so.*
258 %{_libdir}/libwx_%{portname}*_html*.so.*
259 %{_libdir}/libwx_%{portname}*_adv*.so.*
260 %{_libdir}/libwx_%{portname}*_dbgrid*.so.*
261
262 %files devel -f core-headers.files
263 %defattr(-,root,root)
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 %{_libdir}/libwx_%{portname}*_gl*.so
269 %dir %{_libdir}/wx
270 %{_libdir}/wx/*
271 %{_bindir}/%{wxconfigname}
272
273 %files gl
274 %defattr(-,root,root)
275 %{_libdir}/libwx_%{portname}*_gl*.so.*
276
277 %files static
278 %defattr (-,root,root)
279 %{_libdir}/libwx_%{portname}*.a
280