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