]>
Commit | Line | Data |
---|---|---|
1 | %define pref /usr | |
2 | %define ver 2.3.2 | |
3 | %define ver2 2.3 | |
4 | %define rel 0 | |
5 | ||
6 | Summary: The GTK+ 1.2 port of the wxWindows library | |
7 | Name: wxGTK | |
8 | Version: %{ver} | |
9 | Release: %{rel} | |
10 | Copyright: wxWindows Licence | |
11 | Group: X11/Libraries | |
12 | Source: wxGTK-%{ver}.tar.bz2 | |
13 | URL: http://www.wxwindows.org | |
14 | Packager: Vadim Zeitlin <vadim@wxwindows.org> | |
15 | Prefix: %{pref} | |
16 | BuildRoot: /var/tmp/%{name}-root | |
17 | ||
18 | # all packages providing an implementation of wxWindows library (regardless of | |
19 | # the toolkit used) should provide the (virtual) wxwin package, this makes it | |
20 | # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." | |
21 | Provides: wxwin | |
22 | ||
23 | # in addition, we should provide libwx_gtk as automatic generator only notices | |
24 | # libwx_gtk-%{ver}-%{rel} | |
25 | Provides: libwx_gtk.so | |
26 | Provides: libwx_gtk-%{ver2}.so | |
27 | ||
28 | %description | |
29 | wxWindows is a free C++ library for cross-platform GUI development. | |
30 | With wxWindows, you can create applications for different GUIs (GTK+, | |
31 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
32 | ||
33 | %package devel | |
34 | Summary: The GTK+ 1.2 port of the wxWindows library | |
35 | Group: X11/Libraries | |
36 | Requires: wxGTK | |
37 | ||
38 | %description devel | |
39 | Header files for wxGTK, the GTK+ 1.2 port of the wxWindows library. | |
40 | ||
41 | %package gl | |
42 | Summary: The GTK+ 1.2 port of the wxWindows library, OpenGl add-on. | |
43 | Group: X11/Libraries | |
44 | Requires: wxGTK | |
45 | ||
46 | %description gl | |
47 | OpenGl add-on library for wxGTK, the GTK+ 1.2 port of the wxWindows library. | |
48 | ||
49 | %prep | |
50 | %setup -n wxGTK-%{ver} | |
51 | ./configure --prefix=%{pref} --enable-soname --with-odbc --with-opengl | |
52 | ||
53 | %build | |
54 | if [ "$SMP" != "" ]; then | |
55 | export MAKE="make -j$SMP" | |
56 | else | |
57 | export MAKE="make" | |
58 | fi | |
59 | $MAKE | |
60 | (cd locale ; make allmo) | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | make prefix=$RPM_BUILD_ROOT%{pref} install | |
65 | ||
66 | %post | |
67 | /sbin/ldconfig | |
68 | ||
69 | %postun | |
70 | /sbin/ldconfig | |
71 | ||
72 | %post gl | |
73 | /sbin/ldconfig | |
74 | ||
75 | %postun gl | |
76 | /sbin/ldconfig | |
77 | ||
78 | %post devel | |
79 | # Install wx-config if there isn't any | |
80 | if test ! -f %{_bindir}/wx-config ; then | |
81 | ln -sf wxgtk-%{ver2}-config %{_bindir}/wx-config | |
82 | fi | |
83 | ||
84 | %preun devel | |
85 | # Remove wx-config if it points to this package | |
86 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
87 | SUM1=`md5sum %{_bindir}/wxgtk-%{ver2}-config | cut -c 0-32` | |
88 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
89 | if test "x$SUM1" = "x$SUM2" ; then | |
90 | rm -f %{_bindir}/wx-config | |
91 | fi | |
92 | fi | |
93 | ||
94 | ||
95 | %files | |
96 | %defattr(-,root,root) | |
97 | %doc COPYING.LIB *.txt | |
98 | %dir %{_datadir}/wx | |
99 | %{_datadir}/wx/* | |
100 | %{_datadir}/locale/*/*/*.mo | |
101 | %{_libdir}/libwx_gtk-%{ver2}*.so.* | |
102 | ||
103 | %files devel | |
104 | %defattr(-,root,root) | |
105 | %{_libdir}/libwx_gtk-%{ver2}*.so | |
106 | %dir %{_includedir}/wx | |
107 | %{_includedir}/wx/* | |
108 | %dir %{_libdir}/wx | |
109 | %{_libdir}/wx/* | |
110 | %{_bindir}/wxgtk-%{ver2}-config | |
111 | ||
112 | %files gl | |
113 | %defattr(-,root,root) | |
114 | %{_libdir}/libwx_gtk_gl* | |
115 |