]>
Commit | Line | Data |
---|---|---|
2224580a | 1 | %define pref /usr |
c31752da JS |
2 | %define ver 2.5.0 |
3 | %define ver2 2.5 | |
014e19de | 4 | %define rel 1 |
2224580a | 5 | |
4eba1840 VS |
6 | # Configurable settings (use --with(out) unicode on rpmbuild command line): |
7 | %define unicode 0 | |
8 | %{?_with_unicode: %{expand: %%define unicode 1}} | |
9 | %{?_without_unicode: %{expand: %%define unicode 0}} | |
10 | ||
11 | %if %{unicode} | |
12 | %define wxconfigname wxbaseu-%{ver2}-config | |
13 | %else | |
14 | %define wxconfigname wxbase-%{ver2}-config | |
15 | %endif | |
16 | ||
17 | %if %{unicode} | |
18 | %define name wx-base-unicode | |
19 | %else | |
20 | %define name wx-base | |
21 | %endif | |
22 | ||
2224580a | 23 | Summary: wxBase library - non-GUI support classes of wxWindows toolkit |
4eba1840 | 24 | Name: %{name} |
2224580a VZ |
25 | Version: %{ver} |
26 | Release: %{rel} | |
4eba1840 | 27 | License: wxWindows Licence |
2224580a | 28 | Group: Development/Libraries |
b5fa0a3e VZ |
29 | Source: wxBase-%{ver}.tar.bz2 |
30 | URL: http://www.wxwindows.org | |
2224580a | 31 | Packager: Vadim Zeitlin <vadim@wxwindows.org> |
31fe72b6 VZ |
32 | Prefix: %{pref} |
33 | BuildRoot: /var/tmp/%{name}-root | |
4eba1840 | 34 | Provides: wxBase |
2224580a VZ |
35 | |
36 | %description | |
37 | wxBase is a collection of C++ classes providing basic data structures (strings, | |
38 | lists, arrays), powerful wxDateTime class for date manipulations, portable | |
39 | wrappers around many OS-specific functions allowing to build the same program | |
40 | under all supported folders, wxThread class for writing multithreaded programs | |
41 | using either Win32 or POSIX threads and much more. wxBase currently supports | |
42 | the following platforms: Win32, generic Unix (Linux, FreeBSD, Solaris, HP-UX, | |
43 | ...) and BeOS. | |
44 | ||
45 | %package devel | |
46 | Summary: wxBase headers needed for developping with wxBase | |
47 | Group: Development/Libraries | |
4eba1840 VS |
48 | Requires: %{name} = %{ver} |
49 | Provides: wxBase-devel | |
2224580a VZ |
50 | |
51 | %description devel | |
52 | Header files for wxBase. You need them to develop programs using wxBase. | |
53 | ||
5dcf9614 VS |
54 | %package static |
55 | Summary: wxBase static libraries | |
56 | Group: Development/Libraries | |
57 | ||
58 | %description static | |
59 | Static libraries for wxBase. You need them if you want to link statically against wxBase. | |
60 | ||
2224580a | 61 | %prep |
4eba1840 | 62 | %setup -q -n wxBase-%{ver} |
2224580a VZ |
63 | |
64 | %build | |
65 | if [ "$SMP" != "" ]; then | |
66 | export MAKE="make -j$SMP" | |
67 | else | |
68 | export MAKE="make" | |
69 | fi | |
5dcf9614 | 70 | |
5dcf9614 VS |
71 | mkdir obj-shared |
72 | cd obj-shared | |
4eba1840 VS |
73 | ../configure --prefix=%{pref} --disable-gui \ |
74 | %if %{unicode} | |
75 | --enable-unicode \ | |
76 | %else | |
77 | --with-odbc \ | |
78 | %endif | |
79 | --disable-std_iostreams | |
5dcf9614 VS |
80 | $MAKE |
81 | cd .. | |
82 | ||
83 | mkdir obj-static | |
84 | cd obj-static | |
4eba1840 VS |
85 | ../configure --prefix=%{pref} --disable-shared --disable-gui \ |
86 | %if %{unicode} | |
87 | --enable-unicode \ | |
88 | %else | |
89 | --with-odbc \ | |
90 | %endif | |
91 | --disable-std_iostreams | |
5dcf9614 VS |
92 | $MAKE |
93 | cd .. | |
94 | ||
2224580a VZ |
95 | %install |
96 | rm -rf $RPM_BUILD_ROOT | |
5dcf9614 VS |
97 | (cd obj-static ; make prefix=$RPM_BUILD_ROOT%{pref} install) |
98 | (cd obj-shared ; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
2224580a | 99 | |
acea2a0b VS |
100 | %find_lang wxstd |
101 | ||
2224580a VZ |
102 | %clean |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %post | |
106 | /sbin/ldconfig | |
107 | ||
108 | %postun | |
109 | /sbin/ldconfig | |
110 | ||
32037c4e VS |
111 | %post devel |
112 | # Install wx-config if there isn't any | |
113 | if test ! -f %{_bindir}/wx-config ; then | |
114 | ln -sf wxbase-%{ver2}-config %{_bindir}/wx-config | |
115 | fi | |
116 | ||
117 | %preun devel | |
118 | # Remove wx-config if it points to this package | |
119 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
120 | SUM1=`md5sum %{_bindir}/wxbase-%{ver2}-config | cut -c 0-32` | |
121 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
122 | if test "x$SUM1" = "x$SUM2" ; then | |
123 | rm -f %{_bindir}/wx-config | |
124 | fi | |
125 | fi | |
126 | ||
acea2a0b | 127 | %files -f wxstd.lang |
32037c4e VS |
128 | %defattr (-,root,root) |
129 | %doc COPYING.LIB *.txt | |
130 | %{_libdir}/libwx_base*so.* | |
156da3a9 | 131 | |
32037c4e VS |
132 | %files devel |
133 | %defattr (-,root,root) | |
134 | %dir %{_includedir}/wx | |
135 | %{_includedir}/wx/* | |
136 | %{_libdir}/libwx_base*.so | |
137 | %dir %{_libdir}/wx | |
138 | %{_libdir}/wx/* | |
4eba1840 | 139 | %{_bindir}/wxbase*-%{ver2}-config |
debc175a | 140 | %{_datadir}/aclocal/*.m4 |
2224580a | 141 | |
5dcf9614 VS |
142 | %files static |
143 | %defattr (-,root,root) | |
144 | %{_libdir}/lib*.a |