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