]> git.saurik.com Git - wxWidgets.git/blame - wxGTK.spec
Fix previous change in case somebody is still using
[wxWidgets.git] / wxGTK.spec
CommitLineData
e5ea3f7a 1%define pref /usr
4818141b
JS
2%define ver 2.6.0
3%define ver2 2.6
df050bd9 4%define rel 1
e5ea3f7a 5
4eba1840
VS
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
2fbef279 11%define gtk2 1
4eba1840
VS
12%{?_with_gtk2: %{expand: %%define gtk2 1}}
13%{?_without_gtk2: %{expand: %%define gtk2 0}}
14
1cd555d2
VZ
15%define universal 0
16%{?_with_universal: %{expand: %%define universal 1}}
17%{?_without_universal: %{expand: %%define universal 0}}
4eba1840 18
1cd555d2
VZ
19%if %{gtk2}
20 %define gtkver 2
21
22 %if %{universal}
23 %define portname gtk2univ
24 %else
25 %define portname gtk2
26 %endif
f5b3b37e 27%else
1cd555d2
VZ
28 %define gtkver 1.2
29
30 %if %{universal}
31 %define portname gtkuniv
32 %else
33 %define portname gtk
34 %endif
4eba1840
VS
35%endif
36
37%if %{unicode}
1cd555d2
VZ
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
4eba1840 42%else
1cd555d2
VZ
43 %define wxbasename wx-base
44 %define name wx-%{portname}
45 %define wxconfig %{portname}-ansi-release-%{ver2}
46 %define wxconfiglink wx%{portname}-%{ver2}-config
4eba1840
VS
47%endif
48
1cd555d2
VZ
49Summary: The GTK+ %{gtkver} port of the wxWidgets library
50Name: %{name}
e5ea3f7a
RR
51Version: %{ver}
52Release: %{rel}
4eba1840 53License: wxWindows Licence
f14a5b55 54Group: X11/Libraries
b5fa0a3e 55Source: wxGTK-%{ver}.tar.bz2
1cd555d2 56URL: http://www.wxwidgets.org
31fe72b6
VZ
57Packager: Vadim Zeitlin <vadim@wxwindows.org>
58Prefix: %{pref}
1cd555d2
VZ
59BuildRoot: %{_tmppath}/%{name}-root
60Requires: %{wxbasename} = %{ver}
f14a5b55 61
1cd555d2 62# all packages providing an implementation of wxWidgets library (regardless of
212d0bb3 63# the toolkit used) should provide the (virtual) wxwin package, this makes it
6e711d5c 64# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
212d0bb3 65Provides: wxwin
4eba1840 66Provides: wxGTK
212d0bb3 67
f14a5b55 68%description
1cd555d2
VZ
69wxWidgets is a free C++ library for cross-platform GUI development.
70With wxWidgets, you can create applications for different GUIs (GTK+,
212d0bb3 71Motif/LessTif, MS Windows, Mac) from the same source code.
f14a5b55 72
641d87d8 73%package devel
1cd555d2 74Summary: The GTK+ %{gtkver} port of the wxWidgets library
641d87d8 75Group: X11/Libraries
4eba1840
VS
76Requires: %{name} = %{ver}
77Requires: %{wxbasename}-devel = %{ver}
78Provides: wxGTK-devel
641d87d8
RR
79
80%description devel
1cd555d2 81Header files for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
c661ecca
RR
82
83%package gl
1cd555d2 84Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on.
c661ecca 85Group: X11/Libraries
4eba1840 86Requires: %{name} = %{ver}
1cd555d2 87Provides: wxGTK-gl
c661ecca
RR
88
89%description gl
1cd555d2 90OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
5dcf9614
VS
91
92%package static
93Summary: wxGTK static libraries
94Group: Development/Libraries
4eba1840 95Requires: %{wxbasename}-static
1cd555d2 96Requires: %{name}-devel = %{ver}
5dcf9614
VS
97
98%description static
99Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
641d87d8 100
4eba1840 101%package contrib
1cd555d2 102Summary: The GTK+ %{gtkver} port of the wxWidgets library, contributed libraries.
4eba1840
VS
103Group: X11/Libraries
104Requires: %{name} = %{ver}
105
106%description contrib
1cd555d2 107Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
4eba1840
VS
108
109%package contrib-devel
1cd555d2 110Summary: The GTK+ %{gtkver} port of the wxWidgets library
4eba1840
VS
111Group: X11/Libraries
112Requires: %{name}-contrib = %{ver}
113Requires: %{name}-devel = %{ver}
114
115%description contrib-devel
1cd555d2 116Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
4eba1840 117
f14a5b55 118%prep
4eba1840 119%setup -q -n wxGTK-%{ver}
f14a5b55
RR
120
121%build
103aab26 122if [ "$SMP" != "" ]; then
1cd555d2 123 export MAKE="make -j$SMP"
103aab26 124else
1cd555d2 125 export MAKE="make"
103aab26 126fi
5dcf9614 127
5dcf9614
VS
128mkdir obj-shared
129cd obj-shared
1cd555d2 130../configure --prefix=%{pref} --with-gtk \
4eba1840 131%if %{unicode}
1cd555d2 132 --enable-unicode \
4eba1840 133%else
1cd555d2 134 --with-odbc \
4eba1840 135%endif
2fbef279 136%if ! %{gtk2}
1cd555d2
VZ
137 --disable-gtk2 \
138%endif
139%if %{universal}
140 --enable-universal \
4eba1840 141%endif
1cd555d2 142 --with-opengl
5dcf9614 143$MAKE
1cd555d2 144
4eba1840
VS
145cd contrib/src
146$MAKE
147cd ../../..
5dcf9614
VS
148
149mkdir obj-static
150cd obj-static
1cd555d2 151../configure --prefix=%{pref} --with-gtk --disable-shared \
4eba1840 152%if %{unicode}
1cd555d2 153 --enable-unicode \
4eba1840 154%else
1cd555d2 155 --with-odbc \
4eba1840 156%endif
2fbef279 157%if ! %{gtk2}
1cd555d2
VZ
158 --disable-gtk2 \
159%endif
160%if %{universal}
161 --enable-universal \
4eba1840 162%endif
1cd555d2 163 --with-opengl
103aab26 164$MAKE
5dcf9614 165cd ..
f14a5b55
RR
166
167%install
31fe72b6 168rm -rf $RPM_BUILD_ROOT
5dcf9614
VS
169(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
170(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
f14a5b55 171
4eba1840 172# Remove headers that are part of wx-base-devel:
d10382ab
VS
173
174# --- wxBase headers list begins here ---
175cat <<EOF >wxbase-headers-list
176wx/afterstd.h
177wx/app.h
178wx/apptrait.h
8329fea8 179wx/archive.h
d10382ab
VS
180wx/arrimpl.cpp
181wx/arrstr.h
182wx/beforestd.h
183wx/buffer.h
184wx/build.h
185wx/chkconf.h
82b0b7f6 186wx/clntdata.h
d10382ab
VS
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
20b35a69 198wx/dlimpexp.h
d10382ab
VS
199wx/dynarray.h
200wx/dynlib.h
201wx/dynload.h
202wx/encconv.h
203wx/event.h
671a85ea 204wx/except.h
d10382ab
VS
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
54e80d76 219wx/html/forcelnk.h
d10382ab
VS
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
c33fae85 249wx/sstream.h
b71531ad 250wx/stack.h
107d0fd4 251wx/stackwalk.h
dd65d8c8 252wx/stdpaths.h
ef335a4f 253wx/stockitem.h
d10382ab
VS
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
dd65d8c8 267wx/uri.h
d10382ab
VS
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
107d0fd4 286wx/msw/debughlp.h
d10382ab
VS
287wx/msw/gccpriv.h
288wx/msw/mimetype.h
107d0fd4 289wx/msw/stackwalk.h
d10382ab
VS
290wx/msw/winundef.h
291wx/msw/wrapcctl.h
660296aa 292wx/msw/wrapcdlg.h
d10382ab
VS
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
1cd555d2 314 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
4eba1840 315done
4eba1840
VS
316
317# list of all core headers:
1cd555d2 318find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
4eba1840
VS
319
320# contrib stuff:
321(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
4df9240f 322(cd obj-shared/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
acea2a0b 323
88e3652f
VS
324# remove wxBase files so that RPM doesn't complain about unpackaged files:
325rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
1cd555d2
VZ
326%if %{unicode}
327 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
328%endif
88e3652f
VS
329rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
330rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
331
c16d2763
VS
332%clean
333rm -rf $RPM_BUILD_ROOT
334
f14a5b55
RR
335%post
336/sbin/ldconfig
337
338%postun
339/sbin/ldconfig
340
2fbef279
VZ
341%post devel
342# link wx-config when you install RPM.
1cd555d2 343ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
2fbef279 344# link wx-config with explicit name.
1cd555d2
VZ
345ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
346/sbin/ldconfig
347
348%postun devel
349/sbin/ldconfig
f5b3b37e 350
2fbef279
VZ
351%preun devel
352if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
1cd555d2
VZ
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
2fbef279 358fi
1cd555d2 359rm -f %{_bindir}/%{wxconfiglink}
f5b3b37e 360
1cd555d2
VZ
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
81edbb3f 378
4eba1840 379%files
81edbb3f
VS
380%defattr(-,root,root)
381%doc COPYING.LIB *.txt
1cd555d2
VZ
382%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
383%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
4eba1840 384%if !%{unicode}
1cd555d2 385 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so.*
4eba1840 386%endif
1cd555d2
VZ
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
641d87d8 392
4eba1840 393%files devel -f core-headers.files
0f7deca9 394%defattr(-,root,root)
1cd555d2
VZ
395%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
396%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
4eba1840 397%if !%{unicode}
1cd555d2 398 %{_libdir}/libwx_%{portname}*_dbgrid-%{ver2}.so
4eba1840 399%endif
1cd555d2
VZ
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
81edbb3f
VS
405%dir %{_libdir}/wx
406%{_libdir}/wx/*
1cd555d2 407%{_bindir}/wxrc*
2a29700e 408
c661ecca 409%files gl
81edbb3f 410%defattr(-,root,root)
1cd555d2 411%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
0f7deca9 412
5dcf9614
VS
413%files static
414%defattr (-,root,root)
1cd555d2 415%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
4eba1840
VS
416
417%files contrib
418%defattr(-,root,root)
1cd555d2
VZ
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.*
4eba1840
VS
428
429%files contrib-devel
430%defattr(-,root,root)
1cd555d2
VZ
431%dir %{_includedir}/wx-%{ver2}/wx/animate
432%{_includedir}/wx-%{ver2}/wx/animate/*
433%{_libdir}/libwx_%{portname}*_animate-%{ver2}.so
4eba1840 434
1cd555d2
VZ
435%dir %{_includedir}/wx-%{ver2}/wx/deprecated
436%{_includedir}/wx-%{ver2}/wx/deprecated/*
437%{_libdir}/libwx_%{portname}*_deprecated-%{ver2}.so
4eba1840 438
1cd555d2
VZ
439%dir %{_includedir}/wx-%{ver2}/wx/fl
440%{_includedir}/wx-%{ver2}/wx/fl/*
441%{_libdir}/libwx_%{portname}*_fl-%{ver2}.so
4eba1840 442
1cd555d2
VZ
443%dir %{_includedir}/wx-%{ver2}/wx/gizmos
444%{_includedir}/wx-%{ver2}/wx/gizmos/*
445%{_libdir}/libwx_%{portname}*_gizmos-%{ver2}.so
4eba1840 446
1cd555d2
VZ
447%dir %{_includedir}/wx-%{ver2}/wx/mmedia
448%{_includedir}/wx-%{ver2}/wx/mmedia/*
449%{_libdir}/libwx_%{portname}*_mmedia-%{ver2}.so
4eba1840 450
1cd555d2
VZ
451%dir %{_includedir}/wx-%{ver2}/wx/ogl
452%{_includedir}/wx-%{ver2}/wx/ogl/*
453%{_libdir}/libwx_%{portname}*_ogl-%{ver2}.so
4eba1840 454
1cd555d2
VZ
455%dir %{_includedir}/wx-%{ver2}/wx/plot
456%{_includedir}/wx-%{ver2}/wx/plot/*
457%{_libdir}/libwx_%{portname}*_plot-%{ver2}.so
4eba1840 458
1cd555d2
VZ
459%dir %{_includedir}/wx-%{ver2}/wx/stc
460%{_includedir}/wx-%{ver2}/wx/stc/*
461%{_libdir}/libwx_%{portname}*_stc-%{ver2}.so
4eba1840 462
1cd555d2
VZ
463%dir %{_includedir}/wx-%{ver2}/wx/svg
464%{_includedir}/wx-%{ver2}/wx/svg/*
465%{_libdir}/libwx_%{portname}*_svg-%{ver2}.so