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