2000-01-31 13:26:16 -05:00
|
|
|
%define pref /usr
|
2007-01-07 17:21:20 -05:00
|
|
|
%define ver 2.8.1
|
2006-11-12 07:12:18 -05:00
|
|
|
%define ver2 2.8
|
2005-04-11 15:37:51 -04:00
|
|
|
%define rel 1
|
2000-01-31 13:26:16 -05:00
|
|
|
|
2003-08-20 11:14:12 -04: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 17:26:04 -05:00
|
|
|
%define name wx-base-unicode
|
|
|
|
%define wxconfig base-unicode-release-%{ver2}
|
|
|
|
%define wxconfiglink wxbaseu-%{ver2}-config
|
2003-08-20 11:14:12 -04:00
|
|
|
%else
|
2005-04-02 17:26:04 -05:00
|
|
|
%define name wx-base
|
|
|
|
%define wxconfig base-ansi-release-%{ver2}
|
|
|
|
%define wxconfiglink wxbase-%{ver2}-config
|
2003-08-20 11:14:12 -04:00
|
|
|
%endif
|
|
|
|
|
2005-04-02 17:26:04 -05:00
|
|
|
Summary: wxBase library - non-GUI support classes of wxWidgets toolkit
|
|
|
|
Name: %{name}
|
2000-01-31 13:26:16 -05:00
|
|
|
Version: %{ver}
|
|
|
|
Release: %{rel}
|
2003-08-20 11:14:12 -04:00
|
|
|
License: wxWindows Licence
|
2000-01-31 13:26:16 -05:00
|
|
|
Group: Development/Libraries
|
2001-06-21 13:53:19 -04:00
|
|
|
Source: wxBase-%{ver}.tar.bz2
|
2005-04-02 17:26:04 -05:00
|
|
|
URL: http://www.wxwidgets.org
|
2000-01-31 13:26:16 -05:00
|
|
|
Packager: Vadim Zeitlin <vadim@wxwindows.org>
|
2001-01-29 12:39:24 -05:00
|
|
|
Prefix: %{pref}
|
2005-04-02 17:26:04 -05:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
2003-08-20 11:14:12 -04:00
|
|
|
Provides: wxBase
|
2000-01-31 13:26:16 -05: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 11:14:12 -04:00
|
|
|
Requires: %{name} = %{ver}
|
|
|
|
Provides: wxBase-devel
|
2000-01-31 13:26:16 -05:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Header files for wxBase. You need them to develop programs using wxBase.
|
|
|
|
|
2001-11-21 19:33:18 -05:00
|
|
|
%package static
|
|
|
|
Summary: wxBase static libraries
|
|
|
|
Group: Development/Libraries
|
2005-04-02 17:26:04 -05:00
|
|
|
Requires: %{name}-devel = %{ver}
|
2001-11-21 19:33:18 -05:00
|
|
|
|
|
|
|
%description static
|
|
|
|
Static libraries for wxBase. You need them if you want to link statically against wxBase.
|
|
|
|
|
2000-01-31 13:26:16 -05:00
|
|
|
%prep
|
2003-08-20 11:14:12 -04:00
|
|
|
%setup -q -n wxBase-%{ver}
|
2000-01-31 13:26:16 -05:00
|
|
|
|
|
|
|
%build
|
|
|
|
if [ "$SMP" != "" ]; then
|
2005-04-02 17:26:04 -05:00
|
|
|
export MAKE="make -j$SMP"
|
2000-01-31 13:26:16 -05:00
|
|
|
else
|
2005-04-02 17:26:04 -05:00
|
|
|
export MAKE="make"
|
2000-01-31 13:26:16 -05:00
|
|
|
fi
|
2001-11-21 19:33:18 -05:00
|
|
|
|
|
|
|
mkdir obj-shared
|
|
|
|
cd obj-shared
|
2003-08-20 11:14:12 -04:00
|
|
|
../configure --prefix=%{pref} --disable-gui \
|
|
|
|
%if %{unicode}
|
2005-04-02 17:26:04 -05:00
|
|
|
--enable-unicode
|
2003-08-20 11:14:12 -04:00
|
|
|
%else
|
2005-04-02 17:26:04 -05:00
|
|
|
--with-odbc
|
2003-08-20 11:14:12 -04:00
|
|
|
%endif
|
2001-11-21 19:33:18 -05:00
|
|
|
$MAKE
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mkdir obj-static
|
|
|
|
cd obj-static
|
2005-04-02 17:26:04 -05:00
|
|
|
../configure --prefix=%{pref} --disable-gui --disable-shared \
|
2003-08-20 11:14:12 -04:00
|
|
|
%if %{unicode}
|
2005-04-02 17:26:04 -05:00
|
|
|
--enable-unicode
|
2003-08-20 11:14:12 -04:00
|
|
|
%else
|
2005-04-02 17:26:04 -05:00
|
|
|
--with-odbc
|
2003-08-20 11:14:12 -04:00
|
|
|
%endif
|
2001-11-21 19:33:18 -05:00
|
|
|
$MAKE
|
|
|
|
cd ..
|
|
|
|
|
2000-01-31 13:26:16 -05:00
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2006-08-04 19:14:55 -04: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 13:26:16 -05:00
|
|
|
|
2006-08-04 19:30:43 -04: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 18:55:21 -05:00
|
|
|
%find_lang wxstd
|
|
|
|
|
2000-01-31 13:26:16 -05:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
2005-02-19 10:15:07 -05:00
|
|
|
%post devel
|
|
|
|
# link wx-config when you install RPM.
|
2005-04-02 17:26:04 -05:00
|
|
|
ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
|
2005-02-19 10:15:07 -05:00
|
|
|
# link wx-config with explicit name.
|
2005-04-02 17:26:04 -05:00
|
|
|
ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun devel
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
2005-02-19 10:15:07 -05:00
|
|
|
%preun devel
|
|
|
|
if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
|
2005-04-02 17:26:04 -05: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 10:15:07 -05:00
|
|
|
fi
|
2005-04-02 17:26:04 -05:00
|
|
|
rm -f %{_bindir}/%{wxconfiglink}
|
2005-02-19 10:15:07 -05:00
|
|
|
|
2001-11-22 18:55:21 -05:00
|
|
|
%files -f wxstd.lang
|
2001-11-20 18:50:32 -05:00
|
|
|
%defattr (-,root,root)
|
|
|
|
%doc COPYING.LIB *.txt
|
2005-04-02 17:26:04 -05:00
|
|
|
%{_libdir}/libwx_base*-%{ver2}.so.*
|
2001-06-21 19:32:16 -04:00
|
|
|
|
2001-11-20 18:50:32 -05:00
|
|
|
%files devel
|
|
|
|
%defattr (-,root,root)
|
2006-08-04 18:47:25 -04:00
|
|
|
%{_bindir}/wx-config
|
2005-04-02 17:26:04 -05:00
|
|
|
%dir %{_includedir}/wx-%{ver2}
|
|
|
|
%{_includedir}/wx-%{ver2}/*
|
|
|
|
%{_libdir}/libwx_base*-%{ver2}.so
|
2001-11-20 18:50:32 -05:00
|
|
|
%dir %{_libdir}/wx
|
|
|
|
%{_libdir}/wx/*
|
2001-11-24 18:55:29 -05:00
|
|
|
%{_datadir}/aclocal/*.m4
|
2006-08-04 18:47:25 -04:00
|
|
|
%{_datadir}/bakefile/presets/*
|
|
|
|
%{_datadir}/locale/*/LC_MESSAGES/*.mo
|
2000-01-31 13:26:16 -05:00
|
|
|
|
2001-11-21 19:33:18 -05:00
|
|
|
%files static
|
|
|
|
%defattr (-,root,root)
|
|
|
|
%{_libdir}/lib*.a
|