]> git.saurik.com Git - wxWidgets.git/blob - wxBase.spec
more minor doc corrections (patch 1144628)
[wxWidgets.git] / wxBase.spec
1 %define pref /usr
2 %define ver 2.5.4
3 %define ver2 2.5
4 %define rel 1
5
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 base-unicode-release-%{ver2}
13 %define wxconfiglinkname wxbaseu-%{ver2}-config
14 %else
15 %define wxconfigname base-ansi-release-%{ver2}
16 %define wxconfiglinkname wxbase-%{ver2}-config
17 %endif
18
19 %if %{unicode}
20 %define name wx-base-unicode
21 %else
22 %define name wx-base
23 %endif
24
25 Summary: wxBase library - non-GUI support classes of wxWindows toolkit
26 Name: %{name}
27 Version: %{ver}
28 Release: %{rel}
29 License: wxWindows Licence
30 Group: Development/Libraries
31 Source: wxBase-%{ver}.tar.bz2
32 URL: http://www.wxwindows.org
33 Packager: Vadim Zeitlin <vadim@wxwindows.org>
34 Prefix: %{pref}
35 BuildRoot: /var/tmp/%{name}-root
36 Provides: wxBase
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
50 Requires: %{name} = %{ver}
51 Provides: wxBase-devel
52
53 %description devel
54 Header files for wxBase. You need them to develop programs using wxBase.
55
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
63 %prep
64 %setup -q -n wxBase-%{ver}
65
66 %build
67 if [ "$SMP" != "" ]; then
68 export MAKE="make -j$SMP"
69 else
70 export MAKE="make"
71 fi
72
73 mkdir obj-shared
74 cd obj-shared
75 ../configure --prefix=%{pref} --disable-gui \
76 %if %{unicode}
77 --enable-unicode
78 %else
79 --with-odbc
80 %endif
81 $MAKE
82 cd ..
83
84 mkdir obj-static
85 cd obj-static
86 ../configure --prefix=%{pref} --disable-shared --disable-gui \
87 %if %{unicode}
88 --enable-unicode
89 %else
90 --with-odbc
91 %endif
92 $MAKE
93 cd ..
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 (cd obj-static ; make prefix=$RPM_BUILD_ROOT%{pref} install)
98 (cd obj-shared ; make prefix=$RPM_BUILD_ROOT%{pref} install)
99
100 %find_lang wxstd
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post
106 /sbin/ldconfig
107
108 %postun
109 /sbin/ldconfig
110
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
128 %files -f wxstd.lang
129 %defattr (-,root,root)
130 %doc COPYING.LIB *.txt
131 %{_libdir}/libwx_base*so.*
132
133 %files devel
134 %defattr (-,root,root)
135 %dir %{_includedir}/wx-*
136 %{_includedir}/wx-*/*
137 %{_libdir}/libwx_base*.so
138 %dir %{_libdir}/wx
139 %{_libdir}/wx/*
140 %{_datadir}/aclocal/*.m4
141
142 %files static
143 %defattr (-,root,root)
144 %{_libdir}/lib*.a