]> git.saurik.com Git - wxWidgets.git/blame - wxGTK.spec
added GetWindowSizeForVirtualSize() virtual hook for wxScrolledWindow (cuts down...
[wxWidgets.git] / wxGTK.spec
CommitLineData
fe770a60 1%define _prefix /opt/gnome
f02fe2ef 2%define ver 2.6.2
4818141b 3%define ver2 2.6
df050bd9 4%define rel 1
e5ea3f7a 5
4eba1840 6# Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
fe770a60 7%define unicode 1
4eba1840
VS
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
fe770a60 15# "buildname" needs to be e.g. gtk2ud for debug builds
1cd555d2
VZ
16%if %{gtk2}
17 %define gtkver 2
fe770a60
RR
18 %define portname gtk2
19%if %{unicode}
20 %define buildname gtk2u
21%else
22 %define buildname gtk2
23%endif
f5b3b37e 24%else
1cd555d2 25 %define gtkver 1.2
fe770a60
RR
26 %define portname gtk
27 %define buildname gtk
28%endif
29
30%if %{unicode}
31 %define name wx-%{portname}-unicode
32 %define wxconfig %{portname}-unicode-release-%{ver2}
33 %define wxconfigstatic %{portname}-unicode-release-static-%{ver2}
34 %define wxconfiglink wx%{portname}u-%{ver2}-config
35%else
36 %define name wx-%{portname}-ansi
37 %define wxconfig %{portname}-ansi-release-%{ver2}
38 %define wxconfigstatic %{portname}-ansi-release-static-%{ver2}
39 %define wxconfiglink wx%{portname}-%{ver2}-config
4eba1840
VS
40%endif
41
42%if %{unicode}
fe770a60
RR
43 %define wxbasename wx-base-unicode
44 %define wxbaseconfig base-unicode-release-%{ver2}
45 %define wxbaseconfigstatic base-unicode-release-static-%{ver2}
46 %define wxbaseconfiglink wxbaseu-%{ver2}-config
4eba1840 47%else
fe770a60
RR
48 %define wxbasename wx-base-ansi
49 %define wxbaseconfig base-ansi-release-%{ver2}
50 %define wxbaseconfigstatic base-ansi-release-static-%{ver2}
51 %define wxbaseconfiglink wxbase-%{ver2}-config
4eba1840
VS
52%endif
53
1cd555d2
VZ
54Summary: The GTK+ %{gtkver} port of the wxWidgets library
55Name: %{name}
e5ea3f7a
RR
56Version: %{ver}
57Release: %{rel}
4eba1840 58License: wxWindows Licence
f14a5b55 59Group: X11/Libraries
fe770a60 60Source: wxGTK-%{ver}.tar.gz
1cd555d2 61URL: http://www.wxwidgets.org
31fe72b6 62Packager: Vadim Zeitlin <vadim@wxwindows.org>
fe770a60 63Prefix: %{_prefix}
1cd555d2
VZ
64BuildRoot: %{_tmppath}/%{name}-root
65Requires: %{wxbasename} = %{ver}
fe770a60
RR
66%if %{portname} == gtk2
67# BuildRequires: gtk+-2.0-devel
68%else
69# BuildRequires: gtk+-devel >= 1.2.0
70%endif
71
72BuildRequires: zlib-devel, libjpeg-devel, libpng-devel, libtiff-devel
f14a5b55 73
1cd555d2 74# all packages providing an implementation of wxWidgets library (regardless of
212d0bb3 75# the toolkit used) should provide the (virtual) wxwin package, this makes it
6e711d5c 76# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
212d0bb3 77Provides: wxwin
4eba1840 78Provides: wxGTK
212d0bb3 79
f14a5b55 80%description
1cd555d2
VZ
81wxWidgets is a free C++ library for cross-platform GUI development.
82With wxWidgets, you can create applications for different GUIs (GTK+,
fe770a60
RR
83Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.
84
18f208c3 85%package -n wx-i18n
fe770a60
RR
86Summary: The translations for the wxWidgets library.
87Group: X11/Libraries
88
18f208c3 89%description -n wx-i18n
fe770a60 90The translations files for the wxWidgets library.
f14a5b55 91
641d87d8 92%package devel
1cd555d2 93Summary: The GTK+ %{gtkver} port of the wxWidgets library
641d87d8 94Group: X11/Libraries
4eba1840
VS
95Requires: %{name} = %{ver}
96Requires: %{wxbasename}-devel = %{ver}
97Provides: wxGTK-devel
641d87d8
RR
98
99%description devel
fe770a60 100The GTK+ %{gtkver} port of the wxWidgets library, header files.
c661ecca
RR
101
102%package gl
1cd555d2 103Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on.
c661ecca 104Group: X11/Libraries
4eba1840 105Requires: %{name} = %{ver}
1cd555d2 106Provides: wxGTK-gl
c661ecca
RR
107
108%description gl
1cd555d2 109OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
5dcf9614 110
fe770a60
RR
111%package -n %{wxbasename}
112Summary: wxBase library - non-GUI support classes of the wxWidgets toolkit
5dcf9614 113Group: Development/Libraries
fe770a60
RR
114Provides: wxBase
115
116%description -n %{wxbasename}
117wxBase is a collection of C++ classes providing basic data structures (strings,
118lists, arrays), portable wrappers around many OS-specific funstions (file
119operations, time/date manipulations, threads, processes, sockets, shared
120library loading) as well as other utility classes (streams, archive and
121compression). wxBase currently supports Win32, most Unix variants (Linux,
122FreeBSD, Solaris, HP-UX) and MacOS X (Carbon and Mach-0).
123
124%package -n %{wxbasename}-devel
125Summary: wxBase library, header files.
126Group: Development/Libraries
127Provides: wxBase-devel
5dcf9614 128
fe770a60
RR
129%description -n %{wxbasename}-devel
130wxBase library - non-GUI support classes of the wxWidgets toolkit,
131header files.
641d87d8 132
4eba1840 133%package contrib
1cd555d2 134Summary: The GTK+ %{gtkver} port of the wxWidgets library, contributed libraries.
4eba1840
VS
135Group: X11/Libraries
136Requires: %{name} = %{ver}
137
138%description contrib
1cd555d2 139Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
4eba1840
VS
140
141%package contrib-devel
1cd555d2 142Summary: The GTK+ %{gtkver} port of the wxWidgets library
4eba1840
VS
143Group: X11/Libraries
144Requires: %{name}-contrib = %{ver}
145Requires: %{name}-devel = %{ver}
146
147%description contrib-devel
1cd555d2 148Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
4eba1840 149
f14a5b55 150%prep
4eba1840 151%setup -q -n wxGTK-%{ver}
f14a5b55
RR
152
153%build
103aab26 154if [ "$SMP" != "" ]; then
1cd555d2 155 export MAKE="make -j$SMP"
103aab26 156else
1cd555d2 157 export MAKE="make"
103aab26 158fi
5dcf9614 159
fe770a60
RR
160mkdir obj-shared-no-gui
161cd obj-shared-no-gui
162../configure --prefix=%{_prefix} \
163 --disable-gui \
4eba1840 164%if %{unicode}
fe770a60 165 --enable-unicode
4eba1840 166%else
fe770a60 167 --disable-unicode
4eba1840 168%endif
fe770a60
RR
169$MAKE
170cd ..
171
172mkdir obj-shared
173cd obj-shared
174../configure --prefix=%{_prefix} \
2fbef279 175%if ! %{gtk2}
fe770a60
RR
176 --with-gtk=1 \
177%else
178 --with-gtk=2 \
1cd555d2 179%endif
fe770a60
RR
180%if %{unicode}
181 --enable-unicode \
182%else
183 --disable-unicode \
184 --with-odbc \
4eba1840 185%endif
fe770a60 186 --with-opengl
5dcf9614 187$MAKE
1cd555d2 188
4eba1840
VS
189cd contrib/src
190$MAKE
191cd ../../..
5dcf9614 192
fe770a60
RR
193mkdir obj-static-no-gui
194cd obj-static-no-gui
195../configure --prefix=%{_prefix} \
196 --disable-gui \
197 --disable-shared \
4eba1840 198%if %{unicode}
fe770a60 199 --enable-unicode
4eba1840 200%else
fe770a60 201 --disable-unicode
4eba1840 202%endif
fe770a60
RR
203$MAKE
204cd ..
205
206mkdir obj-static
207cd obj-static
208../configure --prefix=%{_prefix} \
2fbef279 209%if ! %{gtk2}
fe770a60
RR
210 --with-gtk=1 \
211%else
212 --with-gtk=2 \
1cd555d2 213%endif
fe770a60
RR
214 --disable-shared \
215%if %{unicode}
216 --enable-unicode \
217%else
218 --disable-unicode \
219 --with-odbc \
4eba1840 220%endif
fe770a60 221 --with-opengl
103aab26 222$MAKE
fe770a60
RR
223
224cd contrib/src
225$MAKE
226cd ../../..
f14a5b55
RR
227
228%install
31fe72b6 229rm -rf $RPM_BUILD_ROOT
fe770a60
RR
230(cd obj-static-no-gui; make DESTDIR=$RPM_BUILD_ROOT install)
231(cd obj-static; make DESTDIR=$RPM_BUILD_ROOT install)
232(cd obj-shared-no-gui; make DESTDIR=$RPM_BUILD_ROOT install)
233(cd obj-shared; make DESTDIR=$RPM_BUILD_ROOT install)
d10382ab
VS
234
235# --- wxBase headers list begins here ---
97ddaeee 236cat <<EOF >wxbase-headers.files
d10382ab
VS
237wx/afterstd.h
238wx/app.h
239wx/apptrait.h
8329fea8 240wx/archive.h
d10382ab
VS
241wx/arrimpl.cpp
242wx/arrstr.h
243wx/beforestd.h
244wx/buffer.h
245wx/build.h
246wx/chkconf.h
82b0b7f6 247wx/clntdata.h
d10382ab
VS
248wx/cmdline.h
249wx/confbase.h
250wx/config.h
251wx/containr.h
252wx/datetime.h
d10382ab
VS
253wx/datstrm.h
254wx/dde.h
255wx/debug.h
256wx/defs.h
257wx/dir.h
20b35a69 258wx/dlimpexp.h
d10382ab
VS
259wx/dynarray.h
260wx/dynlib.h
261wx/dynload.h
262wx/encconv.h
263wx/event.h
671a85ea 264wx/except.h
d10382ab
VS
265wx/features.h
266wx/ffile.h
267wx/file.h
268wx/fileconf.h
269wx/filefn.h
270wx/filename.h
271wx/filesys.h
272wx/fontenc.h
273wx/fontmap.h
274wx/fs_mem.h
275wx/fs_zip.h
276wx/hash.h
277wx/hashmap.h
278wx/hashset.h
54e80d76 279wx/html/forcelnk.h
d10382ab
VS
280wx/iconloc.h
281wx/init.h
282wx/intl.h
283wx/iosfwrap.h
284wx/ioswrap.h
285wx/ipc.h
286wx/ipcbase.h
287wx/isql.h
288wx/isqlext.h
4cbcfb73 289wx/link.h
d10382ab
VS
290wx/list.h
291wx/listimpl.cpp
292wx/log.h
293wx/longlong.h
294wx/math.h
295wx/memconf.h
296wx/memory.h
297wx/memtext.h
298wx/mimetype.h
299wx/module.h
300wx/msgout.h
d10382ab
VS
301wx/mstream.h
302wx/object.h
303wx/platform.h
304wx/process.h
305wx/ptr_scpd.h
460354e9 306wx/recguard.h
d10382ab
VS
307wx/regex.h
308wx/scopeguard.h
309wx/snglinst.h
c33fae85 310wx/sstream.h
b71531ad 311wx/stack.h
107d0fd4 312wx/stackwalk.h
dd65d8c8 313wx/stdpaths.h
ef335a4f 314wx/stockitem.h
d10382ab
VS
315wx/stopwatch.h
316wx/strconv.h
317wx/stream.h
318wx/string.h
319wx/sysopt.h
320wx/textbuf.h
321wx/textfile.h
322wx/thread.h
323wx/thrimpl.cpp
324wx/timer.h
325wx/tokenzr.h
326wx/txtstrm.h
327wx/types.h
dd65d8c8 328wx/uri.h
d10382ab
VS
329wx/utils.h
330wx/variant.h
331wx/vector.h
332wx/version.h
333wx/volume.h
334wx/wfstream.h
335wx/wx.h
336wx/wxchar.h
337wx/wxprec.h
338wx/xti.h
339wx/xtistrm.h
340wx/zipstrm.h
341wx/zstream.h
fb5ab396
WS
342wx/unix/apptbase.h
343wx/unix/apptrait.h
344wx/unix/execute.h
345wx/unix/mimetype.h
346wx/unix/pipe.h
4cbcfb73 347wx/unix/private.h
fb5ab396
WS
348wx/unix/stackwalk.h
349wx/unix/stdpaths.h
4cbcfb73
VZ
350wx/msw/apptrait.h
351wx/msw/apptbase.h
352wx/msw/chkconf.h
353wx/msw/crashrpt.h
354wx/msw/dde.h
355wx/msw/debughlp.h
356wx/msw/gccpriv.h
357wx/msw/mimetype.h
358wx/msw/stackwalk.h
359wx/msw/stdpaths.h
360wx/msw/winundef.h
361wx/msw/wrapcctl.h
362wx/msw/wrapcdlg.h
363wx/msw/wrapwin.h
364wx/unix/apptbase.h
365wx/unix/apptrait.h
366wx/unix/execute.h
367wx/unix/mimetype.h
368wx/unix/pipe.h
369wx/unix/private.h
370wx/unix/stackwalk.h
371wx/unix/stdpaths.h
372wx/mac/corefoundation/cfstring.h
373wx/mac/corefoundation/hid.h
374wx/mac/corefoundation/stdpaths.h
375wx/palmos/apptbase.h
376wx/palmos/apptrait.h
377wx/palmos/chkconf.h
378wx/palmos/mimetype.h
379wx/palmos/stdpaths.h
380wx/msdos/mimetype.h
d10382ab
VS
381wx/fs_inet.h
382wx/gsocket.h
383wx/protocol/file.h
384wx/protocol/ftp.h
385wx/protocol/http.h
386wx/protocol/protocol.h
387wx/sckaddr.h
388wx/sckipc.h
389wx/sckstrm.h
390wx/socket.h
391wx/url.h
fb5ab396 392wx/unix/gsockunx.h
4cbcfb73
VZ
393wx/msw/gsockmsw.h
394wx/unix/gsockunx.h
395wx/unix/gsockunx.h
396wx/mac/carbon/gsockmac.h
d10382ab
VS
397wx/xml/xml.h
398wx/xtixml.h
399wx/db.h
400wx/dbkeyg.h
401wx/dbtable.h
402EOF
403# --- wxBase headers list ends here ---
fe770a60
RR
404cat <<EOF >wxbase-headers.paths
405%{_includedir}/wx-%{ver2}/wx/afterstd.h
406%{_includedir}/wx-%{ver2}/wx/app.h
407%{_includedir}/wx-%{ver2}/wx/apptrait.h
408%{_includedir}/wx-%{ver2}/wx/archive.h
409%{_includedir}/wx-%{ver2}/wx/arrimpl.cpp
410%{_includedir}/wx-%{ver2}/wx/arrstr.h
411%{_includedir}/wx-%{ver2}/wx/beforestd.h
412%{_includedir}/wx-%{ver2}/wx/buffer.h
413%{_includedir}/wx-%{ver2}/wx/build.h
414%{_includedir}/wx-%{ver2}/wx/chkconf.h
415%{_includedir}/wx-%{ver2}/wx/clntdata.h
416%{_includedir}/wx-%{ver2}/wx/cmdline.h
417%{_includedir}/wx-%{ver2}/wx/confbase.h
418%{_includedir}/wx-%{ver2}/wx/config.h
419%{_includedir}/wx-%{ver2}/wx/containr.h
420%{_includedir}/wx-%{ver2}/wx/datetime.h
421%{_includedir}/wx-%{ver2}/wx/datetime.inl
422%{_includedir}/wx-%{ver2}/wx/datstrm.h
423%{_includedir}/wx-%{ver2}/wx/dde.h
424%{_includedir}/wx-%{ver2}/wx/debug.h
425%{_includedir}/wx-%{ver2}/wx/defs.h
426%{_includedir}/wx-%{ver2}/wx/dir.h
427%{_includedir}/wx-%{ver2}/wx/dlimpexp.h
428%{_includedir}/wx-%{ver2}/wx/dynarray.h
429%{_includedir}/wx-%{ver2}/wx/dynlib.h
430%{_includedir}/wx-%{ver2}/wx/dynload.h
431%{_includedir}/wx-%{ver2}/wx/encconv.h
432%{_includedir}/wx-%{ver2}/wx/event.h
433%{_includedir}/wx-%{ver2}/wx/except.h
434%{_includedir}/wx-%{ver2}/wx/features.h
435%{_includedir}/wx-%{ver2}/wx/ffile.h
436%{_includedir}/wx-%{ver2}/wx/file.h
437%{_includedir}/wx-%{ver2}/wx/fileconf.h
438%{_includedir}/wx-%{ver2}/wx/filefn.h
439%{_includedir}/wx-%{ver2}/wx/filename.h
440%{_includedir}/wx-%{ver2}/wx/filesys.h
441%{_includedir}/wx-%{ver2}/wx/fontenc.h
442%{_includedir}/wx-%{ver2}/wx/fontmap.h
443%{_includedir}/wx-%{ver2}/wx/fs_mem.h
444%{_includedir}/wx-%{ver2}/wx/fs_zip.h
445%{_includedir}/wx-%{ver2}/wx/hash.h
446%{_includedir}/wx-%{ver2}/wx/hashmap.h
447%{_includedir}/wx-%{ver2}/wx/hashset.h
448%{_includedir}/wx-%{ver2}/wx/html/forcelnk.h
449%{_includedir}/wx-%{ver2}/wx/iconloc.h
450%{_includedir}/wx-%{ver2}/wx/init.h
451%{_includedir}/wx-%{ver2}/wx/intl.h
452%{_includedir}/wx-%{ver2}/wx/iosfwrap.h
453%{_includedir}/wx-%{ver2}/wx/ioswrap.h
454%{_includedir}/wx-%{ver2}/wx/ipc.h
455%{_includedir}/wx-%{ver2}/wx/ipcbase.h
456%{_includedir}/wx-%{ver2}/wx/isql.h
457%{_includedir}/wx-%{ver2}/wx/isqlext.h
458%{_includedir}/wx-%{ver2}/wx/list.h
459%{_includedir}/wx-%{ver2}/wx/listimpl.cpp
460%{_includedir}/wx-%{ver2}/wx/log.h
461%{_includedir}/wx-%{ver2}/wx/longlong.h
462%{_includedir}/wx-%{ver2}/wx/math.h
463%{_includedir}/wx-%{ver2}/wx/memconf.h
464%{_includedir}/wx-%{ver2}/wx/memory.h
465%{_includedir}/wx-%{ver2}/wx/memtext.h
466%{_includedir}/wx-%{ver2}/wx/mimetype.h
467%{_includedir}/wx-%{ver2}/wx/module.h
468%{_includedir}/wx-%{ver2}/wx/msgout.h
469%{_includedir}/wx-%{ver2}/wx/mstream.h
470%{_includedir}/wx-%{ver2}/wx/object.h
471%{_includedir}/wx-%{ver2}/wx/platform.h
472%{_includedir}/wx-%{ver2}/wx/process.h
473%{_includedir}/wx-%{ver2}/wx/ptr_scpd.h
474%{_includedir}/wx-%{ver2}/wx/regex.h
475%{_includedir}/wx-%{ver2}/wx/scopeguard.h
476%{_includedir}/wx-%{ver2}/wx/snglinst.h
477%{_includedir}/wx-%{ver2}/wx/sstream.h
478%{_includedir}/wx-%{ver2}/wx/stack.h
479%{_includedir}/wx-%{ver2}/wx/stackwalk.h
480%{_includedir}/wx-%{ver2}/wx/stdpaths.h
481%{_includedir}/wx-%{ver2}/wx/stockitem.h
482%{_includedir}/wx-%{ver2}/wx/stopwatch.h
483%{_includedir}/wx-%{ver2}/wx/strconv.h
484%{_includedir}/wx-%{ver2}/wx/stream.h
485%{_includedir}/wx-%{ver2}/wx/string.h
486%{_includedir}/wx-%{ver2}/wx/sysopt.h
487%{_includedir}/wx-%{ver2}/wx/textbuf.h
488%{_includedir}/wx-%{ver2}/wx/textfile.h
489%{_includedir}/wx-%{ver2}/wx/thread.h
490%{_includedir}/wx-%{ver2}/wx/thrimpl.cpp
491%{_includedir}/wx-%{ver2}/wx/timer.h
492%{_includedir}/wx-%{ver2}/wx/tokenzr.h
493%{_includedir}/wx-%{ver2}/wx/txtstrm.h
494%{_includedir}/wx-%{ver2}/wx/types.h
495%{_includedir}/wx-%{ver2}/wx/uri.h
496%{_includedir}/wx-%{ver2}/wx/utils.h
497%{_includedir}/wx-%{ver2}/wx/variant.h
498%{_includedir}/wx-%{ver2}/wx/vector.h
499%{_includedir}/wx-%{ver2}/wx/version.h
500%{_includedir}/wx-%{ver2}/wx/volume.h
501%{_includedir}/wx-%{ver2}/wx/wfstream.h
502%{_includedir}/wx-%{ver2}/wx/wx.h
503%{_includedir}/wx-%{ver2}/wx/wxchar.h
504%{_includedir}/wx-%{ver2}/wx/wxprec.h
505%{_includedir}/wx-%{ver2}/wx/xti.h
506%{_includedir}/wx-%{ver2}/wx/xtistrm.h
507%{_includedir}/wx-%{ver2}/wx/zipstrm.h
508%{_includedir}/wx-%{ver2}/wx/zstream.h
509%{_includedir}/wx-%{ver2}/wx/fs_inet.h
510%{_includedir}/wx-%{ver2}/wx/gsocket.h
511%{_includedir}/wx-%{ver2}/wx/protocol/file.h
512%{_includedir}/wx-%{ver2}/wx/protocol/ftp.h
513%{_includedir}/wx-%{ver2}/wx/protocol/http.h
514%{_includedir}/wx-%{ver2}/wx/protocol/protocol.h
515%{_includedir}/wx-%{ver2}/wx/sckaddr.h
516%{_includedir}/wx-%{ver2}/wx/sckipc.h
517%{_includedir}/wx-%{ver2}/wx/sckstrm.h
518%{_includedir}/wx-%{ver2}/wx/socket.h
519%{_includedir}/wx-%{ver2}/wx/url.h
520%{_includedir}/wx-%{ver2}/wx/xml/xml.h
521%{_includedir}/wx-%{ver2}/wx/xtixml.h
522%{_includedir}/wx-%{ver2}/wx/db.h
523%{_includedir}/wx-%{ver2}/wx/dbkeyg.h
524%{_includedir}/wx-%{ver2}/wx/dbtable.h
525%{_includedir}/wx-%{ver2}/wx/unix/apptbase.h
526%{_includedir}/wx-%{ver2}/wx/unix/apptrait.h
527%{_includedir}/wx-%{ver2}/wx/unix/execute.h
528%{_includedir}/wx-%{ver2}/wx/unix/gsockunx.h
529%{_includedir}/wx-%{ver2}/wx/unix/mimetype.h
530%{_includedir}/wx-%{ver2}/wx/unix/pipe.h
531%{_includedir}/wx-%{ver2}/wx/unix/stackwalk.h
532%{_includedir}/wx-%{ver2}/wx/unix/stdpaths.h
533EOF
534# --- wxBase headers list ends here ---
535
536# temporarily remove base headers
537mkdir $RPM_BUILD_ROOT/_save_dir
538cp -r $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT/_save_dir
539for f in `cat wxbase-headers.files` ; do
1cd555d2 540 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
4eba1840 541done
4eba1840 542# list of all core headers:
1cd555d2 543find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
fe770a60
RR
544# move base headers (actually all headers) back again
545cp -f -r $RPM_BUILD_ROOT/_save_dir/* $RPM_BUILD_ROOT%{_includedir}
546rm -rf $RPM_BUILD_ROOT/_save_dir
4eba1840
VS
547
548# contrib stuff:
fe770a60
RR
549(cd obj-shared/contrib/src; make DESTDIR=$RPM_BUILD_ROOT install)
550(cd obj-shared/utils/wxrc; make DESTDIR=$RPM_BUILD_ROOT install)
88e3652f 551
c16d2763
VS
552%clean
553rm -rf $RPM_BUILD_ROOT
554
f14a5b55
RR
555%post
556/sbin/ldconfig
557
558%postun
559/sbin/ldconfig
560
2fbef279
VZ
561%post devel
562# link wx-config when you install RPM.
fe770a60
RR
563%if %{unicode}
564 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
565%endif
2fbef279 566# link wx-config with explicit name.
1cd555d2
VZ
567ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
568/sbin/ldconfig
569
570%postun devel
571/sbin/ldconfig
f5b3b37e 572
2fbef279 573%preun devel
fe770a60
RR
574%if %{unicode}
575 rm -f %{_bindir}/wx-config
576%endif
1cd555d2 577rm -f %{_bindir}/%{wxconfiglink}
f5b3b37e 578
fe770a60
RR
579%post -n %{wxbasename}
580/sbin/ldconfig
581
582%postun -n %{wxbasename}
583/sbin/ldconfig
584
585%post -n %{wxbasename}-devel
586# link wx-config with explicit name.
587ln -sf %{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
588/sbin/ldconfig
589
590%postun -n %{wxbasename}-devel
591/sbin/ldconfig
592
593%preun -n %{wxbasename}-devel
594rm -f %{_bindir}/%{wxbaseconfiglink}
595
1cd555d2
VZ
596%post gl
597/sbin/ldconfig
598
599%postun gl
600/sbin/ldconfig
601
602%post contrib
603/sbin/ldconfig
604
605%postun contrib
606/sbin/ldconfig
607
608%post contrib-devel
609/sbin/ldconfig
610
611%postun contrib-devel
612/sbin/ldconfig
81edbb3f 613
4eba1840 614%files
81edbb3f
VS
615%defattr(-,root,root)
616%doc COPYING.LIB *.txt
fe770a60
RR
617%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.*
618%{_libdir}/libwx_%{buildname}_core-%{ver2}.so.*
4eba1840 619%if !%{unicode}
fe770a60 620 %{_libdir}/libwx_%{buildname}_dbgrid-%{ver2}.so.*
4eba1840 621%endif
fe770a60
RR
622%{_libdir}/libwx_%{buildname}_html-%{ver2}.so.*
623%{_libdir}/libwx_%{buildname}_media-%{ver2}.so.*
624%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.*
625%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.*
1cd555d2 626
18f208c3 627%files -n wx-i18n
fe770a60
RR
628%defattr(-,root,root)
629%{_datadir}/locale/*/*/*
641d87d8 630
4eba1840 631%files devel -f core-headers.files
0f7deca9 632%defattr(-,root,root)
fe770a60
RR
633# shared libs
634%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so
635%{_libdir}/libwx_%{buildname}_core-%{ver2}.so
4eba1840 636%if !%{unicode}
fe770a60 637 %{_libdir}/libwx_%{buildname}_dbgrid-%{ver2}.so
4eba1840 638%endif
fe770a60
RR
639%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so
640%{_libdir}/libwx_%{buildname}_html-%{ver2}.so
641%{_libdir}/libwx_%{buildname}_media-%{ver2}.so
642%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so
643%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so
644# static libs
645%{_libdir}/libwx_%{buildname}_adv-%{ver2}.a
646%{_libdir}/libwx_%{buildname}_core-%{ver2}.a
647%if !%{unicode}
648 %{_libdir}/libwx_%{buildname}_dbgrid-%{ver2}.a
649%endif
650%{_libdir}/libwx_%{buildname}_gl-%{ver2}.a
651%{_libdir}/libwx_%{buildname}_html-%{ver2}.a
652%{_libdir}/libwx_%{buildname}_media-%{ver2}.a
653%{_libdir}/libwx_%{buildname}_qa-%{ver2}.a
654%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a
81edbb3f 655%dir %{_libdir}/wx
fe770a60
RR
656%{_libdir}/wx/config/%{wxconfig}
657%{_libdir}/wx/include/%{wxconfig}/wx/setup.h
658%{_libdir}/wx/config/%{wxconfigstatic}
659%{_libdir}/wx/include/%{wxconfigstatic}/wx/setup.h
1cd555d2 660%{_bindir}/wxrc*
2a29700e 661
fe770a60 662%files -n %{wxbasename}
81edbb3f 663%defattr(-,root,root)
fe770a60 664%{_libdir}/libwx_base*-%{ver2}.so.*
0f7deca9 665
fe770a60 666%files -n %{wxbasename}-devel -f wxbase-headers.paths
5dcf9614 667%defattr (-,root,root)
fe770a60
RR
668%dir %{_includedir}/wx-%{ver2}
669%{_libdir}/libwx_base*-%{ver2}.so
670%{_libdir}/libwx_base*-%{ver2}.a
671%if %{unicode}
672 %{_libdir}/libwxregexu-%{ver2}.a
673%endif
674%dir %{_libdir}/wx
675%{_libdir}/wx/config/%{wxbaseconfig}
676%{_libdir}/wx/include/%{wxbaseconfig}/wx/setup.h
677%{_libdir}/wx/config/%{wxbaseconfigstatic}
678%{_libdir}/wx/include/%{wxbaseconfigstatic}/wx/setup.h
679%{_datadir}/aclocal/*.m4
680
681%files gl
682%defattr(-,root,root)
683%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.*
4eba1840
VS
684
685%files contrib
686%defattr(-,root,root)
fe770a60
RR
687%{_libdir}/libwx_%{buildname}_animate-%{ver2}.so.*
688%{_libdir}/libwx_%{buildname}_deprecated-%{ver2}.so.*
689%{_libdir}/libwx_%{buildname}_fl-%{ver2}.so.*
690%{_libdir}/libwx_%{buildname}_gizmos-%{ver2}.so.*
691%{_libdir}/libwx_%{buildname}_gizmos_xrc-%{ver2}.so.*
692%{_libdir}/libwx_%{buildname}_mmedia-%{ver2}.so.*
693%{_libdir}/libwx_%{buildname}_ogl-%{ver2}.so.*
694%{_libdir}/libwx_%{buildname}_plot-%{ver2}.so.*
695%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.*
696%{_libdir}/libwx_%{buildname}_svg-%{ver2}.so.*
4eba1840
VS
697
698%files contrib-devel
699%defattr(-,root,root)
1cd555d2
VZ
700%dir %{_includedir}/wx-%{ver2}/wx/animate
701%{_includedir}/wx-%{ver2}/wx/animate/*
fe770a60 702%{_libdir}/libwx_%{buildname}_animate-%{ver2}.so
4eba1840 703
1cd555d2
VZ
704%dir %{_includedir}/wx-%{ver2}/wx/deprecated
705%{_includedir}/wx-%{ver2}/wx/deprecated/*
fe770a60 706%{_libdir}/libwx_%{buildname}_deprecated-%{ver2}.so
4eba1840 707
1cd555d2
VZ
708%dir %{_includedir}/wx-%{ver2}/wx/fl
709%{_includedir}/wx-%{ver2}/wx/fl/*
fe770a60 710%{_libdir}/libwx_%{buildname}_fl-%{ver2}.so
4eba1840 711
1cd555d2
VZ
712%dir %{_includedir}/wx-%{ver2}/wx/gizmos
713%{_includedir}/wx-%{ver2}/wx/gizmos/*
fe770a60
RR
714%{_libdir}/libwx_%{buildname}_gizmos-%{ver2}.so
715%{_libdir}/libwx_%{buildname}_gizmos_xrc-%{ver2}.so
4eba1840 716
1cd555d2
VZ
717%dir %{_includedir}/wx-%{ver2}/wx/mmedia
718%{_includedir}/wx-%{ver2}/wx/mmedia/*
fe770a60 719%{_libdir}/libwx_%{buildname}_mmedia-%{ver2}.so
4eba1840 720
1cd555d2
VZ
721%dir %{_includedir}/wx-%{ver2}/wx/ogl
722%{_includedir}/wx-%{ver2}/wx/ogl/*
fe770a60 723%{_libdir}/libwx_%{buildname}_ogl-%{ver2}.so
4eba1840 724
1cd555d2
VZ
725%dir %{_includedir}/wx-%{ver2}/wx/plot
726%{_includedir}/wx-%{ver2}/wx/plot/*
fe770a60 727%{_libdir}/libwx_%{buildname}_plot-%{ver2}.so
4eba1840 728
1cd555d2
VZ
729%dir %{_includedir}/wx-%{ver2}/wx/stc
730%{_includedir}/wx-%{ver2}/wx/stc/*
fe770a60 731%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so
4eba1840 732
1cd555d2
VZ
733%dir %{_includedir}/wx-%{ver2}/wx/svg
734%{_includedir}/wx-%{ver2}/wx/svg/*
fe770a60 735%{_libdir}/libwx_%{buildname}_svg-%{ver2}.so