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