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