2000-01-31 18:26:16 +00:00
|
|
|
%define pref /usr
|
2007-02-06 19:58:27 +00:00
|
|
|
%define ver 2.9.0
|
|
|
|
%define ver2 2.9
|
2005-04-11 19:37:51 +00:00
|
|
|
%define rel 1
|
2000-01-31 18:26:16 +00:00
|
|
|
|
2003-08-20 15:14:12 +00:00
|
|
|
# Configurable settings (use --with(out) unicode on rpmbuild command line):
|
|
|
|
%define unicode 0
|
|
|
|
%{?_with_unicode: %{expand: %%define unicode 1}}
|
|
|
|
%{?_without_unicode: %{expand: %%define unicode 0}}
|
|
|
|
|
|
|
|
%if %{unicode}
|
2005-04-02 22:26:04 +00:00
|
|
|
%define name wx-base-unicode
|
|
|
|
%define wxconfig base-unicode-release-%{ver2}
|
|
|
|
%define wxconfiglink wxbaseu-%{ver2}-config
|
2003-08-20 15:14:12 +00:00
|
|
|
%else
|
2005-04-02 22:26:04 +00:00
|
|
|
%define name wx-base
|
|
|
|
%define wxconfig base-ansi-release-%{ver2}
|
|
|
|
%define wxconfiglink wxbase-%{ver2}-config
|
2003-08-20 15:14:12 +00:00
|
|
|
%endif
|
|
|
|
|
2005-04-02 22:26:04 +00:00
|
|
|
Summary: wxBase library - non-GUI support classes of wxWidgets toolkit
|
|
|
|
Name: %{name}
|
2000-01-31 18:26:16 +00:00
|
|
|
Version: %{ver}
|
|
|
|
Release: %{rel}
|
2003-08-20 15:14:12 +00:00
|
|
|
License: wxWindows Licence
|
2000-01-31 18:26:16 +00:00
|
|
|
Group: Development/Libraries
|
2001-06-21 17:53:19 +00:00
|
|
|
Source: wxBase-%{ver}.tar.bz2
|
2005-04-02 22:26:04 +00:00
|
|
|
URL: http://www.wxwidgets.org
|
2000-01-31 18:26:16 +00:00
|
|
|
Packager: Vadim Zeitlin <vadim@wxwindows.org>
|
2001-01-29 17:39:24 +00:00
|
|
|
Prefix: %{pref}
|
2005-04-02 22:26:04 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
2003-08-20 15:14:12 +00:00
|
|
|
Provides: wxBase
|
2000-01-31 18:26:16 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
wxBase is a collection of C++ classes providing basic data structures (strings,
|
|
|
|
lists, arrays), powerful wxDateTime class for date manipulations, portable
|
|
|
|
wrappers around many OS-specific functions allowing to build the same program
|
|
|
|
under all supported folders, wxThread class for writing multithreaded programs
|
|
|
|
using either Win32 or POSIX threads and much more. wxBase currently supports
|
|
|
|
the following platforms: Win32, generic Unix (Linux, FreeBSD, Solaris, HP-UX,
|
|
|
|
...) and BeOS.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: wxBase headers needed for developping with wxBase
|
|
|
|
Group: Development/Libraries
|
2003-08-20 15:14:12 +00:00
|
|
|
Requires: %{name} = %{ver}
|
|
|
|
Provides: wxBase-devel
|
2000-01-31 18:26:16 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Header files for wxBase. You need them to develop programs using wxBase.
|
|
|
|
|
2001-11-22 00:33:18 +00:00
|
|
|
%package static
|
|
|
|
Summary: wxBase static libraries
|
|
|
|
Group: Development/Libraries
|
2005-04-02 22:26:04 +00:00
|
|
|
Requires: %{name}-devel = %{ver}
|
2001-11-22 00:33:18 +00:00
|
|
|
|
|
|
|
%description static
|
|
|
|
Static libraries for wxBase. You need them if you want to link statically against wxBase.
|
|
|
|
|
2000-01-31 18:26:16 +00:00
|
|
|
%prep
|
2003-08-20 15:14:12 +00:00
|
|
|
%setup -q -n wxBase-%{ver}
|
2000-01-31 18:26:16 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
if [ "$SMP" != "" ]; then
|
2005-04-02 22:26:04 +00:00
|
|
|
export MAKE="make -j$SMP"
|
2000-01-31 18:26:16 +00:00
|
|
|
else
|
2005-04-02 22:26:04 +00:00
|
|
|
export MAKE="make"
|
2000-01-31 18:26:16 +00:00
|
|
|
fi
|
2001-11-22 00:33:18 +00:00
|
|
|
|
|
|
|
mkdir obj-shared
|
|
|
|
cd obj-shared
|
2003-08-20 15:14:12 +00:00
|
|
|
../configure --prefix=%{pref} --disable-gui \
|
|
|
|
%if %{unicode}
|
2005-04-02 22:26:04 +00:00
|
|
|
--enable-unicode
|
2003-08-20 15:14:12 +00:00
|
|
|
%else
|
2005-04-02 22:26:04 +00:00
|
|
|
--with-odbc
|
2003-08-20 15:14:12 +00:00
|
|
|
%endif
|
2001-11-22 00:33:18 +00:00
|
|
|
$MAKE
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mkdir obj-static
|
|
|
|
cd obj-static
|
2005-04-02 22:26:04 +00:00
|
|
|
../configure --prefix=%{pref} --disable-gui --disable-shared \
|
2003-08-20 15:14:12 +00:00
|
|
|
%if %{unicode}
|
2005-04-02 22:26:04 +00:00
|
|
|
--enable-unicode
|
2003-08-20 15:14:12 +00:00
|
|
|
%else
|
2005-04-02 22:26:04 +00:00
|
|
|
--with-odbc
|
2003-08-20 15:14:12 +00:00
|
|
|
%endif
|
2001-11-22 00:33:18 +00:00
|
|
|
$MAKE
|
|
|
|
cd ..
|
|
|
|
|
2000-01-31 18:26:16 +00:00
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2006-08-04 23:14:55 +00:00
|
|
|
make -C locale allmo
|
|
|
|
make -C obj-static DESTDIR=$RPM_BUILD_ROOT prefix=%{pref} install
|
|
|
|
make -C obj-shared DESTDIR=$RPM_BUILD_ROOT prefix=%{pref} install
|
2000-01-31 18:26:16 +00:00
|
|
|
|
2006-08-04 23:30:43 +00:00
|
|
|
# we need to modify the absolute wx-config link to be relative or rpm complains
|
|
|
|
# (and our package wouldn't be relocatable)
|
|
|
|
ln -sf ../lib/wx/config/%{wxconfig} $RPM_BUILD_ROOT/%{pref}/bin/wx-config
|
|
|
|
|
2001-11-22 23:55:21 +00:00
|
|
|
%find_lang wxstd
|
|
|
|
|
2000-01-31 18:26:16 +00:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
2005-02-19 15:15:07 +00:00
|
|
|
%post devel
|
|
|
|
# link wx-config when you install RPM.
|
2005-04-02 22:26:04 +00:00
|
|
|
ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
|
2005-02-19 15:15:07 +00:00
|
|
|
# link wx-config with explicit name.
|
2005-04-02 22:26:04 +00:00
|
|
|
ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun devel
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
2005-02-19 15:15:07 +00:00
|
|
|
%preun devel
|
|
|
|
if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
|
2005-04-02 22:26:04 +00:00
|
|
|
SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
|
|
|
|
SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
|
|
|
|
if test "x$SUM1" = "x$SUM2" ; then
|
|
|
|
rm -f %{_bindir}/wx-config
|
|
|
|
fi
|
2005-02-19 15:15:07 +00:00
|
|
|
fi
|
2005-04-02 22:26:04 +00:00
|
|
|
rm -f %{_bindir}/%{wxconfiglink}
|
2005-02-19 15:15:07 +00:00
|
|
|
|
2001-11-22 23:55:21 +00:00
|
|
|
%files -f wxstd.lang
|
2001-11-20 23:50:32 +00:00
|
|
|
%defattr (-,root,root)
|
|
|
|
%doc COPYING.LIB *.txt
|
2005-04-02 22:26:04 +00:00
|
|
|
%{_libdir}/libwx_base*-%{ver2}.so.*
|
2001-06-21 23:32:16 +00:00
|
|
|
|
2001-11-20 23:50:32 +00:00
|
|
|
%files devel
|
|
|
|
%defattr (-,root,root)
|
2006-08-04 22:47:25 +00:00
|
|
|
%{_bindir}/wx-config
|
2005-04-02 22:26:04 +00:00
|
|
|
%dir %{_includedir}/wx-%{ver2}
|
|
|
|
%{_includedir}/wx-%{ver2}/*
|
|
|
|
%{_libdir}/libwx_base*-%{ver2}.so
|
2001-11-20 23:50:32 +00:00
|
|
|
%dir %{_libdir}/wx
|
|
|
|
%{_libdir}/wx/*
|
2001-11-24 23:55:29 +00:00
|
|
|
%{_datadir}/aclocal/*.m4
|
2006-08-04 22:47:25 +00:00
|
|
|
%{_datadir}/bakefile/presets/*
|
|
|
|
%{_datadir}/locale/*/LC_MESSAGES/*.mo
|
2000-01-31 18:26:16 +00:00
|
|
|
|
2001-11-22 00:33:18 +00:00
|
|
|
%files static
|
|
|
|
%defattr (-,root,root)
|
|
|
|
%{_libdir}/lib*.a
|