]>
Commit | Line | Data |
---|---|---|
e5ea3f7a | 1 | %define pref /usr |
8c8fb2f6 VZ |
2 | %define ver 2.3.2 |
3 | %define ver2 2.3 | |
acea2a0b | 4 | %define rel 1 |
e5ea3f7a RR |
5 | |
6 | Summary: The GTK+ 1.2 port of the wxWindows library | |
f14a5b55 | 7 | Name: wxGTK |
e5ea3f7a RR |
8 | Version: %{ver} |
9 | Release: %{rel} | |
2a29700e | 10 | Copyright: wxWindows Licence |
f14a5b55 | 11 | Group: X11/Libraries |
b5fa0a3e VZ |
12 | Source: wxGTK-%{ver}.tar.bz2 |
13 | URL: http://www.wxwindows.org | |
31fe72b6 VZ |
14 | Packager: Vadim Zeitlin <vadim@wxwindows.org> |
15 | Prefix: %{pref} | |
16 | BuildRoot: /var/tmp/%{name}-root | |
f14a5b55 | 17 | |
212d0bb3 VZ |
18 | # all packages providing an implementation of wxWindows library (regardless of |
19 | # the toolkit used) should provide the (virtual) wxwin package, this makes it | |
6e711d5c | 20 | # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." |
212d0bb3 VZ |
21 | Provides: wxwin |
22 | ||
31fe72b6 VZ |
23 | # in addition, we should provide libwx_gtk as automatic generator only notices |
24 | # libwx_gtk-%{ver}-%{rel} | |
25 | Provides: libwx_gtk.so | |
8c8fb2f6 | 26 | Provides: libwx_gtk-%{ver2}.so |
31fe72b6 | 27 | |
f14a5b55 | 28 | %description |
212d0bb3 VZ |
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. | |
f14a5b55 | 32 | |
641d87d8 RR |
33 | %package devel |
34 | Summary: The GTK+ 1.2 port of the wxWindows library | |
35 | Group: X11/Libraries | |
5dcf9614 | 36 | Requires: wxGTK = %{ver} |
641d87d8 RR |
37 | |
38 | %description devel | |
c661ecca RR |
39 | Header files for wxGTK, the GTK+ 1.2 port of the wxWindows library. |
40 | ||
41 | %package gl | |
5dcf9614 | 42 | Summary: The GTK+ 1.2 port of the wxWindows library, OpenGL add-on. |
c661ecca | 43 | Group: X11/Libraries |
5dcf9614 | 44 | Requires: wxGTK = %{ver} |
c661ecca RR |
45 | |
46 | %description gl | |
5dcf9614 VS |
47 | OpenGL add-on library for wxGTK, the GTK+ 1.2 port of the wxWindows library. |
48 | ||
49 | %package static | |
50 | Summary: wxGTK static libraries | |
51 | Group: Development/Libraries | |
52 | ||
53 | %description static | |
54 | Static libraries for wxGTK. You need them if you want to link statically against wxGTK. | |
641d87d8 | 55 | |
f14a5b55 | 56 | %prep |
31fe72b6 | 57 | %setup -n wxGTK-%{ver} |
f14a5b55 RR |
58 | |
59 | %build | |
103aab26 RR |
60 | if [ "$SMP" != "" ]; then |
61 | export MAKE="make -j$SMP" | |
62 | else | |
63 | export MAKE="make" | |
64 | fi | |
5dcf9614 VS |
65 | |
66 | (cd locale; make allmo) | |
67 | ||
68 | mkdir obj-shared | |
69 | cd obj-shared | |
70 | ../configure --prefix=%{pref} --enable-soname --with-odbc --with-opengl | |
71 | $MAKE | |
72 | cd .. | |
73 | ||
74 | mkdir obj-static | |
75 | cd obj-static | |
76 | ../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl | |
103aab26 | 77 | $MAKE |
5dcf9614 | 78 | cd .. |
f14a5b55 RR |
79 | |
80 | %install | |
31fe72b6 | 81 | rm -rf $RPM_BUILD_ROOT |
5dcf9614 VS |
82 | (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install) |
83 | (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
f14a5b55 | 84 | |
acea2a0b VS |
85 | %find_lang wxstd |
86 | ||
c16d2763 VS |
87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
f14a5b55 RR |
90 | %post |
91 | /sbin/ldconfig | |
92 | ||
93 | %postun | |
94 | /sbin/ldconfig | |
95 | ||
81edbb3f VS |
96 | %post gl |
97 | /sbin/ldconfig | |
98 | ||
99 | %postun gl | |
100 | /sbin/ldconfig | |
101 | ||
102 | %post devel | |
103 | # Install wx-config if there isn't any | |
104 | if test ! -f %{_bindir}/wx-config ; then | |
105 | ln -sf wxgtk-%{ver2}-config %{_bindir}/wx-config | |
106 | fi | |
107 | ||
108 | %preun devel | |
109 | # Remove wx-config if it points to this package | |
110 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
111 | SUM1=`md5sum %{_bindir}/wxgtk-%{ver2}-config | cut -c 0-32` | |
112 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
113 | if test "x$SUM1" = "x$SUM2" ; then | |
114 | rm -f %{_bindir}/wx-config | |
115 | fi | |
116 | fi | |
117 | ||
118 | ||
acea2a0b | 119 | %files -f wxstd.lang |
81edbb3f VS |
120 | %defattr(-,root,root) |
121 | %doc COPYING.LIB *.txt | |
122 | %dir %{_datadir}/wx | |
123 | %{_datadir}/wx/* | |
81edbb3f | 124 | %{_libdir}/libwx_gtk-%{ver2}*.so.* |
641d87d8 RR |
125 | |
126 | %files devel | |
0f7deca9 | 127 | %defattr(-,root,root) |
81edbb3f VS |
128 | %{_libdir}/libwx_gtk-%{ver2}*.so |
129 | %dir %{_includedir}/wx | |
130 | %{_includedir}/wx/* | |
131 | %dir %{_libdir}/wx | |
132 | %{_libdir}/wx/* | |
133 | %{_bindir}/wxgtk-%{ver2}-config | |
debc175a | 134 | %{_datadir}/aclocal/*.m4 |
2a29700e | 135 | |
c661ecca | 136 | %files gl |
81edbb3f VS |
137 | %defattr(-,root,root) |
138 | %{_libdir}/libwx_gtk_gl* | |
0f7deca9 | 139 | |
5dcf9614 VS |
140 | %files static |
141 | %defattr (-,root,root) | |
142 | %{_libdir}/lib*.a |