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