]> git.saurik.com Git - wxWidgets.git/blame - wxBase.spec
Added back trailing newline. Please be more careful when using dumb editors like...
[wxWidgets.git] / wxBase.spec
CommitLineData
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 25Summary: wxBase library - non-GUI support classes of wxWindows toolkit
4eba1840 26Name: %{name}
2224580a
VZ
27Version: %{ver}
28Release: %{rel}
4eba1840 29License: wxWindows Licence
2224580a 30Group: Development/Libraries
b5fa0a3e
VZ
31Source: wxBase-%{ver}.tar.bz2
32URL: http://www.wxwindows.org
2224580a 33Packager: Vadim Zeitlin <vadim@wxwindows.org>
31fe72b6
VZ
34Prefix: %{pref}
35BuildRoot: /var/tmp/%{name}-root
4eba1840 36Provides: wxBase
2224580a
VZ
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
4eba1840
VS
50Requires: %{name} = %{ver}
51Provides: wxBase-devel
2224580a
VZ
52
53%description devel
54Header files for wxBase. You need them to develop programs using wxBase.
55
5dcf9614
VS
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
2224580a 63%prep
4eba1840 64%setup -q -n wxBase-%{ver}
2224580a
VZ
65
66%build
67if [ "$SMP" != "" ]; then
68 export MAKE="make -j$SMP"
69else
70 export MAKE="make"
71fi
5dcf9614 72
5dcf9614
VS
73mkdir obj-shared
74cd 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
82cd ..
83
84mkdir obj-static
85cd 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
93cd ..
94
2224580a
VZ
95%install
96rm -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
103rm -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.
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
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