]> git.saurik.com Git - wxWidgets.git/blob - wxX11.spec
Create branch for wxWebView GSoC 2011 project.
[wxWidgets.git] / wxX11.spec
1 %define pref /usr
2 %define ver 2.9.2
3 %define ver2 2.9
4 %define rel 1
5
6 # Configurable settings (use --with(out) unicode 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 portname x11univ
12
13 %if %{unicode}
14 %define wxbasename wx-base-unicode
15 %define name wx-%{portname}-unicode
16 %define wxconfig %{portname}-unicode-%{ver2}
17 %define wxconfiglink wx%{portname}u-%{ver2}-config
18 %else
19 %define wxbasename wx-base
20 %define name wx-%{portname}
21 %define wxconfig %{portname}-ansi-%{ver2}
22 %define wxconfiglink wx%{portname}-%{ver2}-config
23 %endif
24
25 Summary: The X11 port of the wxWidgets library
26 Name: %{name}
27 Version: %{ver}
28 Release: %{rel}
29 License: wxWindows Licence
30 Group: X11/Libraries
31 Source: wxX11-%{ver}.tar.bz2
32 URL: http://www.wxwidgets.org
33 Packager: Vadim Zeitlin <vadim@wxwindows.org>
34 Prefix: %{pref}
35 BuildRoot: %{_tmppath}/%{name}-root
36 Requires: %{wxbasename} = %{ver}
37
38 # all packages providing an implementation of wxWidgets library (regardless of
39 # the toolkit used) should provide the (virtual) wxwin package, this makes it
40 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
41 Provides: wxwin
42 Provides: wxX11
43
44 %description
45 wxWidgets is a free C++ library for cross-platform GUI development.
46 With wxWidgets, you can create applications for different GUIs (GTK+,
47 Motif/LessTif, MS Windows, Mac) from the same source code.
48
49 %package devel
50 Summary: The X11 port of the wxWidgets library
51 Group: X11/Libraries
52 Requires: %{name} = %{ver}
53 Requires: %{wxbasename}-devel = %{ver}
54
55 %description devel
56 Header files for wxX11, the X11 port of the wxWidgets library.
57
58 %package gl
59 Summary: The X11 port of the wxWidgets library, OpenGL add-on.
60 Group: X11/Libraries
61 Requires: %{name} = %{ver}
62
63 %description gl
64 OpenGL add-on library for wxX11, the X11 port of the wxWidgets library.
65
66 %package static
67 Summary: wxX11 static libraries
68 Group: Development/Libraries
69 Requires: %{wxbasename}-static
70 Requires: %{name}-devel = %{ver}
71
72 %description static
73 Static libraries for wxX11. You need them if you want to link statically against wxX11.
74
75 %prep
76 %setup -q -n wxX11-%{ver}
77
78 %build
79 if [ "$SMP" != "" ]; then
80 export MAKE="make -j$SMP"
81 else
82 export MAKE="make"
83 fi
84
85 mkdir obj-shared
86 cd obj-shared
87 ../configure --prefix=%{pref} --with-x11 \
88 %if %{unicode}
89 --enable-unicode \
90 %else
91 --disable-unicode \
92 %endif
93 $MAKE
94 cd ..
95
96 mkdir obj-static
97 cd obj-static
98 ../configure --prefix=%{pref} --with-x11 --disable-shared \
99 %if %{unicode}
100 --enable-unicode \
101 %else
102 --disable-unicode \
103 %endif
104 --with-opengl
105 $MAKE
106 cd ..
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
111 (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
112
113 # Remove headers that are part of wx-base-devel:
114
115 # --- wxBase headers list begins here ---
116 cat <<EOF >wxbase-headers.files
117 wx/afterstd.h
118 wx/any.h
119 wx/anystr.h
120 wx/app.h
121 wx/apptrait.h
122 wx/archive.h
123 wx/arrimpl.cpp
124 wx/arrstr.h
125 wx/atomic.h
126 wx/base64.h
127 wx/beforestd.h
128 wx/buffer.h
129 wx/build.h
130 wx/chartype.h
131 wx/checkeddelete.h
132 wx/chkconf.h
133 wx/clntdata.h
134 wx/cmdargs.h
135 wx/cmdline.h
136 wx/confbase.h
137 wx/config.h
138 wx/convauto.h
139 wx/containr.h
140 wx/cpp.h
141 wx/crt.h
142 wx/datetime.h
143 wx/datstrm.h
144 wx/dde.h
145 wx/debug.h
146 wx/defs.h
147 wx/dir.h
148 wx/dlimpexp.h
149 wx/dlist.h
150 wx/dynarray.h
151 wx/dynlib.h
152 wx/dynload.h
153 wx/encconv.h
154 wx/event.h
155 wx/evtloop.h
156 wx/except.h
157 wx/features.h
158 wx/flags.h
159 wx/ffile.h
160 wx/file.h
161 wx/fileconf.h
162 wx/filefn.h
163 wx/filename.h
164 wx/filesys.h
165 wx/fontenc.h
166 wx/fontmap.h
167 wx/fs_arc.h
168 wx/fs_filter.h
169 wx/fs_mem.h
170 wx/fs_zip.h
171 wx/hash.h
172 wx/hashmap.h
173 wx/hashset.h
174 wx/html/forcelnk.h
175 wx/iconloc.h
176 wx/init.h
177 wx/intl.h
178 wx/iosfwrap.h
179 wx/ioswrap.h
180 wx/ipc.h
181 wx/ipcbase.h
182 wx/kbdstate.h
183 wx/language.h
184 wx/link.h
185 wx/list.h
186 wx/listimpl.cpp
187 wx/log.h
188 wx/longlong.h
189 wx/math.h
190 wx/memconf.h
191 wx/memory.h
192 wx/memtext.h
193 wx/mimetype.h
194 wx/module.h
195 wx/mousestate.h
196 wx/msgout.h
197 wx/msgqueue.h
198 wx/mstream.h
199 wx/numformatter.h
200 wx/object.h
201 wx/platform.h
202 wx/platinfo.h
203 wx/power.h
204 wx/process.h
205 wx/ptr_scpd.h
206 wx/ptr_shrd.h
207 wx/recguard.h
208 wx/regex.h
209 wx/rtti.h
210 wx/scopedarray.h
211 wx/scopedptr.h
212 wx/scopeguard.h
213 wx/sharedptr.h
214 wx/snglinst.h
215 wx/sstream.h
216 wx/stack.h
217 wx/stackwalk.h
218 wx/stdpaths.h
219 wx/stdstream.h
220 wx/stockitem.h
221 wx/stopwatch.h
222 wx/strconv.h
223 wx/stream.h
224 wx/string.h
225 wx/stringimpl.h
226 wx/stringops.h
227 wx/strvararg.h
228 wx/sysopt.h
229 wx/tarstrm.h
230 wx/textbuf.h
231 wx/textfile.h
232 wx/thread.h
233 wx/thrimpl.cpp
234 wx/timer.h
235 wx/tls.h
236 wx/tokenzr.h
237 wx/tracker.h
238 wx/translation.h
239 wx/txtstrm.h
240 wx/typeinfo.h
241 wx/types.h
242 wx/unichar.h
243 wx/uri.h
244 wx/ustring.h
245 wx/utils.h
246 wx/variant.h
247 wx/vector.h
248 wx/version.h
249 wx/versioninfo.h
250 wx/volume.h
251 wx/weakref.h
252 wx/wfstream.h
253 wx/wx.h
254 wx/wxchar.h
255 wx/wxcrt.h
256 wx/wxcrtbase.h
257 wx/wxcrtvararg.h
258 wx/wxprec.h
259 wx/xlocale.h
260 wx/xti.h
261 wx/xti2.h
262 wx/xtistrm.h
263 wx/xtictor.h
264 wx/xtihandler.h
265 wx/xtiprop.h
266 wx/xtitypes.h
267 wx/zipstrm.h
268 wx/zstream.h
269 wx/meta/convertible.h
270 wx/meta/if.h
271 wx/meta/implicitconversion.h
272 wx/meta/int2type.h
273 wx/meta/movable.h
274 wx/meta/pod.h
275 wx/fswatcher.h
276 wx/generic/fswatcher.h
277 wx/unix/app.h
278 wx/unix/apptbase.h
279 wx/unix/apptrait.h
280 wx/unix/chkconf.h
281 wx/unix/evtloop.h
282 wx/unix/evtloopsrc.h
283 wx/unix/pipe.h
284 wx/unix/stdpaths.h
285 wx/unix/stackwalk.h
286 wx/unix/tls.h
287 wx/unix/fswatcher_kqueue.h
288 wx/unix/execute.h
289 wx/unix/mimetype.h
290 wx/unix/fswatcher_inotify.h
291 wx/fs_inet.h
292 wx/protocol/file.h
293 wx/protocol/ftp.h
294 wx/protocol/http.h
295 wx/protocol/log.h
296 wx/protocol/protocol.h
297 wx/sckaddr.h
298 wx/sckipc.h
299 wx/sckstrm.h
300 wx/socket.h
301 wx/url.h
302 wx/xml/xml.h
303 wx/xtixml.h
304 EOF
305 # --- wxBase headers list ends here ---
306 for f in `cat wxbase-headers-list` ; do
307 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
308 done
309
310 # list of all core headers:
311 find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
312
313 # remove wxBase files so that RPM doesn't complain about unpackaged files:
314 rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
315 %if %{unicode}
316 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
317 %endif
318 rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
319 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
320
321 %clean
322 rm -rf $RPM_BUILD_ROOT
323
324 %post
325 /sbin/ldconfig
326
327 %postun
328 /sbin/ldconfig
329
330 %post devel
331 # link wx-config when you install RPM.
332 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
333 # link wx-config with explicit name.
334 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
335 /sbin/ldconfig
336
337 %postun devel
338 /sbin/ldconfig
339
340 %preun devel
341 if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
342 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
343 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
344 if test "x$SUM1" = "x$SUM2" ; then
345 rm -f %{_bindir}/wx-config
346 fi
347 fi
348 rm -f %{_bindir}/%{wxconfiglink}
349
350 %post gl
351 /sbin/ldconfig
352
353 %postun gl
354 /sbin/ldconfig
355
356 %files
357 %defattr(-,root,root)
358 %doc COPYING.LIB *.txt
359 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
360 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
361 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
362 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
363 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
364 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
365
366
367 %files devel -f core-headers.files
368 %defattr(-,root,root)
369 %{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
370 %{_libdir}/libwx_%{portname}*_core-%{ver2}.so
371 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
372 %{_libdir}/libwx_%{portname}*_html-%{ver2}.so
373 %{_libdir}/libwx_%{portname}*_media-%{ver2}.so
374 %{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
375 %{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
376 %dir %{_libdir}/wx
377 %{_libdir}/wx/*
378 %{_bindir}/wxrc*
379
380 %files gl
381 %defattr(-,root,root)
382 %{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
383
384 %files static
385 %defattr (-,root,root)
386 %{_libdir}/libwx_%{portname}*_*-%{ver2}.a
387