]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxX11.spec
Define XML_STATIC for Expat build to fix linking of Windows DLLs.
[wxWidgets.git] / wxX11.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.9.5
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
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/eventfilter.h
156wx/evtloop.h
157wx/except.h
158wx/features.h
159wx/flags.h
160wx/ffile.h
161wx/file.h
162wx/fileconf.h
163wx/filefn.h
164wx/filename.h
165wx/filesys.h
166wx/fontenc.h
167wx/fontmap.h
168wx/fs_arc.h
169wx/fs_filter.h
170wx/fs_mem.h
171wx/fs_zip.h
172wx/hash.h
173wx/hashmap.h
174wx/hashset.h
175wx/html/forcelnk.h
176wx/iconloc.h
177wx/init.h
178wx/intl.h
179wx/iosfwrap.h
180wx/ioswrap.h
181wx/ipc.h
182wx/ipcbase.h
183wx/kbdstate.h
184wx/language.h
185wx/link.h
186wx/list.h
187wx/listimpl.cpp
188wx/log.h
189wx/longlong.h
190wx/math.h
191wx/memconf.h
192wx/memory.h
193wx/memtext.h
194wx/mimetype.h
195wx/module.h
196wx/mousestate.h
197wx/msgout.h
198wx/msgqueue.h
199wx/mstream.h
200wx/numformatter.h
201wx/object.h
202wx/platform.h
203wx/platinfo.h
204wx/power.h
205wx/process.h
206wx/ptr_scpd.h
207wx/ptr_shrd.h
208wx/recguard.h
209wx/regex.h
210wx/rtti.h
211wx/scopedarray.h
212wx/scopedptr.h
213wx/scopeguard.h
214wx/sharedptr.h
215wx/snglinst.h
216wx/sstream.h
217wx/stack.h
218wx/stackwalk.h
219wx/stdpaths.h
220wx/stdstream.h
221wx/stockitem.h
222wx/stopwatch.h
223wx/strconv.h
224wx/stream.h
225wx/string.h
226wx/stringimpl.h
227wx/stringops.h
228wx/strvararg.h
229wx/sysopt.h
230wx/tarstrm.h
231wx/textbuf.h
232wx/textfile.h
233wx/thread.h
234wx/thrimpl.cpp
235wx/time.h
236wx/timer.h
237wx/tls.h
238wx/tokenzr.h
239wx/tracker.h
240wx/translation.h
241wx/txtstrm.h
242wx/typeinfo.h
243wx/types.h
244wx/unichar.h
245wx/uri.h
246wx/ustring.h
247wx/utils.h
248wx/variant.h
249wx/vector.h
250wx/version.h
251wx/versioninfo.h
252wx/volume.h
253wx/weakref.h
254wx/wfstream.h
255wx/wx.h
256wx/wxchar.h
257wx/wxcrt.h
258wx/wxcrtbase.h
259wx/wxcrtvararg.h
260wx/wxprec.h
261wx/xlocale.h
262wx/xti.h
263wx/xti2.h
264wx/xtistrm.h
265wx/xtictor.h
266wx/xtihandler.h
267wx/xtiprop.h
268wx/xtitypes.h
269wx/zipstrm.h
270wx/zstream.h
271wx/meta/convertible.h
272wx/meta/if.h
273wx/meta/implicitconversion.h
274wx/meta/int2type.h
275wx/meta/movable.h
276wx/meta/pod.h
277wx/meta/removeref.h
278wx/fswatcher.h
279wx/generic/fswatcher.h
280wx/unix/app.h
281wx/unix/apptbase.h
282wx/unix/apptrait.h
283wx/unix/chkconf.h
284wx/unix/evtloop.h
285wx/unix/evtloopsrc.h
286wx/unix/pipe.h
287wx/unix/stdpaths.h
288wx/unix/stackwalk.h
289wx/unix/tls.h
290wx/unix/fswatcher_kqueue.h
291wx/unix/execute.h
292wx/unix/mimetype.h
293wx/unix/fswatcher_inotify.h
294wx/fs_inet.h
295wx/protocol/file.h
296wx/protocol/ftp.h
297wx/protocol/http.h
298wx/protocol/log.h
299wx/protocol/protocol.h
300wx/sckaddr.h
301wx/sckipc.h
302wx/sckstrm.h
303wx/socket.h
304wx/url.h
305wx/xml/xml.h
306wx/xtixml.h
307EOF
308# --- wxBase headers list ends here ---
309for f in `cat wxbase-headers-list` ; do
310 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
311done
312
313# list of all core headers:
314find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
315
316# remove wxBase files so that RPM doesn't complain about unpackaged files:
317rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
318%if %{unicode}
319 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
320%endif
321rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
322rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
323
324%clean
325rm -rf $RPM_BUILD_ROOT
326
327%post
328/sbin/ldconfig
329
330%postun
331/sbin/ldconfig
332
333%post devel
334# link wx-config when you install RPM.
335ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
336# link wx-config with explicit name.
337ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
338/sbin/ldconfig
339
340%postun devel
341/sbin/ldconfig
342
343%preun devel
344if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
345 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
346 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
347 if test "x$SUM1" = "x$SUM2" ; then
348 rm -f %{_bindir}/wx-config
349 fi
350fi
351rm -f %{_bindir}/%{wxconfiglink}
352
353%post gl
354/sbin/ldconfig
355
356%postun gl
357/sbin/ldconfig
358
359%files
360%defattr(-,root,root)
361%doc COPYING.LIB *.txt
362%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
363%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
364%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
365%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
366%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
367%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
368
369
370%files devel -f core-headers.files
371%defattr(-,root,root)
372%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
373%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
374%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
375%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
376%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
377%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
378%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
379%dir %{_libdir}/wx
380%{_libdir}/wx/*
381%{_bindir}/wxrc*
382
383%files gl
384%defattr(-,root,root)
385%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
386
387%files static
388%defattr (-,root,root)
389%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
390