]> git.saurik.com Git - wxWidgets.git/blob - wxGTK.spec
unused param warnings fixed
[wxWidgets.git] / wxGTK.spec
1 %define pref /usr
2 %define ver 2.5.1
3 %define ver2 2.5
4 %define rel 1
5
6 # Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
7 %define unicode 0
8 %{?_with_unicode: %{expand: %%define unicode 1}}
9 %{?_without_unicode: %{expand: %%define unicode 0}}
10
11 %define gtk2 0
12 %{?_with_gtk2: %{expand: %%define gtk2 1}}
13 %{?_without_gtk2: %{expand: %%define gtk2 0}}
14
15 %if %{gtk2}
16 %define gtkver 2
17 %define portname gtk2
18 %else
19 %define gtkver 1.2
20 %define portname gtk
21 %endif
22
23 %if %{unicode}
24 %define name wx-%{portname}-unicode
25 %define wxbasename wx-base-unicode
26 %else
27 %define name wx-%{portname}
28 %define wxbasename wx-base
29 %endif
30
31 %if %{unicode}
32 %define wxconfigname wx%{portname}u-%{ver2}-config
33 %else
34 %define wxconfigname wx%{portname}-%{ver2}-config
35 %endif
36
37 Name: %{name}
38 Summary: The GTK+ %{gtkver} port of the wxWindows library
39 Version: %{ver}
40 Release: %{rel}
41 License: wxWindows Licence
42 Group: X11/Libraries
43 Source: wxGTK-%{ver}.tar.bz2
44 URL: http://www.wxwindows.org
45 Packager: Vadim Zeitlin <vadim@wxwindows.org>
46 Prefix: %{pref}
47 BuildRoot: /var/tmp/%{name}-root
48
49 # all packages providing an implementation of wxWindows library (regardless of
50 # the toolkit used) should provide the (virtual) wxwin package, this makes it
51 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
52 Provides: wxwin
53 Provides: wxGTK
54
55 # in addition, we should provide libwx_gtk as automatic generator only notices
56 # libwx_gtk-%{ver}-%{rel}
57 Provides: libwx_gtk.so
58 Provides: libwx_gtk-%{ver2}.so
59
60 Requires: %{wxbasename} = %{ver}
61
62 %description
63 wxWindows is a free C++ library for cross-platform GUI development.
64 With wxWindows, you can create applications for different GUIs (GTK+,
65 Motif/LessTif, MS Windows, Mac) from the same source code.
66
67 %package devel
68 Summary: The GTK+ %{gtkver} port of the wxWindows library
69 Group: X11/Libraries
70 Requires: %{name} = %{ver}
71 Requires: %{wxbasename}-devel = %{ver}
72 Provides: wxGTK-devel
73
74 %description devel
75 Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
76
77 %package gl
78 Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on.
79 Group: X11/Libraries
80 Requires: %{name} = %{ver}
81
82 %description gl
83 OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
84
85 %package static
86 Summary: wxGTK static libraries
87 Group: Development/Libraries
88 Requires: %{wxbasename}-static
89
90 %description static
91 Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
92
93 %package contrib
94 Summary: The GTK+ %{gtkver} port of the wxWindows library, contributed libraries.
95 Group: X11/Libraries
96 Requires: %{name} = %{ver}
97
98 %description contrib
99 Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
100
101 %package contrib-devel
102 Summary: The GTK+ %{gtkver} port of the wxWindows library
103 Group: X11/Libraries
104 Requires: %{name}-contrib = %{ver}
105 Requires: %{name}-devel = %{ver}
106
107 %description contrib-devel
108 Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
109
110 %prep
111 %setup -q -n wxGTK-%{ver}
112
113 %build
114 if [ "$SMP" != "" ]; then
115 export MAKE="make -j$SMP"
116 else
117 export MAKE="make"
118 fi
119
120 mkdir obj-shared
121 cd obj-shared
122 ../configure --prefix=%{pref} \
123 %if %{unicode}
124 --enable-unicode \
125 %else
126 --with-odbc \
127 %endif
128 %if %{gtk2}
129 --enable-gtk2 \
130 %endif
131 --with-opengl
132 $MAKE
133 cd contrib/src
134 $MAKE
135 cd ../../..
136
137 mkdir obj-static
138 cd obj-static
139 ../configure --prefix=%{pref} --disable-shared \
140 %if %{unicode}
141 --enable-unicode \
142 %else
143 --with-odbc \
144 %endif
145 %if %{gtk2}
146 --enable-gtk2 \
147 %endif
148 --with-opengl
149 $MAKE
150 cd ..
151
152 %install
153 rm -rf $RPM_BUILD_ROOT
154 (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
155 (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
156
157 # Remove headers that are part of wx-base-devel:
158
159 # --- wxBase headers list begins here ---
160 cat <<EOF >wxbase-headers-list
161 wx/afterstd.h
162 wx/app.h
163 wx/apptrait.h
164 wx/arrimpl.cpp
165 wx/arrstr.h
166 wx/beforestd.h
167 wx/buffer.h
168 wx/build.h
169 wx/chkconf.h
170 wx/clntdata.h
171 wx/cmdline.h
172 wx/confbase.h
173 wx/config.h
174 wx/containr.h
175 wx/datetime.h
176 wx/datetime.inl
177 wx/datstrm.h
178 wx/dde.h
179 wx/debug.h
180 wx/defs.h
181 wx/dir.h
182 wx/dynarray.h
183 wx/dynlib.h
184 wx/dynload.h
185 wx/encconv.h
186 wx/event.h
187 wx/except.h
188 wx/features.h
189 wx/ffile.h
190 wx/file.h
191 wx/fileconf.h
192 wx/filefn.h
193 wx/filename.h
194 wx/filesys.h
195 wx/fontenc.h
196 wx/fontmap.h
197 wx/fs_mem.h
198 wx/fs_zip.h
199 wx/hash.h
200 wx/hashmap.h
201 wx/hashset.h
202 wx/iconloc.h
203 wx/init.h
204 wx/intl.h
205 wx/iosfwrap.h
206 wx/ioswrap.h
207 wx/ipc.h
208 wx/ipcbase.h
209 wx/isql.h
210 wx/isqlext.h
211 wx/list.h
212 wx/listimpl.cpp
213 wx/log.h
214 wx/longlong.h
215 wx/math.h
216 wx/memconf.h
217 wx/memory.h
218 wx/memtext.h
219 wx/mimetype.h
220 wx/module.h
221 wx/msgout.h
222 wx/msgout.h
223 wx/mstream.h
224 wx/object.h
225 wx/platform.h
226 wx/process.h
227 wx/ptr_scpd.h
228 wx/regex.h
229 wx/scopeguard.h
230 wx/snglinst.h
231 wx/stopwatch.h
232 wx/strconv.h
233 wx/stream.h
234 wx/string.h
235 wx/sysopt.h
236 wx/textbuf.h
237 wx/textfile.h
238 wx/thread.h
239 wx/thrimpl.cpp
240 wx/timer.h
241 wx/tokenzr.h
242 wx/txtstrm.h
243 wx/types.h
244 wx/utils.h
245 wx/variant.h
246 wx/vector.h
247 wx/version.h
248 wx/volume.h
249 wx/wfstream.h
250 wx/wx.h
251 wx/wxchar.h
252 wx/wxprec.h
253 wx/xti.h
254 wx/xtistrm.h
255 wx/zipstrm.h
256 wx/zstream.h
257 wx/msw/apptrait.h
258 wx/msw/apptbase.h
259 wx/msw/chkconf.h
260 wx/msw/crashrpt.h
261 wx/msw/dde.h
262 wx/msw/gccpriv.h
263 wx/msw/mimetype.h
264 wx/msw/winundef.h
265 wx/msw/wrapcctl.h
266 wx/msw/wrapwin.h
267 wx/fs_inet.h
268 wx/gsocket.h
269 wx/protocol/file.h
270 wx/protocol/ftp.h
271 wx/protocol/http.h
272 wx/protocol/protocol.h
273 wx/sckaddr.h
274 wx/sckipc.h
275 wx/sckstrm.h
276 wx/socket.h
277 wx/url.h
278 wx/msw/gsockmsw.h
279 wx/xml/xml.h
280 wx/xtixml.h
281 wx/db.h
282 wx/dbkeyg.h
283 wx/dbtable.h
284 EOF
285 # --- wxBase headers list ends here ---
286 for f in `cat wxbase-headers-list` ; do
287 rm -f $RPM_BUILD_ROOT%{_includedir}/$f
288 done
289
290 # list of all core headers:
291 find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
292
293 # contrib stuff:
294 (cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
295 (cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
296
297 %clean
298 rm -rf $RPM_BUILD_ROOT
299
300 %post
301 /sbin/ldconfig
302
303 %postun
304 /sbin/ldconfig
305
306 %post gl
307 /sbin/ldconfig
308
309 %postun gl
310 /sbin/ldconfig
311
312 %post devel
313 # Install wx-config if there isn't any
314 if test ! -f %{_bindir}/wx-config ; then
315 ln -sf %{wxconfigname} %{_bindir}/wx-config
316 fi
317
318 %preun devel
319 # Remove wx-config if it points to this package
320 if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
321 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
322 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
323 if test "x$SUM1" = "x$SUM2" ; then
324 rm -f %{_bindir}/wx-config
325 fi
326 fi
327
328
329 %files
330 %defattr(-,root,root)
331 %doc COPYING.LIB *.txt
332 %dir %{_datadir}/wx
333 %{_datadir}/wx/*
334 %{_libdir}/libwx_%{portname}*_core*.so.*
335 %{_libdir}/libwx_%{portname}*_html*.so.*
336 %{_libdir}/libwx_%{portname}*_adv*.so.*
337 %if !%{unicode}
338 %{_libdir}/libwx_%{portname}*_dbgrid*.so.*
339 %endif
340
341 %files devel -f core-headers.files
342 %defattr(-,root,root)
343 %{_libdir}/libwx_%{portname}*_core*.so
344 %{_libdir}/libwx_%{portname}*_html*.so
345 %{_libdir}/libwx_%{portname}*_adv*.so
346 %if !%{unicode}
347 %{_libdir}/libwx_%{portname}*_dbgrid*.so
348 %endif
349 %{_libdir}/libwx_%{portname}*_gl*.so
350 %dir %{_libdir}/wx
351 %{_libdir}/wx/*
352 %{_bindir}/%{wxconfigname}
353
354 %files gl
355 %defattr(-,root,root)
356 %{_libdir}/libwx_%{portname}*_gl*.so.*
357
358 %files static
359 %defattr (-,root,root)
360 %{_libdir}/libwx_gtk*.a
361
362 %files contrib
363 %defattr(-,root,root)
364 %{_libdir}/libwx_%{portname}*_animate*.so.*
365 %{_libdir}/libwx_%{portname}*_deprecated*.so.*
366 %{_libdir}/libwx_%{portname}*_fl*.so.*
367 %{_libdir}/libwx_%{portname}*_gizmos*.so.*
368 %{_libdir}/libwx_%{portname}*_mmedia*.so.*
369 %{_libdir}/libwx_%{portname}*_ogl*.so.*
370 %{_libdir}/libwx_%{portname}*_plot*.so.*
371 %{_libdir}/libwx_%{portname}*_stc*.so.*
372 %{_libdir}/libwx_%{portname}*_svg*.so.*
373 %{_libdir}/libwx_%{portname}*_xrc*.so.*
374
375 %files contrib-devel
376 %defattr(-,root,root)
377 %{_bindir}/wxrc
378 %dir %{_includedir}/wx/animate
379 %{_includedir}/wx/animate/*
380 %{_libdir}/libwx_%{portname}*_animate*.so
381
382 %dir %{_includedir}/wx/deprecated
383 %{_includedir}/wx/deprecated/*
384 %{_libdir}/libwx_%{portname}*_deprecated*.so
385
386 %dir %{_includedir}/wx/fl
387 %{_includedir}/wx/fl/*
388 %{_libdir}/libwx_%{portname}*_fl*.so
389
390 %dir %{_includedir}/wx/gizmos
391 %{_includedir}/wx/gizmos/*
392 %{_libdir}/libwx_%{portname}*_gizmos*.so
393
394 %dir %{_includedir}/wx/mmedia
395 %{_includedir}/wx/mmedia/*
396 %{_libdir}/libwx_%{portname}*_mmedia*.so
397
398 %dir %{_includedir}/wx/ogl
399 %{_includedir}/wx/ogl/*
400 %{_libdir}/libwx_%{portname}*_ogl*.so
401
402 %dir %{_includedir}/wx/plot
403 %{_includedir}/wx/plot/*
404 %{_libdir}/libwx_%{portname}*_plot*.so
405
406 %dir %{_includedir}/wx/stc
407 %{_includedir}/wx/stc/*
408 %{_libdir}/libwx_%{portname}*_stc*.so
409
410 %dir %{_includedir}/wx/svg
411 %{_includedir}/wx/svg/*
412 %{_libdir}/libwx_%{portname}*_svg*.so
413
414 %dir %{_includedir}/wx/xrc
415 %{_includedir}/wx/xrc/*
416 %{_libdir}/libwx_%{portname}*_xrc*.so