]> git.saurik.com Git - wxWidgets.git/blame - wxGTK.spec
The default state for the first radio button in a group should be selected
[wxWidgets.git] / wxGTK.spec
CommitLineData
e5ea3f7a 1%define pref /usr
c31752da
JS
2%define ver 2.5.0
3%define ver2 2.5
acea2a0b 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
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
e5ea3f7a
RR
39Version: %{ver}
40Release: %{rel}
4eba1840 41License: wxWindows Licence
f14a5b55 42Group: X11/Libraries
b5fa0a3e
VZ
43Source: wxGTK-%{ver}.tar.bz2
44URL: http://www.wxwindows.org
31fe72b6
VZ
45Packager: Vadim Zeitlin <vadim@wxwindows.org>
46Prefix: %{pref}
47BuildRoot: /var/tmp/%{name}-root
f14a5b55 48
212d0bb3
VZ
49# all packages providing an implementation of wxWindows library (regardless of
50# the toolkit used) should provide the (virtual) wxwin package, this makes it
6e711d5c 51# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
212d0bb3 52Provides: wxwin
4eba1840 53Provides: wxGTK
212d0bb3 54
31fe72b6
VZ
55# in addition, we should provide libwx_gtk as automatic generator only notices
56# libwx_gtk-%{ver}-%{rel}
57Provides: libwx_gtk.so
8c8fb2f6 58Provides: libwx_gtk-%{ver2}.so
31fe72b6 59
4eba1840
VS
60Requires: %{wxbasename} = %{ver}
61BuildRequires: %{wxbasename}-devel = %{ver}
62
f14a5b55 63%description
212d0bb3
VZ
64wxWindows is a free C++ library for cross-platform GUI development.
65With wxWindows, you can create applications for different GUIs (GTK+,
66Motif/LessTif, MS Windows, Mac) from the same source code.
f14a5b55 67
641d87d8 68%package devel
4eba1840 69Summary: The GTK+ %{gtkver} port of the wxWindows library
641d87d8 70Group: X11/Libraries
4eba1840
VS
71Requires: %{name} = %{ver}
72Requires: %{wxbasename}-devel = %{ver}
73Provides: wxGTK-devel
641d87d8
RR
74
75%description devel
4eba1840 76Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
c661ecca
RR
77
78%package gl
4eba1840 79Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on.
c661ecca 80Group: X11/Libraries
4eba1840 81Requires: %{name} = %{ver}
c661ecca
RR
82
83%description gl
4eba1840 84OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
5dcf9614
VS
85
86%package static
87Summary: wxGTK static libraries
88Group: Development/Libraries
4eba1840 89Requires: %{wxbasename}-static
5dcf9614
VS
90
91%description static
92Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
641d87d8 93
4eba1840
VS
94%package contrib
95Summary: The GTK+ %{gtkver} port of the wxWindows library, contributed libraries.
96Group: X11/Libraries
97Requires: %{name} = %{ver}
98
99%description contrib
100Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
101
102%package contrib-devel
103Summary: The GTK+ %{gtkver} port of the wxWindows library
104Group: X11/Libraries
105Requires: %{name}-contrib = %{ver}
106Requires: %{name}-devel = %{ver}
107
108%description contrib-devel
109Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
110
f14a5b55 111%prep
4eba1840 112%setup -q -n wxGTK-%{ver}
f14a5b55
RR
113
114%build
103aab26
RR
115if [ "$SMP" != "" ]; then
116 export MAKE="make -j$SMP"
117else
118 export MAKE="make"
119fi
5dcf9614 120
5dcf9614
VS
121mkdir obj-shared
122cd obj-shared
4eba1840
VS
123../configure --prefix=%{pref} \
124%if %{unicode}
125 --enable-unicode \
126%else
127 --with-odbc \
128%endif
129%if %{gtk2}
130 --enable-gtk2 \
131%endif
132 --with-opengl
5dcf9614 133$MAKE
4eba1840
VS
134cd contrib/src
135$MAKE
136cd ../../..
5dcf9614
VS
137
138mkdir obj-static
139cd obj-static
4eba1840
VS
140../configure --prefix=%{pref} --disable-shared \
141%if %{unicode}
142 --enable-unicode \
143%else
144 --with-odbc \
145%endif
146%if %{gtk2}
147 --enable-gtk2 \
148%endif
149 --with-opengl
103aab26 150$MAKE
5dcf9614 151cd ..
f14a5b55
RR
152
153%install
31fe72b6 154rm -rf $RPM_BUILD_ROOT
5dcf9614
VS
155(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
156(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
f14a5b55 157
4eba1840
VS
158# Remove headers that are part of wx-base-devel:
159(
160cd $RPM_BUILD_ROOT
161for f in `rpm -ql %{wxbasename}-devel | sed -e 's,\(.*\),.\1,g'` ; do
162 if test -f $f ; then rm -f $f ; fi
163done
164)
165
166# list of all core headers:
167find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
168
169# contrib stuff:
170(cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
171(cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
acea2a0b 172
c16d2763
VS
173%clean
174rm -rf $RPM_BUILD_ROOT
175
f14a5b55
RR
176%post
177/sbin/ldconfig
178
179%postun
180/sbin/ldconfig
181
81edbb3f
VS
182%post gl
183/sbin/ldconfig
184
185%postun gl
186/sbin/ldconfig
187
188%post devel
189# Install wx-config if there isn't any
190if test ! -f %{_bindir}/wx-config ; then
4eba1840 191 ln -sf %{wxconfigname} %{_bindir}/wx-config
81edbb3f
VS
192fi
193
194%preun devel
195# Remove wx-config if it points to this package
196if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
4eba1840 197 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
81edbb3f
VS
198 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
199 if test "x$SUM1" = "x$SUM2" ; then
200 rm -f %{_bindir}/wx-config
201 fi
202fi
203
204
4eba1840 205%files
81edbb3f
VS
206%defattr(-,root,root)
207%doc COPYING.LIB *.txt
208%dir %{_datadir}/wx
209%{_datadir}/wx/*
4eba1840
VS
210%{_libdir}/libwx_%{portname}*_core*.so.*
211%{_libdir}/libwx_%{portname}*_html*.so.*
212%{_libdir}/libwx_%{portname}*_adv*.so.*
213%if !%{unicode}
214%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
215%endif
641d87d8 216
4eba1840 217%files devel -f core-headers.files
0f7deca9 218%defattr(-,root,root)
4eba1840
VS
219%{_libdir}/libwx_%{portname}*_core*.so
220%{_libdir}/libwx_%{portname}*_html*.so
221%{_libdir}/libwx_%{portname}*_adv*.so
222%if !%{unicode}
223%{_libdir}/libwx_%{portname}*_dbgrid*.so
224%endif
225%{_libdir}/libwx_%{portname}*_gl*.so
81edbb3f
VS
226%dir %{_libdir}/wx
227%{_libdir}/wx/*
4eba1840 228%{_bindir}/%{wxconfigname}
2a29700e 229
c661ecca 230%files gl
81edbb3f 231%defattr(-,root,root)
4eba1840 232%{_libdir}/libwx_%{portname}*_gl*.so.*
0f7deca9 233
5dcf9614
VS
234%files static
235%defattr (-,root,root)
4eba1840
VS
236%{_libdir}/libwx_gtk*.a
237
238%files contrib
239%defattr(-,root,root)
240%{_libdir}/libwx_%{portname}*_animate*.so.*
241%{_libdir}/libwx_%{portname}*_deprecated*.so.*
242%{_libdir}/libwx_%{portname}*_fl*.so.*
243%{_libdir}/libwx_%{portname}*_gizmos*.so.*
244%{_libdir}/libwx_%{portname}*_mmedia*.so.*
245%if !%{unicode}
246%{_libdir}/libwx_%{portname}*_ogl*.so.*
247%endif
248%{_libdir}/libwx_%{portname}*_plot*.so.*
249%{_libdir}/libwx_%{portname}*_stc*.so.*
250%{_libdir}/libwx_%{portname}*_svg*.so.*
251%{_libdir}/libwx_%{portname}*_xrc*.so.*
252
253%files contrib-devel
254%defattr(-,root,root)
255%{_bindir}/wxrc
256%dir %{_includedir}/wx/animate
257%{_includedir}/wx/animate/*
258%{_libdir}/libwx_%{portname}*_animate*.so
259
260%dir %{_includedir}/wx/deprecated
261%{_includedir}/wx/deprecated/*
262%{_libdir}/libwx_%{portname}*_deprecated*.so
263
264%dir %{_includedir}/wx/fl
265%{_includedir}/wx/fl/*
266%{_libdir}/libwx_%{portname}*_fl*.so
267
268%dir %{_includedir}/wx/gizmos
269%{_includedir}/wx/gizmos/*
270%{_libdir}/libwx_%{portname}*_gizmos*.so
271
272%dir %{_includedir}/wx/mmedia
273%{_includedir}/wx/mmedia/*
274%{_libdir}/libwx_%{portname}*_mmedia*.so
275
276%if !%{unicode}
277%dir %{_includedir}/wx/ogl
278%{_includedir}/wx/ogl/*
279%{_libdir}/libwx_%{portname}*_ogl*.so
280%endif
281
282%dir %{_includedir}/wx/plot
283%{_includedir}/wx/plot/*
284%{_libdir}/libwx_%{portname}*_plot*.so
285
286%dir %{_includedir}/wx/stc
287%{_includedir}/wx/stc/*
288%{_libdir}/libwx_%{portname}*_stc*.so
289
290%dir %{_includedir}/wx/svg
291%{_includedir}/wx/svg/*
292%{_libdir}/libwx_%{portname}*_svg*.so
293
294%dir %{_includedir}/wx/xrc
295%{_includedir}/wx/xrc/*
296%{_libdir}/libwx_%{portname}*_xrc*.so