]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxBase.spec
More WXDLLIMPEXP_GIZMOS fixes
[wxWidgets.git] / wxBase.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.5.5
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
25Summary: wxBase library - non-GUI support classes of wxWindows toolkit
26Name: %{name}
27Version: %{ver}
28Release: %{rel}
29License: wxWindows Licence
30Group: Development/Libraries
31Source: wxBase-%{ver}.tar.bz2
32URL: http://www.wxwindows.org
33Packager: Vadim Zeitlin <vadim@wxwindows.org>
34Prefix: %{pref}
35BuildRoot: /var/tmp/%{name}-root
36Provides: wxBase
37
38%description
39wxBase is a collection of C++ classes providing basic data structures (strings,
40lists, arrays), powerful wxDateTime class for date manipulations, portable
41wrappers around many OS-specific functions allowing to build the same program
42under all supported folders, wxThread class for writing multithreaded programs
43using either Win32 or POSIX threads and much more. wxBase currently supports
44the following platforms: Win32, generic Unix (Linux, FreeBSD, Solaris, HP-UX,
45...) and BeOS.
46
47%package devel
48Summary: wxBase headers needed for developping with wxBase
49Group: Development/Libraries
50Requires: %{name} = %{ver}
51Provides: wxBase-devel
52
53%description devel
54Header files for wxBase. You need them to develop programs using wxBase.
55
56%package static
57Summary: wxBase static libraries
58Group: Development/Libraries
59
60%description static
61Static 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
67if [ "$SMP" != "" ]; then
68 export MAKE="make -j$SMP"
69else
70 export MAKE="make"
71fi
72
73mkdir obj-shared
74cd obj-shared
75../configure --prefix=%{pref} --disable-gui \
76%if %{unicode}
77 --enable-unicode
78%else
79 --with-odbc
80%endif
81$MAKE
82cd ..
83
84mkdir obj-static
85cd 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
93cd ..
94
95%install
96rm -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
103rm -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.
113ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/wx-config
114# link wx-config with explicit name.
115ln -sf %{_libdir}/wx/config/%{wxconfigname} %{_bindir}/%{wxconfiglinkname}
116
117%preun devel
118if 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
124fi
125
126rm -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