]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxGTK.spec
Fix previous change in case somebody is still using
[wxWidgets.git] / wxGTK.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.6.0
3%define ver2 2.6
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 1
12%{?_with_gtk2: %{expand: %%define gtk2 1}}
13%{?_without_gtk2: %{expand: %%define gtk2 0}}
14
15%define universal 0
16%{?_with_universal: %{expand: %%define universal 1}}
17%{?_without_universal: %{expand: %%define universal 0}}
18
19%if %{gtk2}
20 %define gtkver 2
21
22 %if %{universal}
23 %define portname gtk2univ
24 %else
25 %define portname gtk2
26 %endif
27%else
28 %define gtkver 1.2
29
30 %if %{universal}
31 %define portname gtkuniv
32 %else
33 %define portname gtk
34 %endif
35%endif
36
37%if %{unicode}
38 %define wxbasename wx-base-unicode
39 %define name wx-%{portname}-unicode
40 %define wxconfig %{portname}-unicode-release-%{ver2}
41 %define wxconfiglink wx%{portname}u-%{ver2}-config
42%else
43 %define wxbasename wx-base
44 %define name wx-%{portname}
45 %define wxconfig %{portname}-ansi-release-%{ver2}
46 %define wxconfiglink wx%{portname}-%{ver2}-config
47%endif
48
49Summary: The GTK+ %{gtkver} port of the wxWidgets library
50Name: %{name}
51Version: %{ver}
52Release: %{rel}
53License: wxWindows Licence
54Group: X11/Libraries
55Source: wxGTK-%{ver}.tar.bz2
56URL: http://www.wxwidgets.org
57Packager: Vadim Zeitlin <vadim@wxwindows.org>
58Prefix: %{pref}
59BuildRoot: %{_tmppath}/%{name}-root
60Requires: %{wxbasename} = %{ver}
61
62# all packages providing an implementation of wxWidgets library (regardless of
63# the toolkit used) should provide the (virtual) wxwin package, this makes it
64# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
65Provides: wxwin
66Provides: wxGTK
67
68%description
69wxWidgets is a free C++ library for cross-platform GUI development.
70With wxWidgets, you can create applications for different GUIs (GTK+,
71Motif/LessTif, MS Windows, Mac) from the same source code.
72
73%package devel
74Summary: The GTK+ %{gtkver} port of the wxWidgets library
75Group: X11/Libraries
76Requires: %{name} = %{ver}
77Requires: %{wxbasename}-devel = %{ver}
78Provides: wxGTK-devel
79
80%description devel
81Header files for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
82
83%package gl
84Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on.
85Group: X11/Libraries
86Requires: %{name} = %{ver}
87Provides: wxGTK-gl
88
89%description gl
90OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
91
92%package static
93Summary: wxGTK static libraries
94Group: Development/Libraries
95Requires: %{wxbasename}-static
96Requires: %{name}-devel = %{ver}
97
98%description static
99Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
100
101%package contrib
102Summary: The GTK+ %{gtkver} port of the wxWidgets library, contributed libraries.
103Group: X11/Libraries
104Requires: %{name} = %{ver}
105
106%description contrib
107Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
108
109%package contrib-devel
110Summary: The GTK+ %{gtkver} port of the wxWidgets library
111Group: X11/Libraries
112Requires: %{name}-contrib = %{ver}
113Requires: %{name}-devel = %{ver}
114
115%description contrib-devel
116Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
117
118%prep
119%setup -q -n wxGTK-%{ver}
120
121%build
122if [ "$SMP" != "" ]; then
123 export MAKE="make -j$SMP"
124else
125 export MAKE="make"
126fi
127
128mkdir obj-shared
129cd obj-shared
130../configure --prefix=%{pref} --with-gtk \
131%if %{unicode}
132 --enable-unicode \
133%else
134 --with-odbc \
135%endif
136%if ! %{gtk2}
137 --disable-gtk2 \
138%endif
139%if %{universal}
140 --enable-universal \
141%endif
142 --with-opengl
143$MAKE
144
145cd contrib/src
146$MAKE
147cd ../../..
148
149mkdir obj-static
150cd obj-static
151../configure --prefix=%{pref} --with-gtk --disable-shared \
152%if %{unicode}
153 --enable-unicode \
154%else
155 --with-odbc \
156%endif
157%if ! %{gtk2}
158 --disable-gtk2 \
159%endif
160%if %{universal}
161 --enable-universal \
162%endif
163 --with-opengl
164$MAKE
165cd ..
166
167%install
168rm -rf $RPM_BUILD_ROOT
169(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
170(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
171
172# Remove headers that are part of wx-base-devel:
173
174# --- wxBase headers list begins here ---
175cat <<EOF >wxbase-headers-list
176wx/afterstd.h
177wx/app.h
178wx/apptrait.h
179wx/archive.h
180wx/arrimpl.cpp
181wx/arrstr.h
182wx/beforestd.h
183wx/buffer.h
184wx/build.h
185wx/chkconf.h
186wx/clntdata.h
187wx/cmdline.h
188wx/confbase.h
189wx/config.h
190wx/containr.h
191wx/datetime.h
192wx/datetime.inl
193wx/datstrm.h
194wx/dde.h
195wx/debug.h
196wx/defs.h
197wx/dir.h
198wx/dlimpexp.h
199wx/dynarray.h
200wx/dynlib.h
201wx/dynload.h
202wx/encconv.h
203wx/event.h
204wx/except.h
205wx/features.h
206wx/ffile.h
207wx/file.h
208wx/fileconf.h
209wx/filefn.h
210wx/filename.h
211wx/filesys.h
212wx/fontenc.h
213wx/fontmap.h
214wx/fs_mem.h
215wx/fs_zip.h
216wx/hash.h
217wx/hashmap.h
218wx/hashset.h
219wx/html/forcelnk.h
220wx/iconloc.h
221wx/init.h
222wx/intl.h
223wx/iosfwrap.h
224wx/ioswrap.h
225wx/ipc.h
226wx/ipcbase.h
227wx/isql.h
228wx/isqlext.h
229wx/list.h
230wx/listimpl.cpp
231wx/log.h
232wx/longlong.h
233wx/math.h
234wx/memconf.h
235wx/memory.h
236wx/memtext.h
237wx/mimetype.h
238wx/module.h
239wx/msgout.h
240wx/msgout.h
241wx/mstream.h
242wx/object.h
243wx/platform.h
244wx/process.h
245wx/ptr_scpd.h
246wx/regex.h
247wx/scopeguard.h
248wx/snglinst.h
249wx/sstream.h
250wx/stack.h
251wx/stackwalk.h
252wx/stdpaths.h
253wx/stockitem.h
254wx/stopwatch.h
255wx/strconv.h
256wx/stream.h
257wx/string.h
258wx/sysopt.h
259wx/textbuf.h
260wx/textfile.h
261wx/thread.h
262wx/thrimpl.cpp
263wx/timer.h
264wx/tokenzr.h
265wx/txtstrm.h
266wx/types.h
267wx/uri.h
268wx/utils.h
269wx/variant.h
270wx/vector.h
271wx/version.h
272wx/volume.h
273wx/wfstream.h
274wx/wx.h
275wx/wxchar.h
276wx/wxprec.h
277wx/xti.h
278wx/xtistrm.h
279wx/zipstrm.h
280wx/zstream.h
281wx/msw/apptrait.h
282wx/msw/apptbase.h
283wx/msw/chkconf.h
284wx/msw/crashrpt.h
285wx/msw/dde.h
286wx/msw/debughlp.h
287wx/msw/gccpriv.h
288wx/msw/mimetype.h
289wx/msw/stackwalk.h
290wx/msw/winundef.h
291wx/msw/wrapcctl.h
292wx/msw/wrapcdlg.h
293wx/msw/wrapwin.h
294wx/fs_inet.h
295wx/gsocket.h
296wx/protocol/file.h
297wx/protocol/ftp.h
298wx/protocol/http.h
299wx/protocol/protocol.h
300wx/sckaddr.h
301wx/sckipc.h
302wx/sckstrm.h
303wx/socket.h
304wx/url.h
305wx/msw/gsockmsw.h
306wx/xml/xml.h
307wx/xtixml.h
308wx/db.h
309wx/dbkeyg.h
310wx/dbtable.h
311EOF
312# --- wxBase headers list ends here ---
313for f in `cat wxbase-headers-list` ; do
314 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
315done
316
317# list of all core headers:
318find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
319
320# contrib stuff:
321(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
322(cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
323
324# remove wxBase files so that RPM doesn't complain about unpackaged files:
325rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
326%if %{unicode}
327 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
328%endif
329rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
330rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
331
332%clean
333rm -rf $RPM_BUILD_ROOT
334
335%post
336/sbin/ldconfig
337
338%postun
339/sbin/ldconfig
340
341%post devel
342# link wx-config when you install RPM.
343ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
344# link wx-config with explicit name.
345ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
346/sbin/ldconfig
347
348%postun devel
349/sbin/ldconfig
350
351%preun devel
352if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
353 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
354 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
355 if test "x$SUM1" = "x$SUM2" ; then
356 rm -f %{_bindir}/wx-config
357 fi
358fi
359rm -f %{_bindir}/%{wxconfiglink}
360
361%post gl
362/sbin/ldconfig
363
364%postun gl
365/sbin/ldconfig
366
367%post contrib
368/sbin/ldconfig
369
370%postun contrib
371/sbin/ldconfig
372
373%post contrib-devel
374/sbin/ldconfig
375
376%postun contrib-devel
377/sbin/ldconfig
378
379%files
380%defattr(-,root,root)
381%doc COPYING.LIB *.txt
382%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
383%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
384%if !%{unicode}
385 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so.*
386%endif
387%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
388%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
389%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
390%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
391
392
393%files devel -f core-headers.files
394%defattr(-,root,root)
395%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
396%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
397%if !%{unicode}
398 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so
399%endif
400%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
401%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
402%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
403%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
404%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
405%dir %{_libdir}/wx
406%{_libdir}/wx/*
407%{_bindir}/wxrc*
408
409%files gl
410%defattr(-,root,root)
411%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
412
413%files static
414%defattr (-,root,root)
415%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
416
417%files contrib
418%defattr(-,root,root)
419%{_libdir}/libwx_%{portname}*_animate-%{ver2}.so.*
420%{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so.*
421%{_libdir}/libwx_%{portname}*_fl-%{ver2}.so.*
422%{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so.*
423%{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so.*
424%{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so.*
425%{_libdir}/libwx_%{portname}*_plot-%{ver2}.so.*
426%{_libdir}/libwx_%{portname}*_stc-%{ver2}.so.*
427%{_libdir}/libwx_%{portname}*_svg-%{ver2}.so.*
428
429%files contrib-devel
430%defattr(-,root,root)
431%dir %{_includedir}/wx-%{ver2}/wx/animate
432%{_includedir}/wx-%{ver2}/wx/animate/*
433%{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
434
435%dir %{_includedir}/wx-%{ver2}/wx/deprecated
436%{_includedir}/wx-%{ver2}/wx/deprecated/*
437%{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
438
439%dir %{_includedir}/wx-%{ver2}/wx/fl
440%{_includedir}/wx-%{ver2}/wx/fl/*
441%{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
442
443%dir %{_includedir}/wx-%{ver2}/wx/gizmos
444%{_includedir}/wx-%{ver2}/wx/gizmos/*
445%{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
446
447%dir %{_includedir}/wx-%{ver2}/wx/mmedia
448%{_includedir}/wx-%{ver2}/wx/mmedia/*
449%{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
450
451%dir %{_includedir}/wx-%{ver2}/wx/ogl
452%{_includedir}/wx-%{ver2}/wx/ogl/*
453%{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
454
455%dir %{_includedir}/wx-%{ver2}/wx/plot
456%{_includedir}/wx-%{ver2}/wx/plot/*
457%{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
458
459%dir %{_includedir}/wx-%{ver2}/wx/stc
460%{_includedir}/wx-%{ver2}/wx/stc/*
461%{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
462
463%dir %{_includedir}/wx-%{ver2}/wx/svg
464%{_includedir}/wx-%{ver2}/wx/svg/*
465%{_libdir}/libwx_%{portname}*_svg-%{ver2}.so